diff options
author | David Blaikie <dblaikie@gmail.com> | 2011-09-22 01:35:49 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2011-09-22 01:35:49 +0000 |
commit | 681d83dd7e36ddb8a25313c446a91c00bbc652dd (patch) | |
tree | 3d88611c32cbdde645c5e8389f2f3797953ab57a /lib/Lex/PTHLexer.cpp | |
parent | 37c31c2e050856f87efd652958352181e72e5dea (diff) |
Simplify the last character check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140287 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PTHLexer.cpp')
-rw-r--r-- | lib/Lex/PTHLexer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp index 3fd4b55bbd..0d48ade39e 100644 --- a/lib/Lex/PTHLexer.cpp +++ b/lib/Lex/PTHLexer.cpp @@ -575,7 +575,7 @@ IdentifierInfo* PTHManager::LazilyCreateIdentifierInfo(unsigned PersistentID) { IdentifierInfo* PTHManager::get(StringRef Name) { PTHStringIdLookup& SL = *((PTHStringIdLookup*)StringIdLookup); // Double check our assumption that the last character isn't '\0'. - assert(Name.empty() || Name.data()[Name.size()-1] != '\0'); + assert(Name.empty() || Name.back() != '\0'); PTHStringIdLookup::iterator I = SL.find(std::make_pair(Name.data(), Name.size())); if (I == SL.end()) // No identifier found? |