Changeset 3fe34ae for src/SynTree
- Timestamp:
- Jan 12, 2017, 2:05:03 PM (9 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:
- 7cc2c8d, 981bdc6
- Parents:
- 0270824
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/FunctionDecl.cc
r0270824 r3fe34ae 23 23 #include "InitTweak/InitTweak.h" 24 24 25 extern bool translation_unit_nomain; 26 25 27 FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn, std::list< Attribute * > attributes ) 26 28 : Parent( name, sc, linkage, attributes ), type( type ), statements( statements ) { … … 30 32 // because we want to replace the main even if it is inside an extern 31 33 if ( name == "main" ) { 32 set_linkage( LinkageSpec::Cforall );34 set_linkage( translation_unit_nomain ? LinkageSpec::C : LinkageSpec::Cforall ); 33 35 } // if 34 36 }
Note:
See TracChangeset
for help on using the changeset viewer.