[cfe-commits] r127405 - /cfe/trunk/lib/CodeGen/CGCall.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Thu Mar 10 06:02:21 PST 2011
Author: chapuni
Date: Thu Mar 10 08:02:21 2011
New Revision: 127405
URL: http://llvm.org/viewvc/llvm-project?rev=127405&view=rev
Log:
lib/CodeGen/CGCall.cpp: Don't invoke multiple Builder.CreateBitCast() on Builder.CreateMemCpy. Or we would see sideeffect incompatibility among gcc and clang.
Modified:
cfe/trunk/lib/CodeGen/CGCall.cpp
Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=127405&r1=127404&r2=127405&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Thu Mar 10 08:02:21 2011
@@ -909,8 +909,10 @@
// copy.
const llvm::Type *I8PtrTy = Builder.getInt8PtrTy();
CharUnits Size = getContext().getTypeSizeInChars(Ty);
- Builder.CreateMemCpy(Builder.CreateBitCast(AlignedTemp, I8PtrTy),
- Builder.CreateBitCast(V, I8PtrTy),
+ llvm::Value *Dst = Builder.CreateBitCast(AlignedTemp, I8PtrTy);
+ llvm::Value *Src = Builder.CreateBitCast(V, I8PtrTy);
+ Builder.CreateMemCpy(Dst,
+ Src,
llvm::ConstantInt::get(IntPtrTy,
Size.getQuantity()),
ArgI.getIndirectAlign(),
More information about the cfe-commits
mailing list