From d2a5a2ae2e45c7dbec84b9df6fe642b41ff5e4e8 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sat, 10 May 2008 10:58:07 +0000 Subject: Prevent warnings from the -Wshorten-64-to-32 flag. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50946 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Instructions.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 86bc3f5..b26eb3a 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -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. -- cgit v1.1