From a0ca4c46ca35957a38a6023fa84afda2fc9ba0ec Mon Sep 17 00:00:00 2001 From: Chen Zheng Date: Sun, 9 May 2021 22:04:02 -0400 Subject: [Debug-Info] add -gstrict-dwarf support in backend Reviewed By: dblaikie, probinson Differential Revision: https://reviews.llvm.org/D100826 --- llvm/lib/CodeGen/CommandFlags.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/lib/CodeGen/CommandFlags.cpp') 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 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(); -- cgit v1.1