[clang] [llvm] [LFI] Add MCLFIRewriter infrastructure (PR #172906)
Alexis Engelke via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 26 09:15:13 PST 2026
================
@@ -390,6 +391,10 @@ bool MCObjectStreamer::mayHaveInstructions(MCSection &Sec) const {
void MCObjectStreamer::emitInstruction(const MCInst &Inst,
const MCSubtargetInfo &STI) {
+ if (LFIRewriter && LFIRewriter->isEnabled() &&
+ LFIRewriter->rewriteInst(Inst, *this, STI))
+ return;
----------------
aengelke wrote:
How is this supposed to work? What exactly does rewriteInst do? How does it emit the instruction?
Can we fold this into a single function call?
https://github.com/llvm/llvm-project/pull/172906
More information about the cfe-commits
mailing list