Simplified ExtQualType per Chris's feedback.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64820 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index 6aec24f..bc59707 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -1054,17 +1054,15 @@
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";