aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-07-12 01:16:47 +0000
committerBill Wendling <isanbard@gmail.com>2011-07-12 01:16:47 +0000
commite455f1c32b9b35e28d2a4ab49beccb62f0d8d79d (patch)
treec58ca1863577f44ee92b0df5b8f9895a94e039ae /lib/CodeGen/CodeGenModule.cpp
parentccafadb68f5a8132a4ee23f441cf5d6976a4133b (diff)
Revert r134888 (and related patches in other trees). It was causing
an assert on Darwin llvm-gcc builds. Assertion failed: (castIsValid(op, S, Ty) && "Invalid cast!"), function Create, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.llvm-gcc-i386-darwin9-RA/llvm.src/lib/VMCore/Instructions.cpp, line 2067. etc. http://smooshlab.apple.com:8013/builders/llvm-gcc-i386-darwin9-RA/builds/2354 --- Reverse-merging r134888 into '.': U lib/CodeGen/CodeGenModule.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134950 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index e40d146bc0..95d7be5392 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -1614,8 +1614,10 @@ llvm::Value *CodeGenModule::getBuiltinLibFunction(const FunctionDecl *FD,
llvm::Function *CodeGenModule::getIntrinsic(unsigned IID, llvm::Type **Tys,
unsigned NumTys) {
- return llvm::Intrinsic::getDeclaration(&getModule(), (llvm::Intrinsic::ID)IID,
- Tys, NumTys);
+ return llvm::Intrinsic::getDeclaration(&getModule(),
+ (llvm::Intrinsic::ID)IID,
+ const_cast<const llvm::Type **>(Tys),
+ NumTys);
}
static llvm::StringMapEntry<llvm::Constant*> &
@@ -2293,7 +2295,7 @@ llvm::Constant *CodeGenModule::getBlockObjectDispose() {
}
// Otherwise construct the function by hand.
- llvm::Type *args[] = { Int8PtrTy, Int32Ty };
+ const llvm::Type *args[] = { Int8PtrTy, Int32Ty };
const llvm::FunctionType *fty
= llvm::FunctionType::get(VoidTy, args, false);
return BlockObjectDispose =
@@ -2312,7 +2314,7 @@ llvm::Constant *CodeGenModule::getBlockObjectAssign() {
}
// Otherwise construct the function by hand.
- llvm::Type *args[] = { Int8PtrTy, Int8PtrTy, Int32Ty };
+ const llvm::Type *args[] = { Int8PtrTy, Int8PtrTy, Int32Ty };
const llvm::FunctionType *fty
= llvm::FunctionType::get(VoidTy, args, false);
return BlockObjectAssign =