From 56cc1530eee144241e2987c4241cd8a31e07fb24 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Mon, 11 Jul 2011 07:56:41 +0000 Subject: De-constify Types in FunctionType::get(). llvm-svn: 134888 --- clang/lib/CodeGen/CodeGenModule.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 95d7be5..e40d146 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -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(Tys), - NumTys); + return llvm::Intrinsic::getDeclaration(&getModule(), (llvm::Intrinsic::ID)IID, + Tys, NumTys); } static llvm::StringMapEntry & @@ -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 = -- cgit v1.1