Skip to content

Commit 6dab58c

Browse files
committed
Add test.
1 parent 5158038 commit 6dab58c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,8 @@ bool AsmPrinter::doInitialization(Module &M) {
560560

561561
if (MAI->doesSupportDebugInformation()) {
562562
bool EmitCodeView = M.getCodeViewFlag();
563-
if (EmitCodeView && TM.getTargetTriple().isOSWindowsOrUEFI())
563+
if (EmitCodeView &&
564+
(TM.getTargetTriple().isOSWindows() || TM.getTargetTriple().isUEFI()))
564565
Handlers.push_back(std::make_unique<CodeViewDebug>(this));
565566
if (!EmitCodeView || M.getDwarfVersion()) {
566567
if (hasDebugInfo()) {

llvm/test/DebugInfo/COFF/asm.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
; RUN: llc -mcpu=core2 -mtriple=i686-pc-win32 -o - -O0 < %s | llvm-mc -triple=i686-pc-win32 -filetype=obj | llvm-readobj -S --sr --codeview - | FileCheck --check-prefix=OBJ32 %s
33
; RUN: llc -mcpu=core2 -mtriple=x86_64-pc-win32 -O0 < %s | FileCheck --check-prefix=X64 %s
44
; 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 - | FileCheck --check-prefix=OBJ64 %s
5+
; RUN: llc -mcpu=core2 -mtriple=x86_64-uefi -O0 < %s | FileCheck --check-prefix=X64 %s
6+
; RUN: llc -mcpu=core2 -mtriple=x86_64-uefi -o - -O0 < %s | llvm-mc -triple=x86_64-pc-win32 -filetype=obj | llvm-readobj -S --sr --codeview - | FileCheck --check-prefix=OBJ64 %s
57

68
; This LL file was generated by running clang on the following code:
79
; D:\asm.c:

0 commit comments

Comments
 (0)