source: src/CodeGen/FixMain.h @ 6926a6d

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumwith_gc
Last change on this file since 6926a6d was 6b0b624, checked in by Peter A. Buhr <pabuhr@…>, 7 years ago

change #ifndef to #pragma once

  • Property mode set to 100644
File size: 986 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 Jul 21 22:16:59 2017
13// Update Count     : 1
14//
15
16#pragma once
17
18#include <iosfwd>
19#include <memory>
20
21#include "Parser/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.