From 94bef327aa8ea769cafe310b91bd94d768d2bf85 Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Tue, 15 Apr 2008 18:44:59 +0000 Subject: [PATCH] Make 64-to-32 bit truncations explicit (prevent warnings). All values here fit in 32 bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49736 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/SelectionDAGNodes.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 41d1d5d9251..bc654946a71 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -1766,7 +1766,8 @@ namespace ISD { void setNest() { Flags |= One << NestOffs; } unsigned getByValAlign() const { - return (One << ((Flags & ByValAlign) >> ByValAlignOffs)) / 2; + return (unsigned) + ((One << ((Flags & ByValAlign) >> ByValAlignOffs)) / 2); } void setByValAlign(unsigned A) { Flags = (Flags & ~ByValAlign) | @@ -1777,7 +1778,8 @@ namespace ISD { void setSplit() { Flags |= One << SplitOffs; } unsigned getOrigAlign() const { - return (One << ((Flags & OrigAlign) >> OrigAlignOffs)) / 2; + return (unsigned) + ((One << ((Flags & OrigAlign) >> OrigAlignOffs)) / 2); } void setOrigAlign(unsigned A) { Flags = (Flags & ~OrigAlign) | @@ -1785,7 +1787,7 @@ namespace ISD { } unsigned getByValSize() const { - return (Flags & ByValSize) >> ByValSizeOffs; + return (unsigned)((Flags & ByValSize) >> ByValSizeOffs); } void setByValSize(unsigned S) { Flags = (Flags & ~ByValSize) | (uint64_t(S) << ByValSizeOffs); -- 2.34.1