[PATCH] D141268: [ELF] Emit Verbose Asm when using --lto-emit-asm
Pierre van Houtryve via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 11 23:58:02 PST 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG6aff41ef37a4: [ELF] Emit Verbose Asm when using --lto-emit-asm (authored by Pierre-vh).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141268/new/
https://reviews.llvm.org/D141268
Files:
lld/ELF/LTO.cpp
lld/test/ELF/lto/emit-asm.ll
Index: lld/test/ELF/lto/emit-asm.ll
===================================================================
--- lld/test/ELF/lto/emit-asm.ll
+++ lld/test/ELF/lto/emit-asm.ll
@@ -11,14 +11,18 @@
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
+;; Note: we also check for the presence of comments; --lto-emit-asm output should be verbose.
+
+; CHECK-DAG: # -- Begin function f1
; CHECK-DAG: f1:
-; OPT-DAG: define void @f1()
+; OPT: define void @f1()
define void @f1() {
ret void
}
+; CHECK-DAG: # -- Begin function f2
; CHECK-DAG: f2:
-; OPT-DAG: define void @f2()
+; OPT: define void @f2()
define void @f2() {
ret void
}
Index: lld/ELF/LTO.cpp
===================================================================
--- lld/ELF/LTO.cpp
+++ lld/ELF/LTO.cpp
@@ -176,8 +176,10 @@
};
}
- if (config->ltoEmitAsm)
+ if (config->ltoEmitAsm) {
c.CGFileType = CGFT_AssemblyFile;
+ c.Options.MCOptions.AsmVerbose = true;
+ }
if (!config->saveTempsArgs.empty())
checkError(c.addSaveTemps(config->outputFile.str() + ".",
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141268.488499.patch
Type: text/x-patch
Size: 1105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230112/2b33e75c/attachment.bin>
More information about the llvm-commits
mailing list