[clang] [llvm] [LFI] Add MCLFIRewriter infrastructure (PR #172906)

Alexis Engelke via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 26 23:24:19 PST 2026


================
@@ -593,6 +594,8 @@ static bool ExecuteAssemblerImpl(AssemblerInvocation &Opts,
     Triple T(Opts.Triple);
     Str.reset(TheTarget->createMCObjectStreamer(
         T, Ctx, std::move(MAB), std::move(OW), std::move(CE), *STI));
+    if (T.isLFI())
+      initializeLFIMCStreamer(*Str.get(), Ctx, T);
----------------
aengelke wrote:

If we emit textual asm, the assembler will add the note section when creating the object file? IMO, the goal should be that `llc -filetype=asm | llvm-mc -filetype=obj` and `llc -filetype=obj` should result in identical output, which they wouldn't if both steps add a note section?

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


More information about the cfe-commits mailing list