source: src/CodeGen/FixMain.h@ 27316b4

Last change on this file since 27316b4 was c6b4432, checked in by Andrew Beach <ajbeach@…>, 2 years ago

Remove BaseSyntaxNode and clean-up.

  • Property mode set to 100644
File size: 1.0 KB
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 : Andrew Beach
12// Last Modified On : Fri Oct 29 16:20:00 2021
13// Update Count : 8
14//
15
16#pragma once
17
18#include <iosfwd>
19#include <memory>
20#include <list>
21
22#include "AST/LinkageSpec.hpp"
23
24namespace ast {
25 class FunctionDecl;
26 class TranslationUnit;
27}
28
29namespace CodeGen {
30
31class FixMain {
32public :
33 static inline ast::Linkage::Spec getMainLinkage() {
34 return replace_main ? ast::Linkage::Cforall : ast::Linkage::C;
35 }
36
37 static inline void setReplaceMain(bool val) {
38 replace_main = val;
39 }
40
41 static bool isMain(const ast::FunctionDecl * decl);
42
43 static void fix( ast::TranslationUnit & translationUnit,
44 std::ostream &os, const char * bootloader_filename );
45
46private:
47 static bool replace_main;
48};
49
50} // namespace CodeGen
Note: See TracBrowser for help on using the repository browser.