[cfe-commits] r123401 - in /cfe/trunk: clang.xcodeproj/project.pbxproj lib/CodeGen/CGDeclCXX.cpp
Fariborz Jahanian
fjahanian at apple.com
Thu Jan 13 13:35:27 PST 2011
Author: fjahanian
Date: Thu Jan 13 15:35:27 2011
New Revision: 123401
URL: http://llvm.org/viewvc/llvm-project?rev=123401&view=rev
Log:
Save getObjCGCAttrKind and use it in two places
for efficiancy (still part of //rdar://8761767).
Per John's comment.
Modified:
cfe/trunk/clang.xcodeproj/project.pbxproj
cfe/trunk/lib/CodeGen/CGDeclCXX.cpp
Modified: cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=123401&r1=123400&r2=123401&view=diff
==============================================================================
--- cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/trunk/clang.xcodeproj/project.pbxproj Thu Jan 13 15:35:27 2011
@@ -2065,7 +2065,6 @@
isa = PBXProject;
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
compatibilityVersion = "Xcode 2.4";
- developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Modified: cfe/trunk/lib/CodeGen/CGDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDeclCXX.cpp?rev=123401&r1=123400&r2=123401&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDeclCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDeclCXX.cpp Thu Jan 13 15:35:27 2011
@@ -36,10 +36,11 @@
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);
More information about the cfe-commits
mailing list