aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CommandFlags.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2023-06-11 15:27:22 -0700
committerFangrui Song <i@maskray.me>2023-06-11 15:27:22 -0700
commit849f1dd15e92fda2b83dbb6144e6b28b2cb946e0 (patch)
tree47af01aa52d2fc3e5e1502e06ac335d1c82c9fbf /llvm/lib/CodeGen/CommandFlags.cpp
parentdf357a71dd7d10ee4bdc0bd22e6be048c5ad7088 (diff)
downloadllvm-849f1dd15e92fda2b83dbb6144e6b28b2cb946e0.zip
llvm-849f1dd15e92fda2b83dbb6144e6b28b2cb946e0.tar.gz
llvm-849f1dd15e92fda2b83dbb6144e6b28b2cb946e0.tar.bz2
[XRay] Rename XRayOmitFunctionIndex to XRayFunctionIndex
Apply my post-commit comment on D81995. The negative name misguided commit d8a8e5d6240a1db809cd95106910358e69bbf299 (`[clang][cli] Remove marshalling from Opt{In,Out}FFlag`) to: * accidentally flip the option to not emit the xray_fn_idx section. * change -fno-xray-function-index (instead of -fxray-function-index) to emit xray_fn_idx This patch renames XRayOmitFunctionIndex and makes -fxray-function-index emit xray_fn_idx, but the default remains -fno-xray-function-index .
Diffstat (limited to 'llvm/lib/CodeGen/CommandFlags.cpp')
-rw-r--r--llvm/lib/CodeGen/CommandFlags.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/CommandFlags.cpp b/llvm/lib/CodeGen/CommandFlags.cpp
index 35263ea..3c6964e 100644
--- a/llvm/lib/CodeGen/CommandFlags.cpp
+++ b/llvm/lib/CodeGen/CommandFlags.cpp
@@ -99,7 +99,7 @@ CGOPT(bool, EmitCallSiteInfo)
CGOPT(bool, EnableMachineFunctionSplitter)
CGOPT(bool, EnableDebugEntryValues)
CGOPT(bool, ForceDwarfFrameSection)
-CGOPT(bool, XRayOmitFunctionIndex)
+CGOPT(bool, XRayFunctionIndex)
CGOPT(bool, DebugStrictDwarf)
CGOPT(unsigned, AlignLoops)
CGOPT(bool, JMCInstrument)
@@ -461,10 +461,10 @@ codegen::RegisterCodeGenFlags::RegisterCodeGenFlags() {
cl::desc("Always emit a debug frame section."), cl::init(false));
CGBINDOPT(ForceDwarfFrameSection);
- static cl::opt<bool> XRayOmitFunctionIndex(
- "no-xray-index", cl::desc("Don't emit xray_fn_idx section"),
- cl::init(false));
- CGBINDOPT(XRayOmitFunctionIndex);
+ static cl::opt<bool> XRayFunctionIndex("xray-function-index",
+ cl::desc("Emit xray_fn_idx section"),
+ cl::init(true));
+ CGBINDOPT(XRayFunctionIndex);
static cl::opt<bool> DebugStrictDwarf(
"strict-dwarf", cl::desc("use strict dwarf"), cl::init(false));
@@ -559,7 +559,7 @@ codegen::InitTargetOptionsFromCodeGenFlags(const Triple &TheTriple) {
Options.EmitCallSiteInfo = getEmitCallSiteInfo();
Options.EnableDebugEntryValues = getEnableDebugEntryValues();
Options.ForceDwarfFrameSection = getForceDwarfFrameSection();
- Options.XRayOmitFunctionIndex = getXRayOmitFunctionIndex();
+ Options.XRayFunctionIndex = getXRayFunctionIndex();
Options.DebugStrictDwarf = getDebugStrictDwarf();
Options.LoopAlignment = getAlignLoops();
Options.JMCInstrument = getJMCInstrument();