LLVM 20.0.0git
Macros | Functions
Dwarf.cpp File Reference
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/TargetParser/Triple.h"
#include "llvm/BinaryFormat/Dwarf.def"

Go to the source code of this file.

Macros

#define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR, KIND)
 
#define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR, KIND)    .Case("DW_TAG_" #NAME, DW_TAG_##NAME)
 
#define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR, KIND)
 
#define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR, KIND)
 
#define HANDLE_DW_AT(ID, NAME, VERSION, VENDOR)
 
#define HANDLE_DW_AT(ID, NAME, VERSION, VENDOR)
 
#define HANDLE_DW_AT(ID, NAME, VERSION, VENDOR)
 
#define HANDLE_DW_FORM(ID, NAME, VERSION, VENDOR)
 
#define HANDLE_DW_FORM(ID, NAME, VERSION, VENDOR)
 
#define HANDLE_DW_FORM(ID, NAME, VERSION, VENDOR)
 
#define HANDLE_DW_OP(ID, NAME, OPERANDS, ARITY, VERSION, VENDOR)
 
#define HANDLE_DW_OP(ID, NAME, OPERANDS, ARITY, VERSION, VENDOR)    .Case("DW_OP_" #NAME, DW_OP_##NAME)
 
#define HANDLE_DW_OP_LLVM_USEROP(ID, NAME)
 
#define HANDLE_DW_OP_LLVM_USEROP(ID, NAME)   .Case(#NAME, DW_OP_LLVM_##NAME)
 
#define HANDLE_DW_OP(ID, NAME, OPERANDS, ARITY, VERSION, VENDOR)
 
#define HANDLE_DW_OP(ID, NAME, OPERANDS, ARITY, VERSION, VENDOR)
 
#define HANDLE_DW_OP(ID, NAME, OPERANDS, ARITY, VERSION, VENDOR)
 
#define HANDLE_DW_OP(ID, NAME, OPERANDS, ARITY, VERSION, VENDOR)
 
#define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR)
 
#define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR)    .Case("DW_ATE_" #NAME, DW_ATE_##NAME)
 
#define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR)
 
#define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR)
 
#define HANDLE_DW_VIRTUALITY(ID, NAME)
 
#define HANDLE_DW_VIRTUALITY(ID, NAME)    .Case("DW_VIRTUALITY_" #NAME, DW_VIRTUALITY_##NAME)
 
#define HANDLE_DW_LANG(ID, NAME, LOWER_BOUND, VERSION, VENDOR)
 
#define HANDLE_DW_LANG(ID, NAME, LOWER_BOUND, VERSION, VENDOR)    .Case("DW_LANG_" #NAME, DW_LANG_##NAME)
 
#define HANDLE_DW_LANG(ID, NAME, LOWER_BOUND, VERSION, VENDOR)
 
#define HANDLE_DW_LANG(ID, NAME, LOWER_BOUND, VERSION, VENDOR)
 
#define HANDLE_DW_LANG(ID, NAME, LOWER_BOUND, VERSION, VENDOR)
 
#define HANDLE_DW_LNAME(ID, NAME, DESC, LOWER_BOUND)
 
#define HANDLE_DW_CC(ID, NAME)
 
#define HANDLE_DW_CC(ID, NAME)   .Case("DW_CC_" #NAME, DW_CC_##NAME)
 
#define HANDLE_DW_LNS(ID, NAME)
 
#define HANDLE_DW_LNE(ID, NAME)
 
#define HANDLE_DW_MACRO(ID, NAME)
 
#define HANDLE_DW_MACRO_GNU(ID, NAME)
 
#define HANDLE_DW_MACRO(ID, NAME)   .Case("DW_MACRO_" #NAME, ID)
 
#define HANDLE_DW_RLE(ID, NAME)
 
#define HANDLE_DW_LLE(ID, NAME)
 
#define SELECT_AARCH64   (Arch == llvm::Triple::aarch64_be || Arch == llvm::Triple::aarch64)
 
#define SELECT_MIPS64   Arch == llvm::Triple::mips64
 
#define SELECT_SPARC   (Arch == llvm::Triple::sparc || Arch == llvm::Triple::sparcv9)
 
#define SELECT_X86   (Arch == llvm::Triple::x86 || Arch == llvm::Triple::x86_64)
 
#define HANDLE_DW_CFA(ID, NAME)
 
