[llvm-commits] [llvm] r50946 - /llvm/trunk/include/llvm/Instructions.h
Bill Wendling
isanbard at gmail.com
Sat May 10 03:58:09 PDT 2008
Author: void
Date: Sat May 10 05:58:07 2008
New Revision: 50946
URL: http://llvm.org/viewvc/llvm-project?rev=50946&view=rev
Log:
Prevent warnings from the -Wshorten-64-to-32 flag.
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=50946&r1=50945&r2=50946&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Instructions.h (original)
+++ llvm/trunk/include/llvm/Instructions.h Sat May 10 05:58:07 2008
@@ -1683,12 +1683,9 @@
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.
More information about the llvm-commits
mailing list