Changeset 0270824 for src/main.cc
- Timestamp:
- Jan 12, 2017, 11:31:57 AM (8 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:
- 3fe34ae
- Parents:
- 075734f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main.cc
r075734f r0270824 14 14 // 15 15 16 #include <memory> 16 17 #include <iostream> 17 18 #include <fstream> … … 78 79 static void dump( list< Declaration * > & translationUnit, ostream & out = cout ); 79 80 81 std::unique_ptr<FunctionDecl> translation_unit_main_signature = nullptr; 82 80 83 static void backtrace( int start ) { // skip first N stack frames 81 84 enum { Frames = 50 }; … … 299 302 300 303 CodeGen::generate( translationUnit, *output, ! noprotop ); 304 305 if( translation_unit_main_signature ) { 306 *output << "int main(int argc, char** argv) { return "; 307 308 *output << translation_unit_main_signature->get_scopedMangleName() << "("; 309 if(translation_unit_main_signature->get_functionType()->get_parameters().size() != 0){ 310 *output << "argc, argv"; 311 } 312 *output << ");"; 313 314 *output << " }\n"; 315 } 301 316 302 317 if ( output != &cout ) {
Note: See TracChangeset
for help on using the changeset viewer.