Second attempt at de-constifying LLVM Types in FunctionType::get(),

StructType::get() and TargetData::getIntPtrType().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134982 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jay Foad 2011-07-12 14:06:48 +00:00
Родитель a98742c32c
Коммит df983a8bcb
1 изменённых файлов: 4 добавлений и 6 удалений

Просмотреть файл

@ -1614,10 +1614,8 @@ 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,
const_cast<const llvm::Type **>(Tys),
NumTys);
return llvm::Intrinsic::getDeclaration(&getModule(), (llvm::Intrinsic::ID)IID,
Tys, NumTys);
}
static llvm::StringMapEntry<llvm::Constant*> &
@ -2295,7 +2293,7 @@ llvm::Constant *CodeGenModule::getBlockObjectDispose() {
}
// Otherwise construct the function by hand.
const llvm::Type *args[] = { Int8PtrTy, Int32Ty };
llvm::Type *args[] = { Int8PtrTy, Int32Ty };
const llvm::FunctionType *fty
= llvm::FunctionType::get(VoidTy, args, false);
return BlockObjectDispose =
@ -2314,7 +2312,7 @@ llvm::Constant *CodeGenModule::getBlockObjectAssign() {
}
// Otherwise construct the function by hand.
const llvm::Type *args[] = { Int8PtrTy, Int8PtrTy, Int32Ty };
llvm::Type *args[] = { Int8PtrTy, Int8PtrTy, Int32Ty };
const llvm::FunctionType *fty
= llvm::FunctionType::get(VoidTy, args, false);
return BlockObjectAssign =