Index: lib/CodeGen/AsmPrinter/AsmPrinter.cpp =================================================================== --- lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -295,8 +295,7 @@ if (MAI->doesSupportDebugInformation()) { bool EmitCodeView = MMI->getModule()->getCodeViewFlag(); - if (EmitCodeView && (TM.getTargetTriple().isKnownWindowsMSVCEnvironment() || - TM.getTargetTriple().isWindowsItaniumEnvironment())) { + if (EmitCodeView) { Handlers.push_back(HandlerInfo(new CodeViewDebug(this), DbgTimerName, DbgTimerDescription, CodeViewLineTablesGroupName, Index: test/DebugInfo/COFF/simple.ll =================================================================== --- test/DebugInfo/COFF/simple.ll +++ test/DebugInfo/COFF/simple.ll @@ -1,11 +1,15 @@ ; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32 -O0 < %s | FileCheck --check-prefix=X86 %s ; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32-itanium -O0 < %s | FileCheck --check-prefix=X86 %s +; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32-gnu -O0 < %s | FileCheck --check-prefix=X86 %s ; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32 -o - -O0 < %s | llvm-mc -triple=i686-pc-win32 -filetype=obj | llvm-readobj -s -sr -codeview -section-symbols | FileCheck --check-prefix=OBJ32 %s ; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32-itanium -o - -O0 < %s | llvm-mc -triple=i686-pc-win32 -filetype=obj | llvm-readobj -s -sr -codeview -section-symbols | FileCheck --check-prefix=OBJ32 %s +; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32-gnu -o - -O0 < %s | llvm-mc -triple=i686-pc-win32 -filetype=obj | llvm-readobj -s -sr -codeview -section-symbols | FileCheck --check-prefix=OBJ32 %s ; RUN: llc -mcpu=core2 -mtriple=x86_64-pc-win32 -O0 < %s | FileCheck --check-prefix=X64 %s ; RUN: llc -mcpu=core2 -mtriple=x86_64-pc-win32-itanium -O0 < %s | FileCheck --check-prefix=X64 %s +; RUN: llc -mcpu=core2 -mtriple=x86_64-pc-win32-gnu -O0 < %s | FileCheck --check-prefix=X64 %s ; RUN: llc -mcpu=core2 -mtriple=x86_64-pc-win32 -o - -O0 < %s | llvm-mc -triple=x86_64-pc-win32 -filetype=obj | llvm-readobj -s -sr -codeview -section-symbols | FileCheck --check-prefix=OBJ64 %s ; RUN: llc -mcpu=core2 -mtriple=x86_64-pc-win32-itanium -o - -O0 < %s | llvm-mc -triple=x86_64-pc-win32 -filetype=obj | llvm-readobj -s -sr -codeview -section-symbols | FileCheck --check-prefix=OBJ64 %s +; RUN: llc -mcpu=core2 -mtriple=x86_64-pc-win32-gnu -o - -O0 < %s | llvm-mc -triple=x86_64-pc-win32 -filetype=obj | llvm-readobj -s -sr -codeview -section-symbols | FileCheck --check-prefix=OBJ64 %s ; This LL file was generated by running clang on the following code: ; D:\test.c: