================ @@ -4661,3 +4661,110 @@ AsmPrinter::getCodeViewJumpTableInfo(int JTI, const MachineInstr *BranchInstr, return std::make_tuple(Base, 0, BranchLabel, codeview::JumpTableEntrySize::Int32); } + +void AsmPrinter::emitCOFFReplaceableFunctionData(Module &M) { + const Triple &TT = TM.getTargetTriple(); + assert(TT.isOSBinFormatCOFF()); + + bool IsTargetArm64EC = TT.isWindowsArm64EC(); + SmallVector<char> Buf; + SmallVector<MCSymbol *> FuncOverrideDefaultSymbols; + bool SwitchedToDirectiveSection = false; + for (const auto &F : M.functions()) { + if (F.hasFnAttribute("loader-replaceable")) { + if (!SwitchedToDirectiveSection) { + OutStreamer->switchSection( + OutContext.getObjectFileInfo()->getDrectveSection()); + SwitchedToDirectiveSection = true; + } + + auto Name = F.getName(); ---------------- efriedma-quic wrote:
Don't use `auto` for easily nameable types like "StringRef". https://github.com/llvm/llvm-project/pull/125320 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits