aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2013-01-15 23:13:47 +0000
committerDavid Greene <greened@obbligato.org>2013-01-15 23:13:47 +0000
commitcc41a94688615b551505e0e7c287e1c444f53a3f (patch)
treeb43418ac3ce61c6de0096130b16c183c277c31ff /lib/CodeGen/CGExpr.cpp
parentf4d918fdf7da64215db8abe63945798c66e6d132 (diff)
Avoid unsigned Compare to int
Cast arithmetic results to avoid comparison of an unsigned to an int. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172570 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r--lib/CodeGen/CGExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index dd248e1900..85adf35961 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -1191,7 +1191,7 @@ RValue CodeGenFunction::EmitLoadOfBitfieldLValue(LValue LV) {
cast<llvm::LoadInst>(Val)->setAlignment(Info.StorageAlignment);
if (Info.IsSigned) {
- assert((Info.Offset + Info.Size) <= Info.StorageSize);
+ assert(static_cast<unsigned>(Info.Offset + Info.Size) <= Info.StorageSize);
unsigned HighBits = Info.StorageSize - Info.Offset - Info.Size;
if (HighBits)
Val = Builder.CreateShl(Val, HighBits, "bf.shl");