Changeset b2e2e34 for src/SynTree
- Timestamp:
- Sep 12, 2017, 4:08:01 PM (8 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, stuck-waitfor-destruct, with_gc
- Children:
- c935c3a
- Parents:
- 21a1efb (diff), a46478a (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/SynTree
- Files:
-
- 2 edited
-
BasicType.cc (modified) (2 diffs)
-
Type.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/BasicType.cc
r21a1efb rb2e2e34 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Feb 1 17:12:15 201713 // Update Count : 812 // Last Modified On : Mon Sep 11 12:52:05 2017 13 // Update Count : 9 14 14 // 15 15 … … 25 25 26 26 void BasicType::print( std::ostream &os, int indent ) const { 27 static const char *kindNames[] = {28 "_Bool", "char", "signed char", "unsigned char", "short signed int", "short unsigned int",29 "signed int", "unsigned int", "long signed int", "long unsigned int", "long long signed int",30 "long long unsigned int", "float", "double", "long double", "float _Complex", "double _Complex",31 "long double _Complex", "float _Imaginary", "double _Imaginary", "long double _Imaginary"32 };33 34 27 Type::print( os, indent ); 35 os << kindNames[ kind ];28 os << BasicType::typeNames[ kind ]; 36 29 } 37 30 -
src/SynTree/Type.cc
r21a1efb rb2e2e34 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 Aug 2 11:11:00201713 // Update Count : 2911 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Sep 11 13:21:25 2017 13 // Update Count : 37 14 14 // 15 15 #include "Type.h" … … 26 26 "_Bool", 27 27 "char", 28 " char",28 "signed char", 29 29 "unsigned char", 30 "s hort",31 " short unsigned",32 " int",30 "signed short int", 31 "unsigned short int", 32 "signed int", 33 33 "unsigned int", 34 " long int",35 " long unsignedint",36 " long long int",37 " long long unsignedint",34 "signed long int", 35 "unsigned long int", 36 "signed long long int", 37 "unsigned long long int", 38 38 "float", 39 39 "double", … … 65 65 66 66 Type * Type::stripDeclarator() { 67 Type * type = this; 68 while ( Type * at = InitTweak::getPointerBase( type ) ) { 69 type = at; 70 } 67 Type * type, * at; 68 for ( type = this; (at = InitTweak::getPointerBase( type )); type = at ); 71 69 return type; 72 70 } 73 71 74 72 Type * Type::stripReferences() { 75 Type * type = this; 76 while ( ReferenceType * ref = dynamic_cast<ReferenceType *>( type ) ) { 77 type = ref->get_base(); 78 } 73 Type * type; 74 ReferenceType * ref; 75 for ( type = this; (ref = dynamic_cast<ReferenceType *>( type )); type = ref->get_base() ); 79 76 return type; 80 77 }
Note:
See TracChangeset
for help on using the changeset viewer.