LLVM 20.0.0git
Classes | Macros | Typedefs | Enumerations | Functions | Variables
DwarfDebug.cpp File Reference
#include "DwarfDebug.h"
#include "ByteStreamer.h"
#include "DIEHash.h"
#include "DwarfCompileUnit.h"
#include "DwarfExpression.h"
#include "DwarfUnit.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Twine.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/DIE.h"
#include "llvm/CodeGen/LexicalScopes.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/DebugInfo/DWARF/DWARFDataExtractor.h"
#include "llvm/DebugInfo/DWARF/DWARFExpression.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Module.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCSection.h"
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbol.h"
#include "llvm/MC/MCTargetOptions.h"
#include "llvm/MC/MachineLocation.h"
#include "llvm/MC/SectionKind.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MD5.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetLoweringObjectFile.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/TargetParser/Triple.h"
#include <algorithm>
#include <cstddef>
#include <iterator>
#include <optional>
#include <string>
#include "llvm/BinaryFormat/Dwarf.def"

Go to the source code of this file.

Classes

struct  FwdRegParamInfo
 Represents a parameter whose call site value can be described by applying a debug expression to a register in the forwarded register worklist. More...
 
struct  ArangeSpan
 

Macros

#define DEBUG_TYPE   "dwarfdebug"
 
#define HANDLE_MACRO_FLAG(ID, NAME)   MACRO_FLAG_##NAME = ID,
 

Typedefs

using FwdRegWorklist = MapVector< unsigned, SmallVector< FwdRegParamInfo, 2 > >
 Register worklist for finding call site values.
 
using ClobberedRegSet = SmallSet< Register, 16 >
 Container for the set of registers known to be clobbered on the path to a call site.
 

Enumerations

enum  DefaultOnOff { Default , Enable , Disable }
 
enum  LinkageNameOption { DefaultLinkageNames , AllLinkageNames , AbstractLinkageNames }
 

Functions

 STATISTIC (NumCSParams, "Number of dbg call site params created")
 
static DbgValueLoc getDebugLocValue (const MachineInstr *MI)
 Get .debug_loc entry for the instruction range starting at MI.
 
static uint64_t getFragmentOffsetInBits (const DIExpression &Expr)
 
static AccelTableKind computeAccelTableKind (unsigned DwarfVersion, bool GenerateTypeUnits, DebuggerKind Tuning, const Triple &TT)
 
static bool isObjCClass (StringRef Name)
 
static bool hasObjCCategory (StringRef Name)
 
static void getObjCClassCategory (StringRef In, StringRef &Class, StringRef &Category)
 
static StringRef getObjCMethodName (StringRef In)
 
template<typename Func >
static void forBothCUs (DwarfCompileUnit &CU, Func F)
 
static const DIExpressioncombineDIExpressions (const DIExpression *Original, const DIExpression *Addition)
 Append the expression Addition to Original and return the result.
 
template<typename ValT >
static void finishCallSiteParams (ValT Val, const DIExpression *Expr, ArrayRef< FwdRegParamInfo > DescribedParams, ParamSet &Params)
 Emit call site parameter entries that are described by the given value and debug expression.
 
static void addToFwdRegWorklist (FwdRegWorklist &Worklist, unsigned Reg, const DIExpression *Expr, ArrayRef< FwdRegParamInfo > ParamsToAdd)
 Add Reg to the worklist, if it's not already present, and mark that the given parameter registers' values can (potentially) be described using that register and an debug expression.
 
static void interpretValues (const MachineInstr *CurMI, FwdRegWorklist &ForwardedRegWorklist, ParamSet &Params, ClobberedRegSet &ClobberedRegUnits)
 Interpret values loaded into registers by CurMI.
 
static bool interpretNextInstr (const MachineInstr *CurMI, FwdRegWorklist &ForwardedRegWorklist, ParamSet &Params, ClobberedRegSet &ClobberedRegUnits)
 
static void collectCallSiteParameters (const MachineInstr *CallMI, ParamSet &Params)
 Try to interpret values loaded into registers that forward parameters for CallMI.
 
static SmallVectorImpl< DwarfCompileUnit::GlobalExpr > & sortGlobalExprs (SmallVectorImpl< DwarfCompileUnit::GlobalExpr > &GVEs)
 Sort and unique GVEs by comparing their fragment offset.
 
