[SymbolFilePDB] Keep searching until the file name is found for the pdb compiland

Reviewers: zturner, rnk, lldb-commits

Reviewed By: zturner

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D44182

llvm-svn: 327162
This commit is contained in:
Aaron Smith 2018-03-09 18:50:19 +00:00
parent 08fa594298
commit dee18b82c2
1 changed files with 3 additions and 2 deletions

View File

@ -627,9 +627,10 @@ std::string SymbolFilePDB::GetSourceFileNameForPDBCompiland(
auto file_extension = file_spec.GetFileNameExtension();
if (pdb_lang == PDB_Lang::Cpp || pdb_lang == PDB_Lang::C) {
static const char* exts[] = { "cpp", "c", "cc", "cxx" };
if (llvm::is_contained(exts, file_extension.GetStringRef().lower()))
if (llvm::is_contained(exts, file_extension.GetStringRef().lower())) {
source_file_name = file_up->getFileName();
break;
break;
}
} else if (pdb_lang == PDB_Lang::Masm &&
ConstString::Compare(file_extension, ConstString("ASM"),
false) == 0) {