source: src/CodeGen/FixMain.h@ 6182039

ADT aaron-thesis arm-eh ast-experimental cleanup-dtors deferred_resn demangler enum forall-pointer-decay jacob/cs343-translation jenkins-sandbox new-ast new-ast-unique-expr new-env no_list persistent-indexer pthread-emulation qualifiedEnum resolv-new with_gc
Last change on this file since 6182039 was 13de47bc, checked in by Thierry Delisle <tdelisle@…>, 9 years ago

Proper bootloader boilerplate implemented

  • Property mode set to 100644
File size: 991 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 :
12// Last Modified On :
13// Update Count : 0
14//
15
16#ifndef FIXMAIN_H
17#define FIXMAIN_H
18
19#include <iosfwd>
20#include <memory>
21
22#include "Parser/LinkageSpec.h"
23
24class FunctionDecl;
25
26namespace CodeGen {
27 class FixMain {
28 public :
29 static inline LinkageSpec::Spec mainLinkage() {
30 return replace_main ? LinkageSpec::Cforall : LinkageSpec::C;
31 }
32
33 static inline void setReplaceMain(bool val) {
34 replace_main = val;
35 }
36
37 static void registerMain(FunctionDecl* val);
38
39 static void fix(std::ostream &os, const char* bootloader_filename);
40
41 private:
42 static bool replace_main;
43 static std::unique_ptr<FunctionDecl> main_signature;
44 };
45};
46
47#endif //FIXMAIN_H
Note: See TracBrowser for help on using the repository browser.