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

Bill Wendling isanbard at gmail.com
Mon Jul 11 18:16:47 PDT 2011


Author: void
Date: Mon Jul 11 20:16:47 2011
New Revision: 134950

URL: http://llvm.org/viewvc/llvm-project?rev=134950&view=rev
Log:
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


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=134950&r1=134949&r2=134950&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Mon Jul 11 20:16:47 2011
@@ -1614,8 +1614,10 @@
 
 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 @@
   }
 
   // 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 @@
   }
 
   // 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 =





More information about the cfe-commits mailing list