#define HANDLE_DW_CFA_PRED(ID, NAME, PRED)
 
#define HANDLE_DW_CFA_PRED(ID, NAME, PRED)
 
#define HANDLE_DW_CFA(ID, NAME)
 
#define HANDLE_DW_APPLE_PROPERTY(ID, NAME)
 
#define HANDLE_DW_UT(ID, NAME)
 
#define HANDLE_DW_IDX(ID, NAME)
 
#define HANDLE_DW_RLE(ID, NAME)
 

Functions

static StringRef LlvmUserOperationEncodingString (unsigned Encoding)
 
static unsigned getLlvmUserOperationEncoding (StringRef LlvmUserOperationEncodingString)
 

Macro Definition Documentation

◆ HANDLE_DW_APPLE_PROPERTY

#define HANDLE_DW_APPLE_PROPERTY (   ID,
  NAME 
)
Value:
case DW_APPLE_PROPERTY_##NAME: \
return "DW_APPLE_PROPERTY_" #NAME;

◆ HANDLE_DW_AT [1/3]

#define HANDLE_DW_AT (   ID,
  NAME,
  VERSION,
  VENDOR 
)
Value:
case DW_AT_##NAME: \
return "DW_AT_" #NAME;

◆ HANDLE_DW_AT [2/3]

#define HANDLE_DW_AT (   ID,
  NAME,
  VERSION,
  VENDOR 
)
Value:
case DW_AT_##NAME: \
return VERSION;

◆ HANDLE_DW_AT [3/3]

#define HANDLE_DW_AT (   ID,
  NAME,
  VERSION,
  VENDOR 
)
Value:
case DW_AT_##NAME: \
return DWARF_VENDOR_##VENDOR;

◆ HANDLE_DW_ATE [1/4]

#define HANDLE_DW_ATE (   ID,
  NAME,
  VERSION,
  VENDOR 
)
Value:
case DW_ATE_##NAME: \
return "DW_ATE_" #NAME;

◆ HANDLE_DW_ATE [2/4]

#define HANDLE_DW_ATE (   ID,
  NAME,
  VERSION,
  VENDOR 
)     .Case("DW_ATE_" #NAME, DW_ATE_##NAME)

◆ HANDLE_DW_ATE [3/4]

#define HANDLE_DW_ATE (   ID,
  NAME,
  VERSION,
  VENDOR 
)
Value:
case DW_ATE_##NAME: \
return VERSION;

◆ HANDLE_DW_ATE [4/4]

#define HANDLE_DW_ATE (   ID,
  NAME,
  VERSION,
  VENDOR 
)
Value:
case DW_ATE_##NAME: \
return DWARF_VENDOR_##VENDOR;

◆ HANDLE_DW_CC [1/2]

#define HANDLE_DW_CC (   ID,
  NAME 
)
Value:
case DW_CC_##NAME: \
return "DW_CC_" #NAME;

◆ HANDLE_DW_CC [2/2]

#define HANDLE_DW_CC (   ID,
  NAME 
)    .Case("DW_CC_" #NAME, DW_CC_##NAME)

◆ HANDLE_DW_CFA [1/2]

#define HANDLE_DW_CFA (   ID,
  NAME 
)

◆ HANDLE_DW_CFA [2/2]

#define HANDLE_DW_CFA (   ID,
  NAME 
)
Value:
case DW_CFA_##NAME: \
return "DW_CFA_" #NAME;

◆ HANDLE_DW_CFA_PRED [1/2]

#define HANDLE_DW_CFA_PRED (   ID,
  NAME,
  PRED 
)
Value:
if (ID == Encoding && PRED) \
return "DW_CFA_" #NAME;

◆ HANDLE_DW_CFA_PRED [2/2]

#define HANDLE_DW_CFA_PRED (   ID,
  NAME,
  PRED 
)

◆ HANDLE_DW_FORM [1/3]

#define HANDLE_DW_FORM (   ID,
  NAME,
  VERSION,
  VENDOR 
)
Value:
case DW_FORM_##NAME: \
return "DW_FORM_" #NAME;

◆ HANDLE_DW_FORM [2/3]

#define HANDLE_DW_FORM (   ID,
  NAME,
  VERSION,
  VENDOR 
)
Value:
case DW_FORM_##NAME: \
return VERSION;

◆ HANDLE_DW_FORM [3/3]

