Skip to content

Commit 9e13d64

Browse files
authored
[gold] Enable MCTargetOptions::AsmVerbose along with emit-asm (#71606)
Print comments into assembly output if we're using `emit-asm`.
1 parent 81a7690 commit 9e13d64

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

llvm/test/tools/gold/X86/emit-asm.ll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ define void @f1() {
2323
define void @f2() {
2424
ret void
2525
}
26+
27+
; Check if comments are emitted into assembly.
28+
; CHECK: -- End function

llvm/tools/gold/gold-plugin.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,7 @@ static std::unique_ptr<LTO> createLTO(IndexWriteCallback OnIndexWrite,
925925
break;
926926
case options::OT_ASM_ONLY:
927927
Conf.CGFileType = CodeGenFileType::AssemblyFile;
928+
Conf.Options.MCOptions.AsmVerbose = true;
928929
break;
929930
}
930931

0 commit comments

Comments
 (0)