Index: llvm/include/llvm/DebugInfo/CodeView/CodeView.h =================================================================== --- llvm/include/llvm/DebugInfo/CodeView/CodeView.h +++ llvm/include/llvm/DebugInfo/CodeView/CodeView.h @@ -162,6 +162,8 @@ MSIL = 0x0f, HLSL = 0x10, + Rust = 0x15, + /// The DMD & Swift compilers emit 'D' and 'S', respectively, for the CV /// source language. Microsoft does not have enumerators for them yet. D = 'D', Index: llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp =================================================================== --- llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -600,6 +600,8 @@ 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, Index: llvm/test/DebugInfo/COFF/language.ll =================================================================== --- llvm/test/DebugInfo/COFF/language.ll +++ llvm/test/DebugInfo/COFF/language.ll @@ -36,6 +36,9 @@ ; ; RUN: sed -e 's//DW_LANG_Fortran08/;s//Fortran/' %s > %t ; RUN: llc -filetype=obj -o - %t | llvm-readobj --codeview - | FileCheck %t +; +; RUN: sed -e 's//DW_LANG_Rust/;s//Rust/' %s > %t +; RUN: llc -filetype=obj -o - %t | llvm-readobj --codeview - | FileCheck %t ; CHECK: CodeViewDebugInfo [ ; CHECK: Subsection [