static const DILocalScopegetRetainedNodeScope (const MDNode *N)
 
static bool validThroughout (LexicalScopes &LScopes, const MachineInstr *DbgValue, const MachineInstr *RangeEnd, const InstructionOrdering &Ordering)
 Determine whether a singular DBG_VALUE is valid for the entirety of its enclosing lexical scope.
 
static std::pair< DebugLoc, boolfindPrologueEndLoc (const MachineFunction *MF)
 
static void recordSourceLine (AsmPrinter &Asm, unsigned Line, unsigned Col, const MDNode *S, unsigned Flags, unsigned CUID, uint16_t DwarfVersion, ArrayRef< std::unique_ptr< DwarfCompileUnit > > DCUs)
 Register a source line with debug info.
 
static dwarf::PubIndexEntryDescriptor computeIndexValue (DwarfUnit *CU, const DIE *Die)
 computeIndexValue - Compute the gdb index value for the DIE and CU.
 
static MCSymbolemitRnglistsTableHeader (AsmPrinter *Asm, const DwarfFile &Holder)
 
static MCSymbolemitLoclistsTableHeader (AsmPrinter *Asm, const DwarfDebug &DD)
 
template<typename Ranges , typename PayloadEmitter >
static void emitRangeList (DwarfDebug &DD, AsmPrinter *Asm, MCSymbol *Sym, const Ranges &R, const DwarfCompileUnit &CU, unsigned BaseAddressx, unsigned OffsetPair, unsigned StartxLength, unsigned EndOfList, StringRef(*StringifyEnum)(unsigned), bool ShouldUseBaseAddress, PayloadEmitter EmitPayload)
 
static void emitLocList (DwarfDebug &DD, AsmPrinter *Asm, const DebugLocStream::List &List)
 
static void emitRangeList (DwarfDebug &DD, AsmPrinter *Asm, const RangeSpanList &List)
 Emit a single range list. We handle both DWARF v5 and earlier.
 
static void emitMacroHeader (AsmPrinter *Asm, const DwarfDebug &DD, const DwarfCompileUnit &CU, uint16_t DwarfVersion)
 Emit the header of a DWARF 5 macro section, or the GNU extension for DWARF 4.
 

Variables

static cl::opt< boolUseDwarfRangesBaseAddressSpecifier ("use-dwarf-ranges-base-address-specifier", cl::Hidden, cl::desc("Use base address specifiers in debug_ranges"), cl::init(false))
 
static cl::opt< boolGenerateARangeSection ("generate-arange-section", cl::Hidden, cl::desc("Generate dwarf aranges"), cl::init(false))
 
static cl::opt< boolGenerateDwarfTypeUnits ("generate-type-units", cl::Hidden, cl::desc("Generate DWARF4 type units."), cl::init(false))
 
static cl::opt< boolSplitDwarfCrossCuReferences ("split-dwarf-cross-cu-references", cl::Hidden, cl::desc("Enable cross-cu references in DWO files"), cl::init(false))
 
static cl::opt< DefaultOnOffUnknownLocations ("use-unknown-locations", cl::Hidden, cl::desc("Make an absence of debug location information explicit."), cl::values(clEnumVal(Default, "At top of block or after label"), clEnumVal(Enable, "In all cases"), clEnumVal(Disable, "Never")), cl::init(Default))
 
static cl::opt< AccelTableKindAccelTables ("accel-tables", cl::Hidden, cl::desc("Output dwarf accelerator tables."), cl::values(clEnumValN(AccelTableKind::Default, "Default", "Default for platform"), clEnumValN(AccelTableKind::None, "Disable", "Disabled."), clEnumValN(AccelTableKind::Apple, "Apple", "Apple"), clEnumValN(AccelTableKind::Dwarf, "Dwarf", "DWARF")), cl::init(AccelTableKind::Default))
 
static cl::opt< DefaultOnOffDwarfInlinedStrings ("dwarf-inlined-strings", cl::Hidden, cl::desc("Use inlined strings rather than string section."), cl::values(clEnumVal(Default, "Default for platform"), clEnumVal(Enable, "Enabled"), clEnumVal(Disable, "Disabled")), cl::init(Default))
 
static cl::opt< boolNoDwarfRangesSection ("no-dwarf-ranges-section", cl::Hidden, cl::desc("Disable emission .debug_ranges section."), cl::init(false))
 
