Changeset 90152a4 for src/CodeGen/FixNames.cc
- Timestamp:
- Aug 27, 2018, 4:40:34 PM (7 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b7c89aa
- Parents:
- f9feab8 (diff), 305581d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/FixNames.cc
rf9feab8 r90152a4 56 56 auto && name = SymTab::Mangler::mangle( mainDecl.get() ); 57 57 // std::cerr << name << std::endl; 58 return name;58 return std::move(name); 59 59 } 60 60 std::string mangle_main_args() { … … 79 79 auto&& name = SymTab::Mangler::mangle( mainDecl.get() ); 80 80 // std::cerr << name << std::endl; 81 return name;81 return std::move(name); 82 82 } 83 83 … … 118 118 int nargs = functionDecl->get_functionType()->get_parameters().size(); 119 119 if( !(nargs == 0 || nargs == 2 || nargs == 3) ) { 120 throw SemanticError("Main expected to have 0, 2 or 3 arguments\n", functionDecl);120 SemanticError(functionDecl, "Main expected to have 0, 2 or 3 arguments\n"); 121 121 } 122 122 functionDecl->get_statements()->get_kids().push_back( new ReturnStmt( new ConstantExpr( Constant::from_int( 0 ) ) ) );
Note:
See TracChangeset
for help on using the changeset viewer.