[llvm] r337269 - Don't assert that a size_t fits into 64bit.
Joerg Sonnenberger via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 17 05:30:35 PDT 2018
Author: joerg
Date: Tue Jul 17 05:30:34 2018
New Revision: 337269
URL: http://llvm.org/viewvc/llvm-project?rev=337269&view=rev
Log:
Don't assert that a size_t fits into 64bit.
Avoids tautological compare warnings on 32bit platforms.
Modified:
llvm/trunk/lib/Support/SourceMgr.cpp
Modified: llvm/trunk/lib/Support/SourceMgr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SourceMgr.cpp?rev=337269&r1=337268&r2=337269&view=diff
==============================================================================
--- llvm/trunk/lib/Support/SourceMgr.cpp (original)
+++ llvm/trunk/lib/Support/SourceMgr.cpp Tue Jul 17 05:30:34 2018
@@ -136,7 +136,6 @@ SourceMgr::getLineAndColumn(SMLoc Loc, u
const char *Ptr = Loc.getPointer();
size_t Sz = SB.Buffer->getBufferSize();
- assert(Sz <= std::numeric_limits<uint64_t>::max());
unsigned LineNo;
if (Sz <= std::numeric_limits<uint8_t>::max())
LineNo = SB.getLineNumber<uint8_t>(Ptr);
More information about the llvm-commits
mailing list