Changeset 1fbab5a for src/CodeGen
- Timestamp:
- Mar 16, 2017, 4:50:08 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:
- 395fc37, 64ac636, ef42b143
- Parents:
- 2f26687a (diff), d6d747d (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. - Location:
- src/CodeGen
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r2f26687a r1fbab5a 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Mar 13 23:56:59 201713 // Update Count : 4 7712 // Last Modified On : Thu Mar 16 09:09:09 2017 13 // Update Count : 480 14 14 // 15 15 … … 134 134 135 135 handleStorageClass( functionDecl ); 136 DeclarationNode::print_FuncSpec( output, functionDecl->get_funcSpec());136 functionDecl->get_funcSpec().print( output ); 137 137 138 138 output << genType( functionDecl->get_functionType(), mangleName( functionDecl ), pretty ); … … 895 895 896 896 void CodeGenerator::handleStorageClass( DeclarationWithType * decl ) { 897 if ( decl->get_storageClasses(). val != 0) {898 DeclarationNode::print_StorageClass( output, decl->get_storageClasses());897 if ( decl->get_storageClasses().any() ) { 898 decl->get_storageClasses().print( output ); 899 899 } // if 900 900 } // CodeGenerator::handleStorageClass -
src/CodeGen/FixNames.cc
r2f26687a r1fbab5a 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Mar 6 23:32:08201713 // Update Count : 1 512 // Last Modified On : Thu Mar 16 07:50:30 2017 13 // Update Count : 16 14 14 // 15 15 … … 39 39 std::string mangle_main() { 40 40 FunctionType* main_type; 41 std::unique_ptr<FunctionDecl> mainDecl { new FunctionDecl( "main", DeclarationNode::StorageClasses(), LinkageSpec::Cforall,41 std::unique_ptr<FunctionDecl> mainDecl { new FunctionDecl( "main", Type::StorageClasses(), LinkageSpec::Cforall, 42 42 main_type = new FunctionType( Type::Qualifiers(), true ), nullptr ) 43 43 }; 44 44 main_type->get_returnVals().push_back( 45 new ObjectDecl( "", DeclarationNode::StorageClasses(), LinkageSpec::Cforall, 0, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), nullptr )45 new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, 0, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), nullptr ) 46 46 ); 47 47 … … 52 52 std::string mangle_main_args() { 53 53 FunctionType* main_type; 54 std::unique_ptr<FunctionDecl> mainDecl { new FunctionDecl( "main", DeclarationNode::StorageClasses(), LinkageSpec::Cforall,54 std::unique_ptr<FunctionDecl> mainDecl { new FunctionDecl( "main", Type::StorageClasses(), LinkageSpec::Cforall, 55 55 main_type = new FunctionType( Type::Qualifiers(), false ), nullptr ) 56 56 }; 57 57 main_type->get_returnVals().push_back( 58 new ObjectDecl( "", DeclarationNode::StorageClasses(), LinkageSpec::Cforall, 0, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), nullptr )58 new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, 0, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), nullptr ) 59 59 ); 60 60 61 61 mainDecl->get_functionType()->get_parameters().push_back( 62 new ObjectDecl( "", DeclarationNode::StorageClasses(), LinkageSpec::Cforall, 0, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), nullptr )62 new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, 0, new BasicType( Type::Qualifiers(), BasicType::SignedInt ), nullptr ) 63 63 ); 64 64 65 65 mainDecl->get_functionType()->get_parameters().push_back( 66 new ObjectDecl( "", DeclarationNode::StorageClasses(), LinkageSpec::Cforall, 0,66 new ObjectDecl( "", Type::StorageClasses(), LinkageSpec::Cforall, 0, 67 67 new PointerType( Type::Qualifiers(), new PointerType( Type::Qualifiers(), new BasicType( Type::Qualifiers(), BasicType::Char ) ) ), 68 68 nullptr )
Note:
See TracChangeset
for help on using the changeset viewer.