static cl::opt< DefaultOnOffDwarfSectionsAsReferences ("dwarf-sections-as-references", cl::Hidden, cl::desc("Use sections+offset as references rather than labels."), cl::values(clEnumVal(Default, "Default for platform"), clEnumVal(Enable, "Enabled"), clEnumVal(Disable, "Disabled")), cl::init(Default))
 
static cl::opt< boolUseGNUDebugMacro ("use-gnu-debug-macro", cl::Hidden, cl::desc("Emit the GNU .debug_macro format with DWARF <5"), cl::init(false))
 
static cl::opt< DefaultOnOffDwarfOpConvert ("dwarf-op-convert", cl::Hidden, cl::desc("Enable use of the DWARFv5 DW_OP_convert operator"), cl::values(clEnumVal(Default, "Default for platform"), clEnumVal(Enable, "Enabled"), clEnumVal(Disable, "Disabled")), cl::init(Default))
 
static cl::opt< LinkageNameOptionDwarfLinkageNames ("dwarf-linkage-names", cl::Hidden, cl::desc("Which DWARF linkage-name attributes to emit."), cl::values(clEnumValN(DefaultLinkageNames, "Default", "Default for platform"), clEnumValN(AllLinkageNames, "All", "All"), clEnumValN(AbstractLinkageNames, "Abstract", "Abstract subprograms")), cl::init(DefaultLinkageNames))
 
static cl::opt< DwarfDebug::MinimizeAddrInV5MinimizeAddrInV5Option ("minimize-addr-in-v5", cl::Hidden, cl::desc("Always use DW_AT_ranges in DWARFv5 whenever it could allow more " "address pool entry sharing to reduce relocations/object size"), cl::values(clEnumValN(DwarfDebug::MinimizeAddrInV5::Default, "Default", "Default address minimization strategy"), clEnumValN(DwarfDebug::MinimizeAddrInV5::Ranges, "Ranges", "Use rnglists for contiguous ranges if that allows " "using a pre-existing base address"), clEnumValN(DwarfDebug::MinimizeAddrInV5::Expressions, "Expressions", "Use exprloc addrx+offset expressions for any " "address with a prior base address"), clEnumValN(DwarfDebug::MinimizeAddrInV5::Form, "Form", "Use addrx+offset extension form for any address " "with a prior base address"), clEnumValN(DwarfDebug::MinimizeAddrInV5::Disabled, "Disabled", "Stuff")), cl::init(DwarfDebug::MinimizeAddrInV5::Default))
 
static constexpr unsigned ULEB128PadSize = 4
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "dwarfdebug"

Definition at line 65 of file DwarfDebug.cpp.

◆ HANDLE_MACRO_FLAG

#define HANDLE_MACRO_FLAG (   ID,
  NAME 
)    MACRO_FLAG_##NAME = ID,

Typedef Documentation

◆ ClobberedRegSet

Container for the set of registers known to be clobbered on the path to a call site.

Definition at line 584 of file DwarfDebug.cpp.

◆ FwdRegWorklist

Register worklist for finding call site values.

Definition at line 581 of file DwarfDebug.cpp.

Enumeration Type Documentation

◆ DefaultOnOff

Enumerator
Default 
Enable 
Disable 

Definition at line 87 of file DwarfDebug.cpp.

◆ LinkageNameOption

Enumerator
DefaultLinkageNames 
AllLinkageNames 
AbstractLinkageNames 

Definition at line 137 of file DwarfDebug.cpp.

Function Documentation

◆ addToFwdRegWorklist()

static void addToFwdRegWorklist ( FwdRegWorklist Worklist,
unsigned  Reg,
const DIExpression Expr,
ArrayRef< FwdRegParamInfo ParamsToAdd 
)
static

Add Reg to the worklist, if it's not already present, and mark that the given parameter registers' values can (potentially) be described using that register and an debug expression.

Definition at line 632 of file DwarfDebug.cpp.

References assert(), combineDIExpressions(), D, I, llvm::MapVector< KeyT, ValueT, MapType, VectorType >::insert(), and llvm::none_of().

Referenced by interpretValues().

◆ collectCallSiteParameters()

static void collectCallSiteParameters ( const MachineInstr CallMI,
ParamSet Params 
)
static

◆ combineDIExpressions()

