Prevent warnings from the -Wshorten-64-to-32 flag.
authorBill Wendling <isanbard@gmail.com>
Sat, 10 May 2008 10:58:07 +0000 (10:58 +0000)
committerBill Wendling <isanbard@gmail.com>
Sat, 10 May 2008 10:58:07 +0000 (10:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50946 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Instructions.h

index 86bc3f5793d9950a3f594a1bfb85fb4e10ccf58b..b26eb3a403ce932a420cf4ee6527d0cf225c269b 100644 (file)
@@ -1683,12 +1683,9 @@ public:
     return new(3) BranchInst(IfTrue, IfFalse, Cond, InsertAtEnd);
   }
 
-  ~BranchInst()
-  {
+  ~BranchInst() {
     if (NumOperands == 1)
-      {
-        NumOperands = (Use*)this - OperandList;
-      }
+      NumOperands = (unsigned)(uintptr_t)((Use*)this - OperandList);
   }
 
   /// Transparently provide more efficient getOperand methods.