[llvm-branch-commits] [cfe-branch] r113220 - in /cfe/branches/Apple/whitney-IB/src/tools/clang: ./ lib/CodeGen/CGExprScalar.cpp test/CodeGenObjC/property-ref-cast-to-void.m
Daniel Dunbar
daniel at zuster.org
Tue Sep 7 10:35:13 PDT 2010
Author: ddunbar
Date: Tue Sep 7 12:35:13 2010
New Revision: 113220
URL: http://llvm.org/viewvc/llvm-project?rev=113220&view=rev
Log:
--- Merging r113079 into 'src/tools/clang':
A src/tools/clang/test/CodeGenObjC/property-ref-cast-to-void.m
U src/tools/clang/lib/CodeGen/CGExprScalar.cpp
Added:
cfe/branches/Apple/whitney-IB/src/tools/clang/test/CodeGenObjC/property-ref-cast-to-void.m
- copied unchanged from r113079, cfe/trunk/test/CodeGenObjC/property-ref-cast-to-void.m
Modified:
cfe/branches/Apple/whitney-IB/src/tools/clang/ (props changed)
cfe/branches/Apple/whitney-IB/src/tools/clang/lib/CodeGen/CGExprScalar.cpp
Propchange: cfe/branches/Apple/whitney-IB/src/tools/clang/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep 7 12:35:13 2010
@@ -1,2 +1,2 @@
-/cfe/trunk:113212
+/cfe/trunk:113079,113212
/llvm/branches/Apple/Pertwee/tools/clang:110850,110961
Modified: cfe/branches/Apple/whitney-IB/src/tools/clang/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney-IB/src/tools/clang/lib/CodeGen/CGExprScalar.cpp?rev=113220&r1=113219&r2=113220&view=diff
==============================================================================
--- cfe/branches/Apple/whitney-IB/src/tools/clang/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/branches/Apple/whitney-IB/src/tools/clang/lib/CodeGen/CGExprScalar.cpp Tue Sep 7 12:35:13 2010
@@ -1038,8 +1038,13 @@
return Builder.CreatePtrToInt(Src, ConvertType(DestTy));
}
case CK_ToVoid: {
- if (E->Classify(CGF.getContext()).isGLValue())
- CGF.EmitLValue(E);
+ if (E->Classify(CGF.getContext()).isGLValue()) {
+ LValue LV = CGF.EmitLValue(E);
+ if (LV.isPropertyRef())
+ CGF.EmitLoadOfPropertyRefLValue(LV, E->getType());
+ else if (LV.isKVCRef())
+ CGF.EmitLoadOfKVCRefLValue(LV, E->getType());
+ }
else
CGF.EmitAnyExpr(E, 0, false, true);
return 0;
More information about the llvm-branch-commits
mailing list