[clang] [llvm] [clang][LTO] Emit symbols for global inline assembly as module flags (PR #174995)

Andrew Savonichev via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 28 06:47:01 PST 2026


================
@@ -0,0 +1,68 @@
+; RUN: llvm-as %s -o %t1.bc
+; RUN: llvm-as %p/Inputs/global-inline-asm-flags.ll -o %t2.bc
+; RUN: llvm-lto -save-merged-module -filetype=asm -mattr=+pauth %t1.bc %t2.bc -o %t3
----------------
asavonic wrote:

Thank you. I added a test for `llvm-lto2`, and it showed a bug in `ModuleSymbolTable::addModule`. We have to materialize metadata of a module before `CollectAsmSymbols`. Otherwise it falls back to using `AsmParser` and it is not going to work without target features. This issue is fixed in the latest revision of the patch.


https://github.com/llvm/llvm-project/pull/174995


More information about the cfe-commits mailing list