static const DIExpression * combineDIExpressions ( const DIExpression Original,
const DIExpression Addition 
)
static

Append the expression Addition to Original and return the result.

Definition at line 587 of file DwarfDebug.cpp.

References llvm::DIExpression::append(), llvm::erase(), llvm::DIExpression::getElements(), llvm::DIExpression::isImplicit(), and llvm::ArrayRef< T >::vec().

Referenced by addToFwdRegWorklist(), and finishCallSiteParams().

◆ computeAccelTableKind()

static AccelTableKind computeAccelTableKind ( unsigned  DwarfVersion,
bool  GenerateTypeUnits,
DebuggerKind  Tuning,
const Triple TT 
)
static

◆ computeIndexValue()

static dwarf::PubIndexEntryDescriptor computeIndexValue ( DwarfUnit CU,
const DIE Die 
)
static

◆ emitLocList()

static void emitLocList ( DwarfDebug DD,
AsmPrinter Asm,
const DebugLocStream::List List 
)
static

◆ emitLoclistsTableHeader()

static MCSymbol * emitLoclistsTableHeader ( AsmPrinter Asm,
const DwarfDebug DD 
)
static

◆ emitMacroHeader()

static void emitMacroHeader ( AsmPrinter Asm,
const DwarfDebug DD,
const DwarfCompileUnit CU,
uint16_t  DwarfVersion 
)
static

Emit the header of a DWARF 5 macro section, or the GNU extension for DWARF 4.

Definition at line 3192 of file DwarfDebug.cpp.

References llvm::DwarfDebug::useSplitDwarf().

◆ emitRangeList() [1/2]

static void emitRangeList ( DwarfDebug DD,
AsmPrinter Asm,
const RangeSpanList List 
)
static

Emit a single range list. We handle both DWARF v5 and earlier.

Definition at line 3140 of file DwarfDebug.cpp.

References emitRangeList(), llvm::DwarfDebug::getDwarfVersion(), llvm::List, and llvm::dwarf::RangeListEncodingString().

◆ emitRangeList() [2/2]

