[llvm] r224337 - Fixing -Wsign-compare warnings; NFC.
Aaron Ballman
aaron at aaronballman.com
Tue Dec 16 06:04:12 PST 2014
Author: aaronballman
Date: Tue Dec 16 08:04:11 2014
New Revision: 224337
URL: http://llvm.org/viewvc/llvm-project?rev=224337&view=rev
Log:
Fixing -Wsign-compare warnings; NFC.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/lib/CodeGen/ExecutionDepsFix.cpp
llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=224337&r1=224336&r2=224337&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Dec 16 08:04:11 2014
@@ -1492,7 +1492,8 @@ void AsmPrinter::EmitAlignment(unsigned
if (NumBits == 0) return; // 1-byte aligned: no need to emit alignment.
- assert(NumBits < std::numeric_limits<unsigned>::digits &&
+ assert(NumBits <
+ static_cast<unsigned>(std::numeric_limits<unsigned>::digits) &&
"undefined behavior");
if (getCurrentSection()->getKind().isText())
OutStreamer.EmitCodeAlignment(1u << NumBits);
Modified: llvm/trunk/lib/CodeGen/ExecutionDepsFix.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ExecutionDepsFix.cpp?rev=224337&r1=224336&r2=224337&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ExecutionDepsFix.cpp (original)
+++ llvm/trunk/lib/CodeGen/ExecutionDepsFix.cpp Tue Dec 16 08:04:11 2014
@@ -74,7 +74,8 @@ struct DomainValue {
// Is domain available?
bool hasDomain(unsigned domain) const {
- assert(domain < std::numeric_limits<unsigned>::digits &&
+ assert(domain <
+ static_cast<unsigned>(std::numeric_limits<unsigned>::digits) &&
"undefined behavior");
return AvailableDomains & (1u << domain);
}
Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=224337&r1=224336&r2=224337&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Tue Dec 16 08:04:11 2014
@@ -8577,7 +8577,8 @@ static SDValue PerformBFICombine(SDNode
unsigned InvMask = cast<ConstantSDNode>(N->getOperand(2))->getZExtValue();
unsigned LSB = countTrailingZeros(~InvMask);
unsigned Width = (32 - countLeadingZeros(~InvMask)) - LSB;
- assert(Width < std::numeric_limits<unsigned>::digits &&
+ assert(Width <
+ static_cast<unsigned>(std::numeric_limits<unsigned>::digits) &&
"undefined behavior");
unsigned Mask = (1u << Width) - 1;
unsigned Mask2 = N11C->getZExtValue();
More information about the llvm-commits
mailing list