Author: Marina Taylor Date: 2026-01-30T15:03:54Z New Revision: 2eaaaf19129efba3bb89f458580b5fb1b8bf063e
URL: https://github.com/llvm/llvm-project/commit/2eaaaf19129efba3bb89f458580b5fb1b8bf063e DIFF: https://github.com/llvm/llvm-project/commit/2eaaaf19129efba3bb89f458580b5fb1b8bf063e.diff LOG: NFC: Rename CodeGenOptions::StackUsageOutput to StackUsageFile (#178898) Preparation for #178005. "Output" has too many different interpretations: it could be an enabled/disabled, a file format, etc. Clarify that it's the destination file. Added: Modified: clang/include/clang/Basic/CodeGenOptions.h clang/include/clang/Options/Options.td clang/lib/CodeGen/BackendUtil.cpp clang/lib/Frontend/CompilerInvocation.cpp llvm/include/llvm/Target/TargetOptions.h llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Removed: ################################################################################ diff --git a/clang/include/clang/Basic/CodeGenOptions.h b/clang/include/clang/Basic/CodeGenOptions.h index c60ca507ff917..8ef0d87faaeaf 100644 --- a/clang/include/clang/Basic/CodeGenOptions.h +++ b/clang/include/clang/Basic/CodeGenOptions.h @@ -521,7 +521,7 @@ class CodeGenOptions : public CodeGenOptionsBase { /// Name of the stack usage file (i.e., .su file) if user passes /// -fstack-usage. If empty, it can be implied that -fstack-usage is not /// passed on the command line. - std::string StackUsageOutput; + std::string StackUsageFile; /// Executable and command-line used to create a given CompilerInvocation. /// Most of the time this will be the full -cc1 command. diff --git a/clang/include/clang/Options/Options.td b/clang/include/clang/Options/Options.td index 41a23ba4cb33d..421208a812bbc 100644 --- a/clang/include/clang/Options/Options.td +++ b/clang/include/clang/Options/Options.td @@ -4664,7 +4664,7 @@ def fstack_usage : Flag<["-"], "fstack-usage">, Group<f_Group>, def stack_usage_file : Separate<["-"], "stack-usage-file">, Visibility<[CC1Option]>, HelpText<"Filename (or -) to write stack usage output to">, - MarshallingInfoString<CodeGenOpts<"StackUsageOutput">>; + MarshallingInfoString<CodeGenOpts<"StackUsageFile">>; def fextend_variable_liveness_EQ : Joined<["-"], "fextend-variable-liveness=">, Group<f_Group>, Visibility<[ClangOption, CC1Option]>, HelpText<"Extend the liveness of user variables through optimizations to " diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index d411ef1bf8763..b286ff359ec40 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -453,7 +453,7 @@ static bool initTargetOptions(const CompilerInstance &CI, Options.EmulatedTLS = CodeGenOpts.EmulatedTLS; Options.DebuggerTuning = CodeGenOpts.getDebuggerTuning(); Options.EmitStackSizeSection = CodeGenOpts.StackSizeSection; - Options.StackUsageOutput = CodeGenOpts.StackUsageOutput; + Options.StackUsageFile = CodeGenOpts.StackUsageFile; Options.EmitAddrsig = CodeGenOpts.Addrsig; Options.ForceDwarfFrameSection = CodeGenOpts.ForceDwarfFrameSection; Options.EmitCallGraphSection = CodeGenOpts.CallGraphSection; diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 5a79634773866..2af4a7f536623 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -2244,7 +2244,7 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, if (UsingSampleProfile) NeedLocTracking = true; - if (!Opts.StackUsageOutput.empty()) + if (!Opts.StackUsageFile.empty()) NeedLocTracking = true; // If the user requested a flag that requires source locations available in diff --git a/llvm/include/llvm/Target/TargetOptions.h b/llvm/include/llvm/Target/TargetOptions.h index 7af50691ec0e5..a9b86626cf598 100644 --- a/llvm/include/llvm/Target/TargetOptions.h +++ b/llvm/include/llvm/Target/TargetOptions.h @@ -368,7 +368,7 @@ class TargetOptions { /// Name of the stack usage file (i.e., .su file) if user passes /// -fstack-usage. If empty, it can be implied that -fstack-usage is not /// passed on the command line. - std::string StackUsageOutput; + std::string StackUsageFile; /// If greater than 0, override TargetLoweringBase::PrefLoopAlignment. unsigned LoopAlignment = 0; diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 420f09c514d63..b64c7f5b44033 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1672,7 +1672,7 @@ void AsmPrinter::emitStackSizeSection(const MachineFunction &MF) { } void AsmPrinter::emitStackUsage(const MachineFunction &MF) { - const std::string &OutputFilename = MF.getTarget().Options.StackUsageOutput; + const std::string &OutputFilename = MF.getTarget().Options.StackUsageFile; // OutputFilename empty implies -fstack-usage is not passed. if (OutputFilename.empty()) _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
