summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-01-13 21:35:27 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-01-13 21:35:27 +0000
commitf59e80e0ed35679cbe80546a69f8f8f44a1eb03a (patch)
treee3378f192abde64c605f0b6d51dc75b3094ccd4d
parent05a0b55e76a33f604c1e28d2b4ff3cfdca927ad2 (diff)
downloadbcm5719-llvm-f59e80e0ed35679cbe80546a69f8f8f44a1eb03a.tar.gz
bcm5719-llvm-f59e80e0ed35679cbe80546a69f8f8f44a1eb03a.zip
Save getObjCGCAttrKind and use it in two places
for efficiancy (still part of //rdar://8761767). Per John's comment. llvm-svn: 123401
-rw-r--r--clang/clang.xcodeproj/project.pbxproj1
-rw-r--r--clang/lib/CodeGen/CGDeclCXX.cpp5
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/clang.xcodeproj/project.pbxproj b/clang/clang.xcodeproj/project.pbxproj
index d7b97b7ac22..10b307365c6 100644
--- a/clang/clang.xcodeproj/project.pbxproj
+++ b/clang/clang.xcodeproj/project.pbxproj
@@ -2065,7 +2065,6 @@
isa = PBXProject;
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
compatibilityVersion = "Xcode 2.4";
- developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
diff --git a/clang/lib/CodeGen/CGDeclCXX.cpp b/clang/lib/CodeGen/CGDeclCXX.cpp
index 84e03446f66..8b2d6f5e669 100644
--- a/clang/lib/CodeGen/CGDeclCXX.cpp
+++ b/clang/lib/CodeGen/CGDeclCXX.cpp
@@ -36,10 +36,11 @@ static void EmitDeclInit(CodeGenFunction &CGF, const VarDecl &D,
if (!CGF.hasAggregateLLVMType(T)) {
llvm::Value *V = CGF.EmitScalarExpr(Init);
CodeGenModule &CGM = CGF.CGM;
- if (CGF.getContext().getObjCGCAttrKind(T) == Qualifiers::Strong)
+ Qualifiers::GC GCAttr = CGM.getContext().getObjCGCAttrKind(T);
+ if (GCAttr == Qualifiers::Strong)
CGM.getObjCRuntime().EmitObjCGlobalAssign(CGF, V, DeclPtr,
D.isThreadSpecified());
- else if (CGF.getContext().getObjCGCAttrKind(T) == Qualifiers::Weak)
+ else if (GCAttr == Qualifiers::Weak)
CGM.getObjCRuntime().EmitObjCWeakAssign(CGF, V, DeclPtr);
else
CGF.EmitStoreOfScalar(V, DeclPtr, isVolatile, Alignment, T);
OpenPOWER on IntegriCloud