template<typename Ranges , typename PayloadEmitter >
static void emitRangeList ( DwarfDebug DD,
AsmPrinter Asm,
MCSymbol Sym,
const Ranges &  R,
const DwarfCompileUnit CU,
unsigned  BaseAddressx,
unsigned  OffsetPair,
unsigned  StartxLength,
unsigned  EndOfList,
StringRef(*)(unsigned StringifyEnum,
bool  ShouldUseBaseAddress,
PayloadEmitter  EmitPayload 
)
static

◆ emitRnglistsTableHeader()

static MCSymbol * emitRnglistsTableHeader ( AsmPrinter Asm,
const DwarfFile Holder 
)
static

◆ findPrologueEndLoc()

static std::pair< DebugLoc, bool > findPrologueEndLoc ( const MachineFunction MF)
static

◆ finishCallSiteParams()

template<typename ValT >
static void finishCallSiteParams ( ValT  Val,
const DIExpression Expr,
ArrayRef< FwdRegParamInfo DescribedParams,
ParamSet Params 
)
static

Emit call site parameter entries that are described by the given value and debug expression.

Definition at line 601 of file DwarfDebug.cpp.

References assert(), combineDIExpressions(), llvm::DIExpression::isEntryValue(), llvm::DIExpression::isValid(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().

Referenced by collectCallSiteParameters(), and interpretValues().

◆ forBothCUs()

template<typename Func >
static void forBothCUs ( DwarfCompileUnit CU,
Func  F 
)
static

Definition at line 533 of file DwarfDebug.cpp.

References F.

◆ getDebugLocValue()

static DbgValueLoc getDebugLocValue ( const MachineInstr MI)
static

Get .debug_loc entry for the instruction range starting at MI.

Definition at line 235 of file DwarfDebug.cpp.

References assert(), llvm::DIExpression::convertToNonVariadicExpression(), llvm_unreachable, MI, and llvm::SmallVectorTemplateBase< T, bool >::push_back().

◆ getFragmentOffsetInBits()

static uint64_t getFragmentOffsetInBits ( const DIExpression Expr)
static

Definition at line 268 of file DwarfDebug.cpp.

References llvm::DIExpression::getFragmentInfo().

◆ getObjCClassCategory()

static void getObjCClassCategory ( StringRef  In,
StringRef Class,
StringRef Category 
)
static

Definition at line 462 of file DwarfDebug.cpp.

References hasObjCCategory().

Referenced by llvm::DwarfDebug::addSubprogramNames().

◆ getObjCMethodName()

static StringRef getObjCMethodName ( StringRef  In)
static

Definition at line 474 of file DwarfDebug.cpp.

Referenced by llvm::DwarfDebug::addSubprogramNames().

◆ getRetainedNodeScope()

static const DILocalScope * getRetainedNodeScope ( const MDNode N)
static

Definition at line 1511 of file DwarfDebug.cpp.

References llvm::DIScope::getScope(), llvm_unreachable, and N.

Referenced by llvm::DwarfDebug::endFunctionImpl().

◆ hasObjCCategory()

static bool hasObjCCategory ( StringRef  Name)
static

Definition at line 455 of file DwarfDebug.cpp.

References isObjCClass(), and Name.

◆ interpretNextInstr()

static bool interpretNextInstr ( const MachineInstr CurMI,
FwdRegWorklist ForwardedRegWorklist,
ParamSet Params,
ClobberedRegSet ClobberedRegUnits 
)
static

◆ interpretValues()

static void interpretValues ( const MachineInstr CurMI,
FwdRegWorklist ForwardedRegWorklist,
ParamSet Params,
ClobberedRegSet ClobberedRegUnits 
)
static

◆ isObjCClass()

static bool isObjCClass ( StringRef  Name)
static

Definition at line 451 of file DwarfDebug.cpp.

References Name.

Referenced by llvm::DwarfDebug::addSubprogramNames(), and hasObjCCategory().

◆ recordSourceLine()

static void recordSourceLine ( AsmPrinter Asm,
unsigned  Line,
unsigned  Col,
const MDNode S,
unsigned  Flags,
unsigned  CUID,
uint16_t  DwarfVersion,
ArrayRef< std::unique_ptr< DwarfCompileUnit > >  DCUs 
)
static

Register a source line with debug info.

Returns the unique label that was emitted and which provides correspondence to the source line list.

Definition at line 2168 of file DwarfDebug.cpp.

◆ sortGlobalExprs()

Sort and unique GVEs by comparing their fragment offset.

Definition at line 1120 of file DwarfDebug.cpp.

References A, B, llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::SmallVectorImpl< T >::erase(), if(), llvm::sort(), and llvm::unique().

Referenced by llvm::DwarfDebug::beginModule().

◆ STATISTIC()

STATISTIC ( NumCSParams  ,
"Number of dbg call site params created"   
)

◆ validThroughout()

static bool validThroughout ( LexicalScopes LScopes,
const MachineInstr DbgValue,
const MachineInstr RangeEnd,
const InstructionOrdering Ordering 
)
static

Determine whether a singular DBG_VALUE is valid for the entirety of its enclosing lexical scope.

The check ensures there are no other instructions in the same lexical scope preceding the DBG_VALUE and that its range is either open or otherwise rolls off the end of the scope.

Definition at line 1592 of file DwarfDebug.cpp.

References llvm::all_of(), assert(), DL, llvm::LexicalScopes::findLexicalScope(), llvm::MachineInstr::FrameSetup, llvm::MachineInstr::getParent(), llvm::LexicalScope::getRanges(), MBB, llvm::MachineBasicBlock::pred_empty(), and llvm::MachineBasicBlock::rend().

Variable Documentation

◆ AccelTables

cl::opt< AccelTableKind > AccelTables("accel-tables", cl::Hidden, cl::desc("Output dwarf accelerator tables."), cl::values(clEnumValN(AccelTableKind::Default, "Default", "Default for platform"), clEnumValN(AccelTableKind::None, "Disable", "Disabled."), clEnumValN(AccelTableKind::Apple, "Apple", "Apple"), clEnumValN(AccelTableKind::Dwarf, "Dwarf", "DWARF")), cl::init(AccelTableKind::Default)) ( "accel-tables"  ,
cl::Hidden  ,
cl::desc("Output dwarf accelerator tables.")  ,
cl::values(clEnumValN(AccelTableKind::Default, "Default", "Default for platform"), clEnumValN(AccelTableKind::None, "Disable", "Disabled."), clEnumValN(AccelTableKind::Apple, "Apple", "Apple"), clEnumValN(AccelTableKind::Dwarf, "Dwarf", "DWARF"))  ,
cl::init(AccelTableKind::Default  
)
static

Referenced by computeAccelTableKind().

◆ DwarfInlinedStrings

cl::opt< DefaultOnOff > DwarfInlinedStrings("dwarf-inlined-strings", cl::Hidden, cl::desc("Use inlined strings rather than string section."), cl::values(clEnumVal(Default, "Default for platform"), clEnumVal(Enable, "Enabled"), clEnumVal(Disable, "Disabled")), cl::init(Default)) ( "dwarf-inlined-strings"  ,
cl::Hidden  ,
cl::desc("Use inlined strings rather than string section.")  ,
cl::values(clEnumVal(Default, "Default for platform"), clEnumVal(Enable, "Enabled"), clEnumVal(Disable, "Disabled"))  ,
cl::init(Default  
)
static

◆ DwarfLinkageNames

cl::opt< LinkageNameOption > DwarfLinkageNames("dwarf-linkage-names", cl::Hidden, cl::desc("Which DWARF linkage-name attributes to emit."), cl::values(clEnumValN(DefaultLinkageNames, "Default", "Default for platform"), clEnumValN(AllLinkageNames, "All", "All"), clEnumValN(AbstractLinkageNames, "Abstract", "Abstract subprograms")), cl::init(DefaultLinkageNames)) ( "dwarf-linkage-names"  ,
cl::Hidden  ,
cl::desc("Which DWARF linkage-name attributes to emit.")  ,
cl::values(clEnumValN(DefaultLinkageNames, "Default", "Default for platform"), clEnumValN(AllLinkageNames, "All", "All"), clEnumValN(AbstractLinkageNames, "Abstract", "Abstract subprograms"))  ,
cl::init(DefaultLinkageNames  
)
static

◆ DwarfOpConvert

cl::opt< DefaultOnOff > DwarfOpConvert("dwarf-op-convert", cl::Hidden, cl::desc("Enable use of the DWARFv5 DW_OP_convert operator"), cl::values(clEnumVal(Default, "Default for platform"), clEnumVal(Enable, "Enabled"), clEnumVal(Disable, "Disabled")), cl::init(Default)) ( "dwarf-op-convert"  ,
cl::Hidden  ,
cl::desc("Enable use of the DWARFv5 DW_OP_convert operator")  ,
cl::values(clEnumVal(Default, "Default for platform"), clEnumVal(Enable, "Enabled"), clEnumVal(Disable, "Disabled"))  ,
cl::init(Default  
)
static

◆ DwarfSectionsAsReferences

cl::opt< DefaultOnOff > DwarfSectionsAsReferences("dwarf-sections-as-references", cl::Hidden, cl::desc("Use sections+offset as references rather than labels."), cl::values(clEnumVal(Default, "Default for platform"), clEnumVal(Enable, "Enabled"), clEnumVal(Disable, "Disabled")), cl::init(Default)) ( "dwarf-sections-as-references"  ,
cl::Hidden  ,
cl::desc("Use sections+offset as references rather than labels.")  ,
cl::values(clEnumVal(Default, "Default for platform"), clEnumVal(Enable, "Enabled"), clEnumVal(Disable, "Disabled"))  ,
cl::init(Default  
)
static

◆ GenerateARangeSection

cl::opt< bool > GenerateARangeSection("generate-arange-section", cl::Hidden, cl::desc("Generate dwarf aranges"), cl::init(false)) ( "generate-arange-section"  ,
cl::Hidden  ,
cl::desc("Generate dwarf aranges")  ,
cl::init(false)   
)
static

◆ GenerateDwarfTypeUnits

cl::opt< bool > GenerateDwarfTypeUnits("generate-type-units", cl::Hidden, cl::desc("Generate DWARF4 type units."), cl::init(false)) ( "generate-type-units"  ,
cl::Hidden  ,
cl::desc("Generate DWARF4 type units.")  ,
cl::init(false)   
)
static

◆ MinimizeAddrInV5Option

cl::opt< DwarfDebug::MinimizeAddrInV5 > MinimizeAddrInV5Option("minimize-addr-in-v5", cl::Hidden, cl::desc("Always use DW_AT_ranges in DWARFv5 whenever it could allow more " "address pool entry sharing to reduce relocations/object size"), cl::values(clEnumValN(DwarfDebug::MinimizeAddrInV5::Default, "Default", "Default address minimization strategy"), clEnumValN(DwarfDebug::MinimizeAddrInV5::Ranges, "Ranges", "Use rnglists for contiguous ranges if that allows " "using a pre-existing base address"), clEnumValN(DwarfDebug::MinimizeAddrInV5::Expressions, "Expressions", "Use exprloc addrx+offset expressions for any " "address with a prior base address"), clEnumValN(DwarfDebug::MinimizeAddrInV5::Form, "Form", "Use addrx+offset extension form for any address " "with a prior base address"), clEnumValN(DwarfDebug::MinimizeAddrInV5::Disabled, "Disabled", "Stuff")), cl::init(DwarfDebug::MinimizeAddrInV5::Default)) ( "minimize-addr-in-v5"  ,
cl::Hidden  ,
cl::desc("Always use DW_AT_ranges in DWARFv5 whenever it could allow more " "address pool entry sharing to reduce relocations/object size")  ,
cl::values(clEnumValN(DwarfDebug::MinimizeAddrInV5::Default, "Default", "Default address minimization strategy"), clEnumValN(DwarfDebug::MinimizeAddrInV5::Ranges, "Ranges", "Use rnglists for contiguous ranges if that allows " "using a pre-existing base address"), clEnumValN(DwarfDebug::MinimizeAddrInV5::Expressions, "Expressions", "Use exprloc addrx+offset expressions for any " "address with a prior base address"), clEnumValN(DwarfDebug::MinimizeAddrInV5::Form, "Form", "Use addrx+offset extension form for any address " "with a prior base address"), clEnumValN(DwarfDebug::MinimizeAddrInV5::Disabled, "Disabled", "Stuff"))  ,
cl::init(DwarfDebug::MinimizeAddrInV5::Default  
)
static

◆ NoDwarfRangesSection

cl::opt< bool > NoDwarfRangesSection("no-dwarf-ranges-section", cl::Hidden, cl::desc("Disable emission .debug_ranges section."), cl::init(false)) ( "no-dwarf-ranges-section"  ,
cl::Hidden  ,
cl::desc("Disable emission .debug_ranges section.")  ,
cl::init(false)   
)
static

◆ SplitDwarfCrossCuReferences

cl::opt< bool > SplitDwarfCrossCuReferences("split-dwarf-cross-cu-references", cl::Hidden, cl::desc("Enable cross-cu references in DWO files"), cl::init(false)) ( "split-dwarf-cross-cu-references"  ,
cl::Hidden  ,
cl::desc("Enable cross-cu references in DWO files")  ,
cl::init(false)   
)
static

◆ ULEB128PadSize

constexpr unsigned ULEB128PadSize = 4
staticconstexpr

◆ UnknownLocations

cl::opt< DefaultOnOff > UnknownLocations("use-unknown-locations", cl::Hidden, cl::desc("Make an absence of debug location information explicit."), cl::values(clEnumVal(Default, "At top of block or after label"), clEnumVal(Enable, "In all cases"), clEnumVal(Disable, "Never")), cl::init(Default)) ( "use-unknown-locations"  ,
cl::Hidden  ,
cl::desc("Make an absence of debug location information explicit.")  ,
cl::values(clEnumVal(Default, "At top of block or after label"), clEnumVal(Enable, "In all cases"), clEnumVal(Disable, "Never"))  ,
cl::init(Default  
)
static

◆ UseDwarfRangesBaseAddressSpecifier

cl::opt< bool > UseDwarfRangesBaseAddressSpecifier("use-dwarf-ranges-base-address-specifier", cl::Hidden, cl::desc("Use base address specifiers in debug_ranges"), cl::init(false)) ( "use-dwarf-ranges-base-address-specifier"  ,
cl::Hidden  ,
cl::desc("Use base address specifiers in debug_ranges")  ,
cl::init(false)   
)
static

◆ UseGNUDebugMacro

cl::opt< bool > UseGNUDebugMacro("use-gnu-debug-macro", cl::Hidden, cl::desc("Emit the GNU .debug_macro format with DWARF <5"), cl::init(false)) ( "use-gnu-debug-macro"  ,
cl::Hidden  ,
cl::desc("Emit the GNU .debug_macro format with DWARF <5")  ,
cl::init(false)   
)
static