Changeset bf2438c for src/CodeGen/FixMain.cc
- Timestamp:
- Jul 11, 2017, 3:06:40 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- fcab269
- Parents:
- fab6ded
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/FixMain.cc
rfab6ded rbf2438c 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // FixMain.cc -- 7 // FixMain.cc -- 8 8 // 9 9 // Author : Thierry Delisle 10 10 // Created On : Thr Jan 12 14:11:09 2017 11 // Last Modified By : 12 // Last Modified On : 11 // Last Modified By : 12 // Last Modified On : 13 13 // Update Count : 0 14 14 // 15 15 16 16 17 #include "FixMain.h" 17 #include "FixMain.h" 18 18 19 #include <fstream> 20 #include <iostream> 19 #include <cassert> // for assert, assertf 20 #include <fstream> // for operator<<, basic_ostream::operator<< 21 #include <list> // for list 22 #include <string> // for operator<< 21 23 22 #include "Common/SemanticError.h" 23 #include "SynTree/Declaration.h" 24 #include "Common/SemanticError.h" // for SemanticError 25 #include "SynTree/Declaration.h" // for FunctionDecl, operator<< 26 #include "SynTree/Type.h" // for FunctionType 24 27 25 28 namespace CodeGen { 26 29 bool FixMain::replace_main = false; 27 30 std::unique_ptr<FunctionDecl> FixMain::main_signature = nullptr; 28 29 void FixMain::registerMain(FunctionDecl* functionDecl) 31 32 void FixMain::registerMain(FunctionDecl* functionDecl) 30 33 { 31 if(main_signature) { 32 throw SemanticError("Multiple definition of main routine\n", functionDecl); 34 if(main_signature) { 35 throw SemanticError("Multiple definition of main routine\n", functionDecl); 33 36 } 34 37 main_signature.reset( functionDecl->clone() );
Note: See TracChangeset
for help on using the changeset viewer.