#define HANDLE_DW_FORM (   ID,
  NAME,
  VERSION,
  VENDOR 
)
Value:
case DW_FORM_##NAME: \
return DWARF_VENDOR_##VENDOR;

◆ HANDLE_DW_IDX

#define HANDLE_DW_IDX (   ID,
  NAME 
)
Value:
case DW_IDX_##NAME: \
return "DW_IDX_" #NAME;

◆ HANDLE_DW_LANG [1/5]

#define HANDLE_DW_LANG (   ID,
  NAME,
  LOWER_BOUND,
  VERSION,
  VENDOR 
)
Value:
case DW_LANG_##NAME: \
return "DW_LANG_" #NAME;

◆ HANDLE_DW_LANG [2/5]

#define HANDLE_DW_LANG (   ID,
  NAME,
  LOWER_BOUND,
  VERSION,
  VENDOR 
)     .Case("DW_LANG_" #NAME, DW_LANG_##NAME)

◆ HANDLE_DW_LANG [3/5]

#define HANDLE_DW_LANG (   ID,
  NAME,
  LOWER_BOUND,
  VERSION,
  VENDOR 
)
Value:
case DW_LANG_##NAME: \
return VERSION;

◆ HANDLE_DW_LANG [4/5]

#define HANDLE_DW_LANG (   ID,
  NAME,
  LOWER_BOUND,
  VERSION,
  VENDOR 
)
Value:
case DW_LANG_##NAME: \
return DWARF_VENDOR_##VENDOR;

◆ HANDLE_DW_LANG [5/5]

#define HANDLE_DW_LANG (   ID,
  NAME,
  LOWER_BOUND,
  VERSION,
  VENDOR 
)
Value:
case DW_LANG_##NAME: \
return LOWER_BOUND;

◆ HANDLE_DW_LLE

#define HANDLE_DW_LLE (   ID,
  NAME 
)
Value:
case DW_LLE_##NAME: \
return "DW_LLE_" #NAME;

◆ HANDLE_DW_LNAME

#define HANDLE_DW_LNAME (   ID,
  NAME,
  DESC,
  LOWER_BOUND 
)
Value:
case DW_LNAME_##NAME: \
return DESC;
#define DESC

◆ HANDLE_DW_LNE

#define HANDLE_DW_LNE (   ID,
  NAME 
)
Value:
case DW_LNE_##NAME: \
return "DW_LNE_" #NAME;

◆ HANDLE_DW_LNS

#define HANDLE_DW_LNS (   ID,
  NAME 
)
Value:
case DW_LNS_##NAME: \
return "DW_LNS_" #NAME;

◆ HANDLE_DW_MACRO [1/2]

#define HANDLE_DW_MACRO (   ID,
  NAME 
)
Value:
case DW_MACRO_##NAME: \
return "DW_MACRO_" #NAME;

◆ HANDLE_DW_MACRO [2/2]

#define HANDLE_DW_MACRO (   ID,
  NAME 
)    .Case("DW_MACRO_" #NAME, ID)

◆ HANDLE_DW_MACRO_GNU

#define HANDLE_DW_MACRO_GNU (   ID,
  NAME 
)
Value:
case DW_MACRO_GNU_##NAME: \
return "DW_MACRO_GNU_" #NAME;

◆ HANDLE_DW_OP [1/6]

#define HANDLE_DW_OP (   ID,
  NAME,
  OPERANDS,
  ARITY,
  VERSION,
  VENDOR 
)
Value:
case DW_OP_##NAME: \
return "DW_OP_" #NAME;

◆ HANDLE_DW_OP [2/6]

#define HANDLE_DW_OP (   ID,
  NAME,
  OPERANDS,
  ARITY,
  VERSION,
  VENDOR 
)     .Case("DW_OP_" #NAME, DW_OP_##NAME)

◆ HANDLE_DW_OP [3/6]

#define HANDLE_DW_OP (   ID,
  NAME,
  OPERANDS,
  ARITY,
  VERSION,
  VENDOR 
)
Value:
case DW_OP_##NAME: \
return VERSION;

◆ HANDLE_DW_OP [4/6]

#define HANDLE_DW_OP (   ID,
  NAME,
  OPERANDS,
  ARITY,
  VERSION,
  VENDOR 
)
Value:
case DW_OP_##NAME: \
if (OPERANDS == -1) \
return std::nullopt; \
return OPERANDS;

