source: src/CodeGen/FixMain.h @ bffcd66

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

remove file TypeVar?.h* and put TypeVar::Kind into TypeDecl?, move LinkageSpec?.* from directory Parse to SynTree?

  • Property mode set to 100644
File size: 987 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 : Fri Dec 13 23:12:21 2019
13// Update Count     : 3
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};
Note: See TracBrowser for help on using the repository browser.