[cfe-commits] r134982 - /cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Jay Foad jay.foad at gmail.com
Tue Jul 12 07:06:49 PDT 2011


Author: foad
Date: Tue Jul 12 09:06:48 2011
New Revision: 134982

URL: http://llvm.org/viewvc/llvm-project?rev=134982&view=rev
Log:
Second attempt at de-constifying LLVM Types in FunctionType::get(),
StructType::get() and TargetData::getIntPtrType().

Modified:
    cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=134982&r1=134981&r2=134982&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Tue Jul 12 09:06:48 2011
@@ -1614,10 +1614,8 @@
 
 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 @@
   }
 
   // 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 @@
   }
 
   // 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 =





More information about the cfe-commits mailing list