aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CommandFlags.cpp
diff options
context:
space:
mode:
authorChen Zheng <czhengsz@cn.ibm.com>2021-05-09 22:04:02 -0400
committerChen Zheng <czhengsz@cn.ibm.com>2021-05-12 23:00:52 -0400
commita0ca4c46ca35957a38a6023fa84afda2fc9ba0ec (patch)
tree5c20343b6f37920be9f92a6c064dd06a722d14d2 /llvm/lib/CodeGen/CommandFlags.cpp
parent6555e53ab0f2bca3dc30f5ab3a2d6872d50b6ff8 (diff)
downloadllvm-a0ca4c46ca35957a38a6023fa84afda2fc9ba0ec.zip
llvm-a0ca4c46ca35957a38a6023fa84afda2fc9ba0ec.tar.gz
llvm-a0ca4c46ca35957a38a6023fa84afda2fc9ba0ec.tar.bz2
[Debug-Info] add -gstrict-dwarf support in backend
Reviewed By: dblaikie, probinson Differential Revision: https://reviews.llvm.org/D100826
Diffstat (limited to 'llvm/lib/CodeGen/CommandFlags.cpp')
-rw-r--r--llvm/lib/CodeGen/CommandFlags.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/CommandFlags.cpp b/llvm/lib/CodeGen/CommandFlags.cpp
index 4c6c595..b8f1ca1 100644
--- a/llvm/lib/CodeGen/CommandFlags.cpp
+++ b/llvm/lib/CodeGen/CommandFlags.cpp
@@ -97,6 +97,7 @@ CGOPT(bool, PseudoProbeForProfiling)
CGOPT(bool, ValueTrackingVariableLocations)
CGOPT(bool, ForceDwarfFrameSection)
CGOPT(bool, XRayOmitFunctionIndex)
+CGOPT(bool, DebugStrictDwarf)
codegen::RegisterCodeGenFlags::RegisterCodeGenFlags() {
#define CGBINDOPT(NAME) \
@@ -471,6 +472,10 @@ codegen::RegisterCodeGenFlags::RegisterCodeGenFlags() {
cl::init(false));
CGBINDOPT(XRayOmitFunctionIndex);
+ static cl::opt<bool> DebugStrictDwarf(
+ "strict-dwarf", cl::desc("use strict dwarf"), cl::init(false));
+ CGBINDOPT(DebugStrictDwarf);
+
#undef CGBINDOPT
mc::RegisterMCTargetOptionsFlags();
@@ -567,6 +572,7 @@ codegen::InitTargetOptionsFromCodeGenFlags(const Triple &TheTriple) {
Options.ValueTrackingVariableLocations = getValueTrackingVariableLocations();
Options.ForceDwarfFrameSection = getForceDwarfFrameSection();
Options.XRayOmitFunctionIndex = getXRayOmitFunctionIndex();
+ Options.DebugStrictDwarf = getDebugStrictDwarf();
Options.MCOptions = mc::InitMCTargetOptionsFromFlags();