aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-18 22:58:38 +0000
committerChris Lattner <sabre@nondot.org>2009-02-18 22:58:38 +0000
commit3b6b83b8311ecdfa43cbb37ccc38c107d3b8d88b (patch)
treed5206e3ced2a889fa93a15fd9f011c2f4e3d1aa1
parentbb8c5aaa10643db9a97af6dc43f646656c3a75f7 (diff)
minor name changes, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64972 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/AST/Type.cpp6
-rw-r--r--lib/Sema/SemaType.cpp10
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index 6c72a76a60..53363c15ec 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -1053,13 +1053,13 @@ void ComplexType::getAsStringInternal(std::string &S) const {
}
void ExtQualType::getAsStringInternal(std::string &S) const {
- bool space = false;
+ bool NeedsSpace = false;
if (AddressSpace) {
S = "__attribute__((address_space("+llvm::utostr_32(AddressSpace)+")))" + S;
- space = true;
+ NeedsSpace = true;
}
if (GCAttrType != QualType::GCNone) {
- if (space)
+ if (NeedsSpace)
S += ' ';
S += "__attribute__((objc_gc(";
if (GCAttrType == QualType::Weak)
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp
index dfd024b31e..f0e6c81fdc 100644
--- a/lib/Sema/SemaType.cpp
+++ b/lib/Sema/SemaType.cpp
@@ -778,7 +778,7 @@ static void HandleAddressSpaceTypeAttribute(QualType &Type,
/// HandleObjCGCTypeAttribute - Process an objc's gc attribute on the
/// specified type. The attribute contains 1 argument, weak or strong.
static void HandleObjCGCTypeAttribute(QualType &Type,
- const AttributeList &Attr, Sema &S){
+ const AttributeList &Attr, Sema &S) {
// FIXME. change error code.
if (Type.getObjCGCAttr() != QualType::GCNone) {
S.Diag(Attr.getLoc(), diag::err_attribute_multiple_objc_gc);
@@ -791,22 +791,22 @@ static void HandleObjCGCTypeAttribute(QualType &Type,
<< "objc_gc" << 1;
return;
}
- QualType::GCAttrTypes attr;
+ QualType::GCAttrTypes GCAttr;
if (Attr.getNumArgs() != 0) {
S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 1;
return;
}
if (Attr.getParameterName()->isStr("weak"))
- attr = QualType::Weak;
+ GCAttr = QualType::Weak;
else if (Attr.getParameterName()->isStr("strong"))
- attr = QualType::Strong;
+ GCAttr = QualType::Strong;
else {
S.Diag(Attr.getLoc(), diag::warn_attribute_type_not_supported)
<< "objc_gc" << Attr.getParameterName();
return;
}
- Type = S.Context.getObjCGCQualType(Type, attr);
+ Type = S.Context.getObjCGCQualType(Type, GCAttr);
}
void Sema::ProcessTypeAttributeList(QualType &Result, const AttributeList *AL) {