diff options
author | Fangrui Song <maskray@google.com> | 2019-07-03 08:13:17 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-07-03 08:13:17 +0000 |
commit | 7264a474b7c808e7d3cf44a4e7c0142281ca3cdf (patch) | |
tree | fba8d3c60cf164de08531ba93d8e96b115605e86 /clang/lib/Parse/ParseStmtAsm.cpp | |
parent | 1f6d9845d8f2e0e664b0b03488588010adf39b3f (diff) | |
download | bcm5719-llvm-7264a474b7c808e7d3cf44a4e7c0142281ca3cdf.tar.gz bcm5719-llvm-7264a474b7c808e7d3cf44a4e7c0142281ca3cdf.zip |
Change std::{lower,upper}_bound to llvm::{lower,upper}_bound or llvm::partition_point. NFC
llvm-svn: 365006
Diffstat (limited to 'clang/lib/Parse/ParseStmtAsm.cpp')
-rw-r--r-- | clang/lib/Parse/ParseStmtAsm.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Parse/ParseStmtAsm.cpp b/clang/lib/Parse/ParseStmtAsm.cpp index 75f3ac396e1..1153c2510b0 100644 --- a/clang/lib/Parse/ParseStmtAsm.cpp +++ b/clang/lib/Parse/ParseStmtAsm.cpp @@ -144,8 +144,8 @@ void ClangAsmParserCallback::findTokensForString( // Try to find a token whose offset matches the first token. unsigned FirstCharOffset = Str.begin() - AsmString.begin(); - const unsigned *FirstTokOffset = std::lower_bound( - AsmTokOffsets.begin(), AsmTokOffsets.end(), FirstCharOffset); + const unsigned *FirstTokOffset = + llvm::lower_bound(AsmTokOffsets, FirstCharOffset); // For now, assert that the start of the string exactly // corresponds to the start of a token. @@ -174,8 +174,7 @@ ClangAsmParserCallback::translateLocation(const llvm::SourceMgr &LSM, unsigned Offset = SMLoc.getPointer() - LBuf->getBufferStart(); // Figure out which token that offset points into. - const unsigned *TokOffsetPtr = - std::lower_bound(AsmTokOffsets.begin(), AsmTokOffsets.end(), Offset); + const unsigned *TokOffsetPtr = llvm::lower_bound(AsmTokOffsets, Offset); unsigned TokIndex = TokOffsetPtr - AsmTokOffsets.begin(); unsigned TokOffset = *TokOffsetPtr; |