diff options
Diffstat (limited to 'clang/lib/AST')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 5 | ||||
| -rw-r--r-- | clang/lib/AST/Type.cpp | 8 |
2 files changed, 5 insertions, 8 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index dec73182b81..c87b08627dd 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -725,7 +725,7 @@ QualType ASTContext::getAddrSpaceQualType(QualType T, unsigned AddressSpace) { // Check if we've already instantiated an address space qual'd type of this // type. llvm::FoldingSetNodeID ID; - ExtQualType::Profile(ID, T.getTypePtr(), AddressSpace, 0); + ExtQualType::Profile(ID, T.getTypePtr(), AddressSpace, ExtQualType::GCNone); void *InsertPos = 0; if (ExtQualType *EXTQy = ExtQualTypes.FindNodeOrInsertPos(ID, InsertPos)) return QualType(EXTQy, 0); @@ -741,8 +741,7 @@ QualType ASTContext::getAddrSpaceQualType(QualType T, unsigned AddressSpace) { assert(NewIP == 0 && "Shouldn't be in the map!"); NewIP = NewIP; } ExtQualType *New = new (*this, 8) ExtQualType(T.getTypePtr(), Canonical, - AddressSpace, 0, - ExtQualType::ASQUAL); + AddressSpace, ExtQualType::GCNone); ExtQualTypes.InsertNode(New, InsertPos); Types.push_back(New); return QualType(New, T.getCVRQualifiers()); diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp index 6aec24fdddd..bc597072edc 100644 --- a/clang/lib/AST/Type.cpp +++ b/clang/lib/AST/Type.cpp @@ -1054,17 +1054,15 @@ void ComplexType::getAsStringInternal(std::string &S) const { void ExtQualType::getAsStringInternal(std::string &S) const { bool space = false; - if (ExtQualTypeKind & ASQUAL) { + if (AddressSpace) { S = "__attribute__((address_space("+llvm::utostr_32(AddressSpace)+")))" + S; space = true; } - if (ExtQualTypeKind & GCQUAL) { + if (GCAttrType != GCNone) { if (space) S += ' '; S += "__attribute__((objc_gc("; - ObjCGCAttr *gcattr = getGCAttr(); - ObjCGCAttr::GCAttrTypes attr = gcattr->getType(); - if (attr & ObjCGCAttr::Weak) + if (GCAttrType == Weak) S += "weak"; else S += "strong"; |

