[llvm-commits] [llvm] r50952 - /llvm/trunk/include/llvm/Instructions.h

Bill Wendling isanbard at gmail.com
Sat May 10 12:59:59 PDT 2008


Author: void
Date: Sat May 10 14:59:59 2008
New Revision: 50952

URL: http://llvm.org/viewvc/llvm-project?rev=50952&view=rev
Log:
Remove warnings when using -Wshorten-64-to-32.

Modified:
    llvm/trunk/include/llvm/Instructions.h

Modified: llvm/trunk/include/llvm/Instructions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instructions.h?rev=50952&r1=50951&r2=50952&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Instructions.h (original)
+++ llvm/trunk/include/llvm/Instructions.h Sat May 10 14:59:59 2008
@@ -960,14 +960,14 @@
                           InputIterator ArgBegin, InputIterator ArgEnd,
                           const std::string &Name = "",
                           Instruction *InsertBefore = 0) {
-    return new(ArgEnd - ArgBegin + 1)
+    return new((unsigned)(ArgEnd - ArgBegin + 1))
       CallInst(Func, ArgBegin, ArgEnd, Name, InsertBefore);
   }
   template<typename InputIterator>
   static CallInst *Create(Value *Func,
                           InputIterator ArgBegin, InputIterator ArgEnd,
                           const std::string &Name, BasicBlock *InsertAtEnd) {
-    return new(ArgEnd - ArgBegin + 1)
+    return new((unsigned)(ArgEnd - ArgBegin + 1))
       CallInst(Func, ArgBegin, ArgEnd, Name, InsertAtEnd);
   }
   static CallInst *Create(Value *F, Value *Actual, const std::string& Name = "",
@@ -1685,7 +1685,7 @@
 
   ~BranchInst() {
     if (NumOperands == 1)
-      NumOperands = (unsigned)(uintptr_t)((Use*)this - OperandList);
+      NumOperands = (unsigned)((Use*)this - OperandList);
   }
 
   /// Transparently provide more efficient getOperand methods.





More information about the llvm-commits mailing list