Changes in src/SynTree/FunctionDecl.cc [faddbd8:3fe34ae]
- File:
-
- 1 edited
-
src/SynTree/FunctionDecl.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/FunctionDecl.cc
rfaddbd8 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 ) { 27 29 set_isInline( isInline ); 28 30 set_isNoreturn( isNoreturn ); 29 // this is a brazen hack to force the function "main" to have C linkage 31 // this is a brazen hack to force the function "main" to have Cforall linkage 32 // because we want to replace the main even if it is inside an extern 30 33 if ( name == "main" ) { 31 set_linkage( LinkageSpec::C);34 set_linkage( translation_unit_nomain ? LinkageSpec::C : LinkageSpec::Cforall ); 32 35 } // if 33 36 }
Note:
See TracChangeset
for help on using the changeset viewer.