Changes in src/CodeGen/CodeGenerator.cc [1931bb01:9939dc3]
- File:
-
- 1 edited
-
src/CodeGen/CodeGenerator.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r1931bb01 r9939dc3 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Wed Jun 29 14:34:00 202213 // Update Count : 54 211 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Feb 2 20:30:30 2022 13 // Update Count : 541 14 14 // 15 15 #include "CodeGenerator.h" … … 18 18 #include <list> // for _List_iterator, list, list<>::it... 19 19 20 #include "AST/Decl.hpp" // for DeclWithType21 20 #include "Common/UniqueName.h" // for UniqueName 22 21 #include "Common/utility.h" // for CodeLocation, toString … … 295 294 } else { 296 295 if ( obj->get_init() ) { 297 obj->get_init()->accept( *visitor ); 296 obj->get_init()->accept( *visitor ); 298 297 } else { 299 298 // Should not reach here! … … 684 683 extension( variableExpr ); 685 684 const OperatorInfo * opInfo; 686 if( dynamic_cast<ZeroType*>( variableExpr->get_var()->get_type() ) ) { 687 output << "0"; 688 } else if ( variableExpr->get_var()->get_linkage() == LinkageSpec::Intrinsic && (opInfo = operatorLookup( variableExpr->get_var()->get_name() )) && opInfo->type == OT_CONSTANT ) { 685 if ( variableExpr->get_var()->get_linkage() == LinkageSpec::Intrinsic && (opInfo = operatorLookup( variableExpr->get_var()->get_name() )) && opInfo->type == OT_CONSTANT ) { 689 686 output << opInfo->symbol; 690 687 } else { 691 // if (dynamic_cast<EnumInstType *>(variableExpr->get_var()->get_type()) 688 // if (dynamic_cast<EnumInstType *>(variableExpr->get_var()->get_type()) 692 689 // && dynamic_cast<EnumInstType *>(variableExpr->get_var()->get_type())->baseEnum->base) { 693 690 // output << '(' <<genType(dynamic_cast<EnumInstType *>(variableExpr->get_var()->get_type())->baseEnum->base, "", options) << ')'; … … 1239 1236 } // if 1240 1237 } 1241 1242 std::string genName( ast::DeclWithType const * decl ) {1243 if ( const OperatorInfo * opInfo = operatorLookup( decl->name ) ) {1244 return opInfo->outputName;1245 } else {1246 return decl->name;1247 }1248 }1249 1250 1238 } // namespace CodeGen 1251 1239
Note:
See TracChangeset
for help on using the changeset viewer.