[llvm] r224195 - Silencing a -Wsign-compare warning; NFC.
Aaron Ballman
aaron at aaronballman.com
Sat Dec 13 08:55:03 PST 2014
Author: aaronballman
Date: Sat Dec 13 10:55:02 2014
New Revision: 224195
URL: http://llvm.org/viewvc/llvm-project?rev=224195&view=rev
Log:
Silencing a -Wsign-compare warning; NFC.
Modified:
llvm/trunk/lib/MC/MCAsmStreamer.cpp
Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=224195&r1=224194&r2=224195&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Sat Dec 13 10:55:02 2014
@@ -683,7 +683,8 @@ void MCAsmStreamer::EmitValueImpl(const
// emission domain. This produces nicer output and silences potential
// truncation warnings when round tripping through another assembler.
uint64_t Shift = 64 - EmissionSize * 8;
- assert(Shift < std::numeric_limits<unsigned long long>::digits &&
+ assert(Shift < static_cast<unsigned>(
+ std::numeric_limits<unsigned long long>::digits) &&
"undefined behavior");
ValueToEmit &= ~0ULL >> Shift;
EmitIntValue(ValueToEmit, EmissionSize);
More information about the llvm-commits
mailing list