relax some types
authorChris Lattner <sabre@nondot.org>
Sun, 7 Jan 2007 06:58:05 +0000 (06:58 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 7 Jan 2007 06:58:05 +0000 (06:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32980 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp
lib/Transforms/Scalar/LowerGC.cpp

index 66fbe1482d996d4fa8ea5d0a6b131072a0d3224a..ccc4a9cc8649bf8a8b4deb5e3978fe5bb38f5f3f 100644 (file)
@@ -3552,8 +3552,7 @@ Instruction *InstCombiner::MatchBSwap(BinaryOperator &I) {
     FnName = "llvm.bswap.i64";
   else
     assert(0 && "Unknown integer type!");
-  Function *F = M->getOrInsertFunction(FnName, I.getType(), I.getType(), NULL);
-  
+  Constant *F = M->getOrInsertFunction(FnName, I.getType(), I.getType(), NULL);
   return new CallInst(F, V);
 }
 
@@ -6953,7 +6952,7 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
             Name = "llvm.memcpy.i32";
           else
             Name = "llvm.memcpy.i64";
-          Function *MemCpy = M->getOrInsertFunction(Name,
+          Constant *MemCpy = M->getOrInsertFunction(Name,
                                      CI.getCalledFunction()->getFunctionType());
           CI.setOperand(0, MemCpy);
           Changed = true;
index e0d6933821f6c1efbda80c0181faf9f784abb19d..fa06bd0dfcbf32315656457aa56bd7da57ceffdd 100644 (file)
@@ -37,7 +37,7 @@ namespace {
 
     /// GCRead/GCWrite - These are the functions provided by the garbage
     /// collector for read/write barriers.
-    Function *GCRead, *GCWrite;
+    Constant *GCRead, *GCWrite;
 
     /// RootChain - This is the global linked-list that contains the chain of GC
     /// roots.