Index: include/llvm/DebugInfo/CodeView/CodeView.h =================================================================== --- include/llvm/DebugInfo/CodeView/CodeView.h +++ include/llvm/DebugInfo/CodeView/CodeView.h @@ -159,9 +159,10 @@ MSIL = 0x0f, HLSL = 0x10, - /// The DMD compiler emits 'D' for the CV source language. Microsoft doesn't - /// have an enumerator for it yet. + /// The DMD & Swift compilers emit 'D' and 'S', respectively, for the CV + /// source language. Microsoft does not have enumerators for them yet. D = 'D', + Swift = 'S', }; /// These values correspond to the CV_call_e enumeration, and are documented Index: lib/CodeGen/AsmPrinter/CodeViewDebug.cpp =================================================================== --- lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -699,6 +699,8 @@ return SourceLanguage::Java; case dwarf::DW_LANG_D: return SourceLanguage::D; + case dwarf::DW_LANG_Swift: + return SourceLanguage::Swift; 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: lib/DebugInfo/PDB/PDBExtras.cpp =================================================================== --- lib/DebugInfo/PDB/PDBExtras.cpp +++ lib/DebugInfo/PDB/PDBExtras.cpp @@ -192,6 +192,7 @@ CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, MSIL, OS) CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, HLSL, OS) CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, D, OS) + CASE_OUTPUT_ENUM_CLASS_NAME(PDB_Lang, Swift, OS) } return OS; } Index: lib/DebugInfo/PDB/PDBSymbolCompiland.cpp =================================================================== --- lib/DebugInfo/PDB/PDBSymbolCompiland.cpp +++ lib/DebugInfo/PDB/PDBSymbolCompiland.cpp @@ -100,6 +100,7 @@ .Case(".cc", LangC) .Case(".cxx", LangC) .Case(".asm", Lang == PDB_Lang::Masm) + .Case(".swift", Lang == PDB_Lang::Swift) .Default(false)) return File->getFileName(); } Index: tools/llvm-pdbutil/MinimalSymbolDumper.cpp =================================================================== --- tools/llvm-pdbutil/MinimalSymbolDumper.cpp +++ tools/llvm-pdbutil/MinimalSymbolDumper.cpp @@ -206,6 +206,7 @@ RETURN_CASE(SourceLanguage, MSIL, "msil"); RETURN_CASE(SourceLanguage, HLSL, "hlsl"); RETURN_CASE(SourceLanguage, D, "d"); + RETURN_CASE(SourceLanguage, Swift, "swift"); } return formatUnknownEnum(Lang); }