[CodeView] Add source languages ObjC and ObjC++
authorStefan Gränitz <stefan.graenitz@gmail.com>
Fri, 17 Mar 2023 16:08:20 +0000 (17:08 +0100)
committerStefan Gränitz <stefan.graenitz@gmail.com>
Fri, 17 Mar 2023 16:09:31 +0000 (17:09 +0100)
commitef006eb0bc5e8d069deee7e7d93d7cf5d55fd791
treef8aab91b163715eff90fe1d9dc55ff8875975f43
parent03aa02adb03c928ae4ec9d139b303348f81861c9
[CodeView] Add source languages ObjC and ObjC++

This patch adds llvm::codeview::SourceLanguage entries, DWARF translations, and PDB source file extensions in LLVM and allow LLDB's PDB parsers to recognize them correctly.

The CV_CFL_LANG enum in the Visual Studio 2022 documentation https://learn.microsoft.com/en-us/visualstudio/debugger/debug-interface-access/cv-cfl-lang defines:
```
    CV_CFL_OBJC     = 0x11,
    CV_CFL_OBJCXX   = 0x12,
```

Since the initial commit in D24317, ObjC was emitted as C language and ObjC++ as Masm.

Reviewed By: DavidSpickett

Differential Revision: https://reviews.llvm.org/D146221
lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
llvm/include/llvm/DebugInfo/CodeView/CodeView.h
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
llvm/lib/DebugInfo/CodeView/EnumTables.cpp
llvm/lib/DebugInfo/PDB/PDBExtras.cpp
llvm/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp
llvm/test/DebugInfo/COFF/language.ll
llvm/test/DebugInfo/COFF/objc.ll [new file with mode: 0644]
llvm/test/DebugInfo/COFF/objcpp.ll [new file with mode: 0644]
llvm/tools/llvm-pdbutil/MinimalSymbolDumper.cpp