[cfe-commits] r82735 - /cfe/trunk/lib/CodeGen/CGExpr.cpp
Fariborz Jahanian
fjahanian at apple.com
Thu Sep 24 17:00:20 PDT 2009
Author: fjahanian
Date: Thu Sep 24 19:00:20 2009
New Revision: 82735
URL: http://llvm.org/viewvc/llvm-project?rev=82735&view=rev
Log:
Fixed another code gen bug in objc's new write-barrier API.
Modified:
cfe/trunk/lib/CodeGen/CGExpr.cpp
Modified: cfe/trunk/lib/CodeGen/CGExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExpr.cpp?rev=82735&r1=82734&r2=82735&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExpr.cpp Thu Sep 24 19:00:20 2009
@@ -494,11 +494,12 @@
assert(Dst.getBaseIvarExp() && "BaseIvarExp is NULL");
const llvm::Type *ResultType = ConvertType(getContext().LongTy);
llvm::Value *RHS = EmitScalarExpr(Dst.getBaseIvarExp());
+ llvm::Value *dst = RHS;
RHS = Builder.CreatePtrToInt(RHS, ResultType, "sub.ptr.rhs.cast");
llvm::Value *LHS =
Builder.CreatePtrToInt(LvalueDst, ResultType, "sub.ptr.lhs.cast");
llvm::Value *BytesBetween = Builder.CreateSub(LHS, RHS, "ivar.offset");
- CGM.getObjCRuntime().EmitObjCIvarAssign(*this, src, LvalueDst,
+ CGM.getObjCRuntime().EmitObjCIvarAssign(*this, src, dst,
BytesBetween);
}
else if (Dst.isGlobalObjCRef())
More information about the cfe-commits
mailing list