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
diff --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
index 2c7ea5b..aa831f0 100644
--- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -309,7 +309,8 @@
 
   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 =