Get the lang from the CompileUnit for ParseCompileUnitFunctionForPDBFunc

Summary:
Instead of assuming that the language is C++ instead check the compunit
for the language it received from the debug info.

Subscribers: aprantl, jdoerfert

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

llvm-svn: 357044
This commit is contained in:
Nathan Lanza 2019-03-27 01:24:03 +00:00
parent ee1a6e70fa
commit d0050d1b8b
1 changed files with 2 additions and 1 deletions

View File

@ -309,7 +309,8 @@ SymbolFilePDB::ParseCompileUnitFunctionForPDBFunc(const PDBSymbolFunc &pdb_func,
comp_unit.AddFunction(func_sp);
TypeSystem *type_system = GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus);
LanguageType lang = ParseLanguage(comp_unit);
TypeSystem *type_system = GetTypeSystemForLanguage(lang);
if (!type_system)
return nullptr;
ClangASTContext *clang_type_system =