[Lldb-commits] [lldb] r357044 - Get the lang from the CompileUnit for ParseCompileUnitFunctionForPDBFunc

Nathan Lanza via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 26 18:24:03 PDT 2019


Author: lanza
Date: Tue Mar 26 18:24:03 2019
New Revision: 357044

URL: http://llvm.org/viewvc/llvm-project?rev=357044&view=rev
Log:
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

Modified:
    lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp

Modified: lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp?rev=357044&r1=357043&r2=357044&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp Tue Mar 26 18:24:03 2019
@@ -309,7 +309,8 @@ SymbolFilePDB::ParseCompileUnitFunctionF
 
   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 =




More information about the lldb-commits mailing list