unsigned getGlobalFileIndex(StringRef Name) {
auto R = Files.find(Name);
- if (R != Files.end()) {
- assert(R->second > 0 && "got index of compilation dir");
+ if (R != Files.end())
return R->second;
- }
unsigned Index = Files.size() + 1;
Files.try_emplace(Name, Index);
return Index;
auto &CurrentFunctionFileMapping =
InputFunctions.back().ReverseVirtualFileMapping;
auto R = CurrentFunctionFileMapping.find(GlobalIndex);
- if (R != CurrentFunctionFileMapping.end()) {
- assert(R->second > 0 && "got index of compilation dir");
+ if (R != CurrentFunctionFileMapping.end())
return R->second;
- }
unsigned IndexInFunction = CurrentFunctionFileMapping.size();
CurrentFunctionFileMapping.insert(
std::make_pair(GlobalIndex, IndexInFunction));