diff options
author | Stefan Gränitz <stefan.graenitz@gmail.com> | 2023-03-17 17:08:20 +0100 |
---|---|---|
committer | Stefan Gränitz <stefan.graenitz@gmail.com> | 2023-03-17 17:09:31 +0100 |
commit | ef006eb0bc5e8d069deee7e7d93d7cf5d55fd791 (patch) | |
tree | f8aab91b163715eff90fe1d9dc55ff8875975f43 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | |
parent | 03aa02adb03c928ae4ec9d139b303348f81861c9 (diff) | |
download | llvm-ef006eb0bc5e8d069deee7e7d93d7cf5d55fd791.zip llvm-ef006eb0bc5e8d069deee7e7d93d7cf5d55fd791.tar.gz llvm-ef006eb0bc5e8d069deee7e7d93d7cf5d55fd791.tar.bz2 |
[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
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index fd4ea6e..86cdd11 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -569,7 +569,6 @@ static SourceLanguage MapDWLangToCVLang(unsigned DWLang) { case dwarf::DW_LANG_C89: case dwarf::DW_LANG_C99: case dwarf::DW_LANG_C11: - case dwarf::DW_LANG_ObjC: return SourceLanguage::C; case dwarf::DW_LANG_C_plus_plus: case dwarf::DW_LANG_C_plus_plus_03: @@ -595,6 +594,10 @@ static SourceLanguage MapDWLangToCVLang(unsigned DWLang) { return SourceLanguage::Swift; case dwarf::DW_LANG_Rust: return SourceLanguage::Rust; + case dwarf::DW_LANG_ObjC: + return SourceLanguage::ObjC; + case dwarf::DW_LANG_ObjC_plus_plus: + return SourceLanguage::ObjCpp; default: // There's no CodeView representation for this language, and CV doesn't // have an "unknown" option for the language field, so we'll use MASM, |