Changeset 1931bb01 for src/CodeGen
- Timestamp:
- Jul 12, 2022, 3:21:18 PM (22 months ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- b9f8274
- Parents:
- 9c6443e
- Location:
- src/CodeGen
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r9c6443e r1931bb01 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Wed Feb 2 20:30:30 202213 // Update Count : 54 111 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Jun 29 14:34:00 2022 13 // Update Count : 542 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 DeclWithType 20 21 #include "Common/UniqueName.h" // for UniqueName 21 22 #include "Common/utility.h" // for CodeLocation, toString … … 1238 1239 } // if 1239 1240 } 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 1240 1250 } // namespace CodeGen 1241 1251 -
src/CodeGen/CodeGenerator.h
r9c6443e r1931bb01 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Tue Feb 1 09:23:21202213 // Update Count : 6 411 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Jun 29 14:32:00 2022 13 // Update Count : 65 14 14 // 15 15 … … 26 26 #include "SynTree/Visitor.h" // for Visitor 27 27 #include "SynTree/SynTree.h" // for Visitor Nodes 28 29 namespace ast { 30 class DeclWithType; 31 } 28 32 29 33 namespace CodeGen { … … 182 186 /// returns C-compatible name of declaration 183 187 std::string genName( DeclarationWithType * decl ); 188 std::string genName( ast::DeclWithType const * decl ); 184 189 185 190 inline std::ostream & operator<<( std::ostream & os, const CodeGenerator::LineEnder & endl ) { -
src/CodeGen/GenType.cc
r9c6443e r1931bb01 254 254 255 255 void GenType::postvisit( EnumInstType * enumInst ) { 256 if ( enumInst->baseEnum ->base ) {256 if ( enumInst->baseEnum && enumInst->baseEnum->base ) { 257 257 typeString = genType(enumInst->baseEnum->base, "", options) + typeString; 258 258 } else {
Note: See TracChangeset
for help on using the changeset viewer.