summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-05-10 10:58:07 +0000
committerBill Wendling <isanbard@gmail.com>2008-05-10 10:58:07 +0000
commitd2a5a2ae2e45c7dbec84b9df6fe642b41ff5e4e8 (patch)
tree6bc2eaf458ba1404d3b5ca9288a702aea3bc5c26 /include
parent469a58283023de8e1837932a85d06f2041e30932 (diff)
downloadllvm-d2a5a2ae2e45c7dbec84b9df6fe642b41ff5e4e8.tar.gz
llvm-d2a5a2ae2e45c7dbec84b9df6fe642b41ff5e4e8.tar.bz2
llvm-d2a5a2ae2e45c7dbec84b9df6fe642b41ff5e4e8.tar.xz
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
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Instructions.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 86bc3f5793..b26eb3a403 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.