[lld] [llvm] [LTO][lld] Emit textual assembly code with '--save-temps' (PR #195922)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Wed May 6 07:04:59 PDT 2026
================
@@ -423,6 +426,31 @@ static void codegen(const Config &Conf, TargetMachine *TM,
if (Conf.PreCodeGenModuleHook && !Conf.PreCodeGenModuleHook(Task, Mod))
return;
+ if (!Conf.SaveTempsAsmPrefix.empty()) {
+ std::string PathPrefix;
----------------
teresajohnson wrote:
For consistency, can you move this into addSaveTemps and make into a hook that can be called here, rather than inline this handling into codegen? It should also honor SaveModulesList. I guess if you must call CloneModule then you need a new hook type that takes a TM (or change the original one to take it as an optional?). The path handling and file opening code can be refactored out and shared between the hook setup lambdas.
https://github.com/llvm/llvm-project/pull/195922
More information about the llvm-commits
mailing list