source: src/CodeGen/FixMain.h @ 60a8062

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 60a8062 was 60a8062, checked in by Peter A. Buhr <pabuhr@…>, 4 years ago

rewrite most of OperatorTable? and change caller modules to use new interface

  • Property mode set to 100644
File size: 1007 bytes
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// FixMain.h --
8//
9// Author           : Thierry Delisle
10// Created On       : Thr Jan 12 14:11:09 2017
11// Last Modified By : Peter A. Buhr
12// Last Modified On : Sun Feb 16 03:24:32 2020
13// Update Count     : 5
14//
15
16#pragma once
17
18#include <iosfwd>
19#include <memory>
20
21#include "SynTree/LinkageSpec.h"
22
23class FunctionDecl;
24
25namespace CodeGen {
26        class FixMain {
27          public :
28                static inline LinkageSpec::Spec mainLinkage() {
29                        return replace_main ? LinkageSpec::Cforall : LinkageSpec::C;
30                }
31               
32                static inline void setReplaceMain(bool val) {
33                        replace_main = val;
34                }
35
36                static void registerMain(FunctionDecl* val);
37
38                static void fix(std::ostream &os, const char* bootloader_filename);
39
40          private:
41                static bool replace_main;
42                static std::unique_ptr<FunctionDecl> main_signature;
43        };
44} // namespace CodeGen
Note: See TracBrowser for help on using the repository browser.