forked from OSchip/llvm-project
Fix assertion when input is an empty string.
llvm-svn: 64397
This commit is contained in:
parent
41e3fc1ff5
commit
ad027c7781
|
@ -721,7 +721,7 @@ IdentifierInfo* PTHManager::LazilyCreateIdentifierInfo(unsigned PersistentID) {
|
|||
IdentifierInfo* PTHManager::get(const char *NameStart, const char *NameEnd) {
|
||||
PTHStringIdLookup& SL = *((PTHStringIdLookup*)StringIdLookup);
|
||||
// Double check our assumption that the last character isn't '\0'.
|
||||
assert(NameStart[NameEnd-NameStart-1] != '\0');
|
||||
assert(NameEnd==NameStart || NameStart[NameEnd-NameStart-1] != '\0');
|
||||
PTHStringIdLookup::iterator I = SL.find(std::make_pair(NameStart,
|
||||
NameEnd - NameStart));
|
||||
if (I == SL.end()) // No identifier found?
|
||||
|
|
Loading…
Reference in New Issue