diff options
author | Arlo Siemsen <arsiem@microsoft.com> | 2022-01-06 14:24:15 -0800 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2022-01-06 14:27:08 -0800 |
commit | 3d10997e42d225ead6237da98c2a714ea483a9d9 (patch) | |
tree | 042af0090e893e75fb44860f6cb5699ae5f845f3 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | |
parent | e37b6a67f8a75c2e6a5a69c03c8ffdb388bafa5f (diff) | |
download | llvm-3d10997e42d225ead6237da98c2a714ea483a9d9.zip llvm-3d10997e42d225ead6237da98c2a714ea483a9d9.tar.gz llvm-3d10997e42d225ead6237da98c2a714ea483a9d9.tar.bz2 |
Add Rust to CodeView SourceLanguage (CV_CFL_LANG) enum
Microsoft has added several new entries to the CV_CFL_LANG enum, including Rust:
https://docs.microsoft.com/en-us/visualstudio/debugger/debug-interface-access/cv-cfl-lang
This change adds Rust to the corresponding LLVM enum and translates `dwarf::DW_LANG_Rust` to `SourceLanguage::Rust` in the CodeView AsmPrinter.
This means that Rust will no longer emit as Masm.
Differential Revision: https://reviews.llvm.org/D115300
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index ed74d2b..bb795a8 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -600,6 +600,8 @@ static SourceLanguage MapDWLangToCVLang(unsigned DWLang) { return SourceLanguage::D; case dwarf::DW_LANG_Swift: return SourceLanguage::Swift; + case dwarf::DW_LANG_Rust: + return SourceLanguage::Rust; 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, |