Changeset 37f0da8 for src/GenPoly/GenPoly.h
- Timestamp:
- Apr 14, 2016, 3:23:53 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 0f9e4403, 347c42f, 70a06f6
- Parents:
- 37218fc (diff), baba5d8 (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/GenPoly/GenPoly.h
r37218fc r37f0da8 17 17 #define GENPOLY_H 18 18 19 #include <map>20 19 #include <string> 21 20 #include <iostream> 22 21 #include <utility> 22 23 #include "ErasableScopedMap.h" 24 25 #include "SymTab/Mangler.h" 23 26 24 27 #include "SynTree/Declaration.h" … … 27 30 28 31 namespace GenPoly { 29 typedef std::map< std::string, TypeDecl::Kind > TyVarMap;32 typedef ErasableScopedMap< std::string, TypeDecl::Kind > TyVarMap; 30 33 31 34 /// A function needs an adapter if it returns a polymorphic value or if any of its … … 69 72 void printTyVarMap( std::ostream &os, const TyVarMap &tyVarMap ); 70 73 71 /// Gets the name of the sizeof parameter for the type 72 std::string sizeofName( Type *ty ); 74 /// Gets the mangled name of this type; alias for SymTab::Mangler::mangleType(). 75 inline std::string mangleType( Type *ty ) { return SymTab::Mangler::mangleType( ty ); } 76 77 /// Gets the name of the sizeof parameter for the type, given its mangled name 78 inline std::string sizeofName( const std::string &name ) { return std::string( "_sizeof_" ) + name; } 73 79 74 /// Gets the name of the alignof parameter for the type 75 std::string alignofName( Type *ty );80 /// Gets the name of the alignof parameter for the type, given its mangled name 81 inline std::string alignofName( const std::string &name ) { return std::string( "_alignof_" ) + name; } 76 82 77 /// Gets the name of the offsetof parameter for the type 78 std::string offsetofName( Type *ty ); 83 /// Gets the name of the offsetof parameter for the type, given its mangled name 84 inline std::string offsetofName( const std::string &name ) { return std::string( "_offsetof_" ) + name; } 85 86 /// Gets the name of the layout function for a given aggregate type, given its declaration 87 inline std::string layoutofName( AggregateDecl *decl ) { return std::string( "_layoutof_" ) + decl->get_name(); } 88 79 89 } // namespace GenPoly 80 90
Note: See TracChangeset
for help on using the changeset viewer.