diff --git a/llvm/test/tools/gold/X86/emit-asm.ll b/llvm/test/tools/gold/X86/emit-asm.ll index 40ff71f6143e2..4e76f45dcf2d6 100644 --- a/llvm/test/tools/gold/X86/emit-asm.ll +++ b/llvm/test/tools/gold/X86/emit-asm.ll @@ -23,3 +23,6 @@ define void @f1() { define void @f2() { ret void } + +; Check if comments are emitted into assembly. +; CHECK: -- End function diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp index d9e5983a4bacd..257832ab7671c 100644 --- a/llvm/tools/gold/gold-plugin.cpp +++ b/llvm/tools/gold/gold-plugin.cpp @@ -925,6 +925,7 @@ static std::unique_ptr createLTO(IndexWriteCallback OnIndexWrite, break; case options::OT_ASM_ONLY: Conf.CGFileType = CodeGenFileType::AssemblyFile; + Conf.Options.MCOptions.AsmVerbose = true; break; }