mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-04 22:07:27 +00:00
Don't assume size_t is unsigned long long.
Fixes a -Woverflow warning from gcc when building for 32-bit platforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156313 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ed57984483
commit
d58518a8b6
@ -121,7 +121,7 @@ SourceMgr::getLineAndColumn(SMLoc Loc, int BufferID) const {
|
||||
Cache.LineNoOfQuery = LineNo;
|
||||
|
||||
size_t NewlineOffs = StringRef(BufStart, Ptr-BufStart).find_last_of("\n\r");
|
||||
if (NewlineOffs == StringRef::npos) NewlineOffs = ~0ULL;
|
||||
if (NewlineOffs == StringRef::npos) NewlineOffs = ~(size_t)0;
|
||||
return std::make_pair(LineNo, Ptr-BufStart-NewlineOffs);
|
||||
}
|
||||
|
||||
@ -358,5 +358,3 @@ void SMDiagnostic::print(const char *ProgName, raw_ostream &S,
|
||||
|
||||
S << '\n';
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user