[llvm-commits] [dragonegg] r100426 - /dragonegg/trunk/llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Mon Apr 5 05:07:45 PDT 2010
Author: baldrick
Date: Mon Apr 5 07:07:45 2010
New Revision: 100426
URL: http://llvm.org/viewvc/llvm-project?rev=100426&view=rev
Log:
Port commit 100303 (wangmp) from llvm-gcc, hopefully fixing the self-host build:
Reapply patch for adding support for address spaces and added a isVolatile field to memcpy, memmove, and memset.
Modified:
dragonegg/trunk/llvm-convert.cpp
Modified: dragonegg/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-convert.cpp?rev=100426&r1=100425&r2=100426&view=diff
==============================================================================
--- dragonegg/trunk/llvm-convert.cpp (original)
+++ dragonegg/trunk/llvm-convert.cpp Mon Apr 5 07:07:45 2010
@@ -1619,15 +1619,17 @@
unsigned Align) {
const Type *SBP = Type::getInt8PtrTy(Context);
const Type *IntPtr = TD.getIntPtrType(Context);
- Value *Ops[4] = {
+ Value *Ops[5] = {
Builder.CreateBitCast(DestPtr, SBP),
Builder.CreateBitCast(SrcPtr, SBP),
Builder.CreateIntCast(Size, IntPtr, /*isSigned*/true),
- ConstantInt::get(Type::getInt32Ty(Context), Align)
+ ConstantInt::get(Type::getInt32Ty(Context), Align),
+ ConstantInt::get(Type::getInt1Ty(Context), false)
};
+ const Type *ArgTypes[3] = { SBP, SBP, IntPtr };
Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Intrinsic::memcpy,
- &IntPtr, 1), Ops, Ops+4);
+ ArgTypes, 3), Ops, Ops+5);
return Ops[0];
}
@@ -1635,15 +1637,17 @@
unsigned Align) {
const Type *SBP = Type::getInt8PtrTy(Context);
const Type *IntPtr = TD.getIntPtrType(Context);
- Value *Ops[4] = {
+ Value *Ops[5] = {
Builder.CreateBitCast(DestPtr, SBP),
Builder.CreateBitCast(SrcPtr, SBP),
Builder.CreateIntCast(Size, IntPtr, /*isSigned*/true),
- ConstantInt::get(Type::getInt32Ty(Context), Align)
+ ConstantInt::get(Type::getInt32Ty(Context), Align),
+ ConstantInt::get(Type::getInt1Ty(Context), false)
};
+ const Type *ArgTypes[3] = { SBP, SBP, IntPtr };
Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Intrinsic::memmove,
- &IntPtr, 1), Ops, Ops+4);
+ ArgTypes, 3), Ops, Ops+5);
return Ops[0];
}
@@ -1651,15 +1655,17 @@
unsigned Align) {
const Type *SBP = Type::getInt8PtrTy(Context);
const Type *IntPtr = TD.getIntPtrType(Context);
- Value *Ops[4] = {
+ Value *Ops[5] = {
Builder.CreateBitCast(DestPtr, SBP),
Builder.CreateIntCast(SrcVal, Type::getInt8Ty(Context), /*isSigned*/true),
Builder.CreateIntCast(Size, IntPtr, /*isSigned*/true),
- ConstantInt::get(Type::getInt32Ty(Context), Align)
+ ConstantInt::get(Type::getInt32Ty(Context), Align),
+ ConstantInt::get(Type::getInt1Ty(Context), false)
};
+ const Type *ArgTypes[2] = { SBP, IntPtr };
Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Intrinsic::memset,
- &IntPtr, 1), Ops, Ops+4);
+ ArgTypes, 2), Ops, Ops+5);
return Ops[0];
}
More information about the llvm-commits
mailing list