◆ HANDLE_DW_OP [5/6]

#define HANDLE_DW_OP (   ID,
  NAME,
  OPERANDS,
  ARITY,
  VERSION,
  VENDOR 
)
Value:
case DW_OP_##NAME: \
if (ARITY == -1) \
return std::nullopt; \
return ARITY;

◆ HANDLE_DW_OP [6/6]

#define HANDLE_DW_OP (   ID,
  NAME,
  OPERANDS,
  ARITY,
  VERSION,
  VENDOR 
)
Value:
case DW_OP_##NAME: \
return DWARF_VENDOR_##VENDOR;

◆ HANDLE_DW_OP_LLVM_USEROP [1/2]

#define HANDLE_DW_OP_LLVM_USEROP (   ID,
  NAME 
)
Value:
case DW_OP_LLVM_##NAME: \
return "DW_OP_LLVM_" #NAME;

◆ HANDLE_DW_OP_LLVM_USEROP [2/2]

#define HANDLE_DW_OP_LLVM_USEROP (   ID,
  NAME 
)    .Case(#NAME, DW_OP_LLVM_##NAME)

◆ HANDLE_DW_RLE [1/2]

#define HANDLE_DW_RLE (   ID,
  NAME 
)
Value:
case DW_RLE_##NAME: \
return "DW_RLE_" #NAME;

◆ HANDLE_DW_RLE [2/2]

#define HANDLE_DW_RLE (   ID,
  NAME 
)
Value:
case DW_RLE_##NAME: \
return "DW_RLE_" #NAME;

◆ HANDLE_DW_TAG [1/4]

#define HANDLE_DW_TAG (   ID,
  NAME,
  VERSION,
  VENDOR,
  KIND 
)
Value:
case DW_TAG_##NAME: \
return "DW_TAG_" #NAME;

◆ HANDLE_DW_TAG [2/4]

#define HANDLE_DW_TAG (   ID,
  NAME,
  VERSION,
  VENDOR,
  KIND 
)     .Case("DW_TAG_" #NAME, DW_TAG_##NAME)

◆ HANDLE_DW_TAG [3/4]

#define HANDLE_DW_TAG (   ID,
  NAME,
  VERSION,
  VENDOR,
  KIND 
)
Value:
case DW_TAG_##NAME: \
return VERSION;

◆ HANDLE_DW_TAG [4/4]

#define HANDLE_DW_TAG (   ID,
  NAME,
  VERSION,
  VENDOR,
  KIND 
)
Value:
case DW_TAG_##NAME: \
return DWARF_VENDOR_##VENDOR;

◆ HANDLE_DW_UT

#define HANDLE_DW_UT (   ID,
  NAME 
)
Value:
case DW_UT_##NAME: \
return "DW_UT_" #NAME;

◆ HANDLE_DW_VIRTUALITY [1/2]

#define HANDLE_DW_VIRTUALITY (   ID,
  NAME 
)
Value:
case DW_VIRTUALITY_##NAME: \
return "DW_VIRTUALITY_" #NAME;

◆ HANDLE_DW_VIRTUALITY [2/2]

#define HANDLE_DW_VIRTUALITY (   ID,
  NAME 
)     .Case("DW_VIRTUALITY_" #NAME, DW_VIRTUALITY_##NAME)

◆ SELECT_AARCH64

#define SELECT_AARCH64   (Arch == llvm::Triple::aarch64_be || Arch == llvm::Triple::aarch64)

◆ SELECT_MIPS64

#define SELECT_MIPS64   Arch == llvm::Triple::mips64

◆ SELECT_SPARC

#define SELECT_SPARC   (Arch == llvm::Triple::sparc || Arch == llvm::Triple::sparcv9)

◆ SELECT_X86

#define SELECT_X86   (Arch == llvm::Triple::x86 || Arch == llvm::Triple::x86_64)

Function Documentation

◆ getLlvmUserOperationEncoding()

static unsigned getLlvmUserOperationEncoding ( StringRef  LlvmUserOperationEncodingString)
static

◆ LlvmUserOperationEncodingString()

static StringRef LlvmUserOperationEncodingString ( unsigned  Encoding)
static

Definition at line 181 of file Dwarf.cpp.

References llvm_unreachable.

Referenced by getLlvmUserOperationEncoding(), and llvm::dwarf::SubOperationEncodingString().