LLVM 18.0.0git
DwarfCompileUnit.h
Go to the documentation of this file.
1//===- llvm/CodeGen/DwarfCompileUnit.h - Dwarf Compile Unit -----*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file contains support for writing dwarf compile unit.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_CODEGEN_ASMPRINTER_DWARFCOMPILEUNIT_H
14#define LLVM_LIB_CODEGEN_ASMPRINTER_DWARFCOMPILEUNIT_H
15
16#include "DwarfDebug.h"
17#include "DwarfUnit.h"
18#include "llvm/ADT/ArrayRef.h"
19#include "llvm/ADT/DenseMap.h"
21#include "llvm/ADT/StringMap.h"
22#include "llvm/ADT/StringRef.h"
28#include <cassert>
29#include <cstdint>
30#include <memory>
31
32namespace llvm {
33
34class AsmPrinter;
35class DIE;
36class DIELoc;
37class DIEValueList;
38class DwarfFile;
39class GlobalVariable;
40class MCExpr;
41class MCSymbol;
42class MDNode;
43
44enum class UnitKind { Skeleton, Full };
45
46class DwarfCompileUnit final : public DwarfUnit {
47 /// A numeric ID unique among all CUs in the module
48 unsigned UniqueID;
49 bool HasRangeLists = false;
50
51 /// The start of the unit line section, this is also
52 /// reused in appyStmtList.
53 MCSymbol *LineTableStartSym;
54
55 /// Skeleton unit associated with this unit.
56 DwarfCompileUnit *Skeleton = nullptr;
57
58 /// The start of the unit within its section.
59 MCSymbol *LabelBegin = nullptr;
60
61 /// The start of the unit macro info within macro section.
62 MCSymbol *MacroLabelBegin;
63
64 /// GlobalNames - A map of globally visible named entities for this unit.
65 StringMap<const DIE *> GlobalNames;
66
67 /// GlobalTypes - A map of globally visible types for this unit.
68 StringMap<const DIE *> GlobalTypes;
69
70 // List of ranges for a given compile unit.
72
73 // The base address of this unit, if any. Used for relative references in
74 // ranges/locs.
75 const MCSymbol *BaseAddress = nullptr;
76
77 using MDNodeSetVector =
80
81 // List of entities (either static locals, types or imports) that
82 // belong to subprograms within this CU.
83 MDNodeSetVector DeferredLocalDecls;
84
85 // List of concrete lexical block scopes belong to subprograms within this CU.
87
88 // List of abstract local scopes (either DISubprogram or DILexicalBlock).
89 DenseMap<const DILocalScope *, DIE *> AbstractLocalScopeDIEs;
90
92
93 /// DWO ID for correlating skeleton and split units.
94 uint64_t DWOId = 0;
95
96 const DIFile *LastFile = nullptr;
97 unsigned LastFileID;
98
99 /// Construct a DIE for the given DbgVariable without initializing the
100 /// DbgVariable's DIE reference.
101 DIE *constructVariableDIEImpl(const DbgVariable &DV, bool Abstract);
102
103 bool isDwoUnit() const override;
104
105 DenseMap<const DILocalScope *, DIE *> &getAbstractScopeDIEs() {
106 if (isDwoUnit() && !DD->shareAcrossDWOCUs())
107 return AbstractLocalScopeDIEs;
108 return DU->getAbstractScopeDIEs();
109 }
110
112 if (isDwoUnit() && !DD->shareAcrossDWOCUs())
113 return AbstractEntities;
114 return DU->getAbstractEntities();
115 }
116
117 void finishNonUnitTypeDIE(DIE& D, const DICompositeType *CTy) override;
118
119 /// Add info for Wasm-global-based relocation.
120 void addWasmRelocBaseGlobal(DIELoc *Loc, StringRef GlobalName,
121 uint64_t GlobalIndex);
122
123public:
124 DwarfCompileUnit(unsigned UID, const DICompileUnit *Node, AsmPrinter *A,
125 DwarfDebug *DW, DwarfFile *DWU,
126 UnitKind Kind = UnitKind::Full);
127
128 bool hasRangeLists() const { return HasRangeLists; }
129 unsigned getUniqueID() const { return UniqueID; }
130
132 return Skeleton;
133 }
134
135 bool includeMinimalInlineScopes() const;
136
137 void initStmtList();
138
139 /// Apply the DW_AT_stmt_list from this compile unit to the specified DIE.
140 void applyStmtList(DIE &D);
141
142 /// Get line table start symbol for this unit.
143 MCSymbol *getLineTableStartSym() const { return LineTableStartSym; }
144
145 /// A pair of GlobalVariable and DIExpression.
146 struct GlobalExpr {
149 };
150
151 struct BaseTypeRef {
154 unsigned BitSize;
156 DIE *Die = nullptr;
157 };
158
159 std::vector<BaseTypeRef> ExprRefedBaseTypes;
160
161 /// Get or create global variable DIE.
162 DIE *
164 ArrayRef<GlobalExpr> GlobalExprs);
165
167 ArrayRef<GlobalExpr> GlobalExprs);
168
169 void addLocationAttribute(DIE *ToDIE, const DIGlobalVariable *GV,
170 ArrayRef<GlobalExpr> GlobalExprs);
171
172 /// addLabelAddress - Add a dwarf label attribute data and value using
173 /// either DW_FORM_addr or DW_FORM_GNU_addr_index.
175 const MCSymbol *Label);
176
177 /// addLocalLabelAddress - Add a dwarf label attribute data and value using
178 /// DW_FORM_addr only.
180 const MCSymbol *Label);
181
182 DwarfCompileUnit &getCU() override { return *this; }
183
184 unsigned getOrCreateSourceID(const DIFile *File) override;
185
186 /// addRange - Add an address range to the list of ranges for this unit.
187 void addRange(RangeSpan Range);
188
189 void attachLowHighPC(DIE &D, const MCSymbol *Begin, const MCSymbol *End);
190
191 /// Find DIE for the given subprogram and attach appropriate
192 /// DW_AT_low_pc and DW_AT_high_pc attributes. If there are global
193 /// variables in this scope then create and insert DIEs for these
194 /// variables.
196
197 void constructScopeDIE(LexicalScope *Scope, DIE &ParentScopeDIE);
198
199 /// A helper function to construct a RangeSpanList for a given
200 /// lexical scope.
201 void addScopeRangeList(DIE &ScopeDIE, SmallVector<RangeSpan, 2> Range);
202
204
206 const SmallVectorImpl<InsnRange> &Ranges);
207
208 /// This scope represents an inlined body of a function. Construct a
209 /// DIE to represent this concrete inlined copy of the function.
210 DIE *constructInlinedScopeDIE(LexicalScope *Scope, DIE &ParentScopeDIE);
211
212 /// Construct new DW_TAG_lexical_block for this scope and
213 /// attach DW_AT_low_pc/DW_AT_high_pc labels.
215
216 /// Get a DIE for the given DILexicalBlock.
217 /// Note that this function assumes that the DIE has been already created
218 /// and it's an error, if it hasn't.
220
221 /// constructVariableDIE - Construct a DIE for the given DbgVariable.
222 DIE *constructVariableDIE(DbgVariable &DV, bool Abstract = false);
223
225 DIE *&ObjectPointer);
226
227 /// Construct a DIE for the given DbgLabel.
229
230 void createBaseTypeDIEs();
231
232 /// Construct a DIE for a given scope.
233 /// This instance of 'getOrCreateContextDIE()' can handle DILocalScope.
234 DIE *getOrCreateContextDIE(const DIScope *Ty) override;
235
236 /// Construct a DIE for this subprogram scope.
238 LexicalScope *Scope);
239
240 DIE *createAndAddScopeChildren(LexicalScope *Scope, DIE &ScopeDIE);
241
243
244 /// Whether to use the GNU analog for a DWARF5 tag, attribute, or location
245 /// atom. Only applicable when emitting otherwise DWARF4-compliant debug info.
246 bool useGNUAnalogForDwarf5Feature() const;
247
248 /// This takes a DWARF 5 tag and returns it or a GNU analog.
250
251 /// This takes a DWARF 5 attribute and returns it or a GNU analog.
253
254 /// This takes a DWARF 5 location atom and either returns it or a GNU analog.
256
257 /// Construct a call site entry DIE describing a call within \p Scope to a
258 /// callee described by \p CalleeSP.
259 /// \p IsTail specifies whether the call is a tail call.
260 /// \p PCAddr points to the PC value after the call instruction.
261 /// \p CallAddr points to the PC value at the call instruction (or is null).
262 /// \p CallReg is a register location for an indirect call. For direct calls
263 /// the \p CallReg is set to 0.
264 DIE &constructCallSiteEntryDIE(DIE &ScopeDIE, const DISubprogram *CalleeSP,
265 bool IsTail, const MCSymbol *PCAddr,
266 const MCSymbol *CallAddr, unsigned CallReg);
267 /// Construct call site parameter DIEs for the \p CallSiteDIE. The \p Params
268 /// were collected by the \ref collectCallSiteParameters.
269 /// Note: The order of parameters does not matter, since debuggers recognize
270 /// call site parameters by the DW_AT_location attribute.
271 void constructCallSiteParmEntryDIEs(DIE &CallSiteDIE,
273
274 /// Get or create a DIE for an imported entity.
277
279 void finishEntityDefinition(const DbgEntity *Entity);
280
281 /// Find abstract variable associated with Var.
284 void createAbstractEntity(const DINode *Node, LexicalScope *Scope);
285
286 /// Set the skeleton unit associated with this unit.
287 void setSkeleton(DwarfCompileUnit &Skel) { Skeleton = &Skel; }
288
289 unsigned getHeaderSize() const override {
290 // DWARF v5 added the DWO ID to the header for split/skeleton units.
291 unsigned DWOIdSize =
292 DD->getDwarfVersion() >= 5 && DD->useSplitDwarf() ? sizeof(uint64_t)
293 : 0;
294 return DwarfUnit::getHeaderSize() + DWOIdSize;
295 }
296 unsigned getLength() {
297 return Asm->getUnitLengthFieldByteSize() + // Length field
299 }
300
301 void emitHeader(bool UseOffsets) override;
302
303 /// Add the DW_AT_addr_base attribute to the unit DIE.
304 void addAddrTableBase();
305
307 assert(LabelBegin && "LabelBegin is not initialized");
308 return LabelBegin;
309 }
310
312 return MacroLabelBegin;
313 }
314
315 /// Add a new global name to the compile unit.
316 void addGlobalName(StringRef Name, const DIE &Die,
317 const DIScope *Context) override;
318
319 /// Add a new global name present in a type unit to this compile unit.
320 void addGlobalNameForTypeUnit(StringRef Name, const DIScope *Context);
321
322 /// Add a new global type to the compile unit.
323 void addGlobalType(const DIType *Ty, const DIE &Die,
324 const DIScope *Context) override;
325
326 /// Add a new global type present in a type unit to this compile unit.
327 void addGlobalTypeUnitType(const DIType *Ty, const DIScope *Context);
328
329 const StringMap<const DIE *> &getGlobalNames() const { return GlobalNames; }
330 const StringMap<const DIE *> &getGlobalTypes() const { return GlobalTypes; }
331
332 /// Add DW_AT_location attribute for a DbgVariable based on provided
333 /// MachineLocation.
334 void addVariableAddress(const DbgVariable &DV, DIE &Die,
335 MachineLocation Location);
336 /// Add an address attribute to a die based on the location provided.
338 const MachineLocation &Location);
339
340 /// Start with the address based on the location provided, and generate the
341 /// DWARF information necessary to find the actual variable (navigating the
342 /// extra location information encoded in the type) based on the starting
343 /// location. Add the DWARF information to the die.
344 void addComplexAddress(const DIExpression *DIExpr, DIE &Die,
346 const MachineLocation &Location);
347
348 /// Add a Dwarf loclistptr attribute data and value.
349 void addLocationList(DIE &Die, dwarf::Attribute Attribute, unsigned Index);
350 void applyVariableAttributes(const DbgVariable &Var, DIE &VariableDie);
351
352 /// Add a Dwarf expression attribute data and value.
353 void addExpr(DIELoc &Die, dwarf::Form Form, const MCExpr *Expr);
354
356 DIE &SPDie);
357
358 void applyLabelAttributes(const DbgLabel &Label, DIE &LabelDie);
359
360 /// getRanges - Get the list of ranges for this unit.
361 const SmallVectorImpl<RangeSpan> &getRanges() const { return CURanges; }
362 SmallVector<RangeSpan, 2> takeRanges() { return std::move(CURanges); }
363
364 void setBaseAddress(const MCSymbol *Base) { BaseAddress = Base; }
365 const MCSymbol *getBaseAddress() const { return BaseAddress; }
366
367 uint64_t getDWOId() const { return DWOId; }
368 void setDWOId(uint64_t DwoId) { DWOId = DwoId; }
369
370 bool hasDwarfPubSections() const;
371
372 void addBaseTypeRef(DIEValueList &Die, int64_t Idx);
373
374 MDNodeSetVector &getDeferredLocalDecls() { return DeferredLocalDecls; }
375};
376
377} // end namespace llvm
378
379#endif // LLVM_LIB_CODEGEN_ASMPRINTER_DWARFCOMPILEUNIT_H
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
This file defines the StringMap class.
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
This file defines the DenseMap class.
This file contains constants used for implementing Dwarf debug support.
std::string Name
bool End
Definition: ELF_riscv.cpp:469
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallVector class.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
This class is intended to be used as a driving class for all asm writers.
Definition: AsmPrinter.h:85
unsigned int getUnitLengthFieldByteSize() const
Returns 4 for DWARF32 and 12 for DWARF64.
DIELoc - Represents an expression location.
Definition: DIE.h:1010
DIE & getUnitDie()
Definition: DIE.h:999
A list of DIE values.
Definition: DIE.h:689
A structured debug information entry.
Definition: DIE.h:819
unsigned getSize() const
Definition: DIE.h:862
DWARF expression.
An imported module (C++ using directive or similar).
Tagged DWARF-like metadata node.
Base class for scope-like contexts.
Subprogram description.
Base class for types.
This class is defined as the common parent of DbgVariable and DbgLabel such that it could levarage po...
Definition: DwarfDebug.h:66
This class is used to track label information.
Definition: DwarfDebug.h:285
std::pair< const DINode *, const DILocation * > InlinedEntity
This class is used to track local variable information.
Definition: DwarfDebug.h:210
bool useGNUAnalogForDwarf5Feature() const
Whether to use the GNU analog for a DWARF5 tag, attribute, or location atom.
void constructCallSiteParmEntryDIEs(DIE &CallSiteDIE, SmallVector< DbgCallSiteParam, 4 > &Params)
Construct call site parameter DIEs for the CallSiteDIE.
void attachLowHighPC(DIE &D, const MCSymbol *Begin, const MCSymbol *End)
void emitHeader(bool UseOffsets) override
Emit the header for this unit, not including the initial length field.
unsigned getHeaderSize() const override
Compute the size of a header for this unit, not including the initial length field.
dwarf::Tag getDwarf5OrGNUTag(dwarf::Tag Tag) const
This takes a DWARF 5 tag and returns it or a GNU analog.
DIE & updateSubprogramScopeDIE(const DISubprogram *SP)
Find DIE for the given subprogram and attach appropriate DW_AT_low_pc and DW_AT_high_pc attributes.
void constructAbstractSubprogramScopeDIE(LexicalScope *Scope)
bool includeMinimalInlineScopes() const
DIE * getOrCreateImportedEntityDIE(const DIImportedEntity *IE)
Get or create a DIE for an imported entity.
SmallVector< RangeSpan, 2 > takeRanges()
void addBaseTypeRef(DIEValueList &Die, int64_t Idx)
void addGlobalNameForTypeUnit(StringRef Name, const DIScope *Context)
Add a new global name present in a type unit to this compile unit.
void finishEntityDefinition(const DbgEntity *Entity)
void addRange(RangeSpan Range)
addRange - Add an address range to the list of ranges for this unit.
void addAddrTableBase()
Add the DW_AT_addr_base attribute to the unit DIE.
DIE & constructCallSiteEntryDIE(DIE &ScopeDIE, const DISubprogram *CalleeSP, bool IsTail, const MCSymbol *PCAddr, const MCSymbol *CallAddr, unsigned CallReg)
Construct a call site entry DIE describing a call within Scope to a callee described by CalleeSP.
MCSymbol * getMacroLabelBegin() const
std::vector< BaseTypeRef > ExprRefedBaseTypes
DIE * constructInlinedScopeDIE(LexicalScope *Scope, DIE &ParentScopeDIE)
This scope represents an inlined body of a function.
void addGlobalType(const DIType *Ty, const DIE &Die, const DIScope *Context) override
Add a new global type to the compile unit.
void addScopeRangeList(DIE &ScopeDIE, SmallVector< RangeSpan, 2 > Range)
A helper function to construct a RangeSpanList for a given lexical scope.
uint64_t getDWOId() const
DIE * getOrCreateCommonBlock(const DICommonBlock *CB, ArrayRef< GlobalExpr > GlobalExprs)
void addVariableAddress(const DbgVariable &DV, DIE &Die, MachineLocation Location)
Add DW_AT_location attribute for a DbgVariable based on provided MachineLocation.
DbgValueHistoryMap::InlinedEntity InlinedEntity
Find abstract variable associated with Var.
MDNodeSetVector & getDeferredLocalDecls()
MCSymbol * getLabelBegin() const
DIE * getLexicalBlockDIE(const DILexicalBlock *LB)
Get a DIE for the given DILexicalBlock.
void addGlobalName(StringRef Name, const DIE &Die, const DIScope *Context) override
Add a new global name to the compile unit.
void createAbstractEntity(const DINode *Node, LexicalScope *Scope)
void applyStmtList(DIE &D)
Apply the DW_AT_stmt_list from this compile unit to the specified DIE.
DIE * getOrCreateContextDIE(const DIScope *Ty) override
Construct a DIE for a given scope.
DIE * constructVariableDIE(DbgVariable &DV, bool Abstract=false)
constructVariableDIE - Construct a DIE for the given DbgVariable.
void applyVariableAttributes(const DbgVariable &Var, DIE &VariableDie)
dwarf::LocationAtom getDwarf5OrGNULocationAtom(dwarf::LocationAtom Loc) const
This takes a DWARF 5 location atom and either returns it or a GNU analog.
DIE & constructSubprogramScopeDIE(const DISubprogram *Sub, LexicalScope *Scope)
Construct a DIE for this subprogram scope.
DIE * getOrCreateGlobalVariableDIE(const DIGlobalVariable *GV, ArrayRef< GlobalExpr > GlobalExprs)
Get or create global variable DIE.
void addLocationAttribute(DIE *ToDIE, const DIGlobalVariable *GV, ArrayRef< GlobalExpr > GlobalExprs)
DwarfCompileUnit * getSkeleton() const
void applySubprogramAttributesToDefinition(const DISubprogram *SP, DIE &SPDie)
DIE * createAndAddScopeChildren(LexicalScope *Scope, DIE &ScopeDIE)
void setSkeleton(DwarfCompileUnit &Skel)
Set the skeleton unit associated with this unit.
void addExpr(DIELoc &Die, dwarf::Form Form, const MCExpr *Expr)
Add a Dwarf expression attribute data and value.
dwarf::Attribute getDwarf5OrGNUAttr(dwarf::Attribute Attr) const
This takes a DWARF 5 attribute and returns it or a GNU analog.
unsigned getUniqueID() const
void addAddress(DIE &Die, dwarf::Attribute Attribute, const MachineLocation &Location)
Add an address attribute to a die based on the location provided.
void applyLabelAttributes(const DbgLabel &Label, DIE &LabelDie)
void setDWOId(uint64_t DwoId)
void addLocalLabelAddress(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Label)
addLocalLabelAddress - Add a dwarf label attribute data and value using DW_FORM_addr only.
DIE * constructLexicalScopeDIE(LexicalScope *Scope)
Construct new DW_TAG_lexical_block for this scope and attach DW_AT_low_pc/DW_AT_high_pc labels.
MCSymbol * getLineTableStartSym() const
Get line table start symbol for this unit.
const SmallVectorImpl< RangeSpan > & getRanges() const
getRanges - Get the list of ranges for this unit.
unsigned getOrCreateSourceID(const DIFile *File) override
Look up the source ID for the given file.
void constructScopeDIE(LexicalScope *Scope, DIE &ParentScopeDIE)
const MCSymbol * getBaseAddress() const
const StringMap< const DIE * > & getGlobalNames() const
DIE * constructLabelDIE(DbgLabel &DL, const LexicalScope &Scope)
Construct a DIE for the given DbgLabel.
void addGlobalTypeUnitType(const DIType *Ty, const DIScope *Context)
Add a new global type present in a type unit to this compile unit.
DbgEntity * getExistingAbstractEntity(const DINode *Node)
const StringMap< const DIE * > & getGlobalTypes() const
void addLabelAddress(DIE &Die, dwarf::Attribute Attribute, const MCSymbol *Label)
addLabelAddress - Add a dwarf label attribute data and value using either DW_FORM_addr or DW_FORM_GNU...
void addLocationList(DIE &Die, dwarf::Attribute Attribute, unsigned Index)
Add a Dwarf loclistptr attribute data and value.
void addComplexAddress(const DIExpression *DIExpr, DIE &Die, dwarf::Attribute Attribute, const MachineLocation &Location)
Start with the address based on the location provided, and generate the DWARF information necessary t...
DIE * constructImportedEntityDIE(const DIImportedEntity *IE)
DwarfCompileUnit & getCU() override
void attachRangesOrLowHighPC(DIE &D, SmallVector< RangeSpan, 2 > Ranges)
void setBaseAddress(const MCSymbol *Base)
void finishSubprogramDefinition(const DISubprogram *SP)
Collects and handles dwarf debug information.
Definition: DwarfDebug.h:347
uint16_t getDwarfVersion() const
Returns the Dwarf Version.
bool shareAcrossDWOCUs() const
Definition: DwarfDebug.cpp:534
bool useSplitDwarf() const
Returns whether or not to change the current debug info for the split dwarf proposal support.
Definition: DwarfDebug.h:784
DenseMap< const DINode *, std::unique_ptr< DbgEntity > > & getAbstractEntities()
Definition: DwarfFile.h:169
DenseMap< const DILocalScope *, DIE * > & getAbstractScopeDIEs()
Definition: DwarfFile.h:165
This dwarf writer support class manages information associated with a source file.
Definition: DwarfUnit.h:35
DwarfDebug * DD
Definition: DwarfUnit.h:50
virtual unsigned getHeaderSize() const
Compute the size of a header for this unit, not including the initial length field.
Definition: DwarfUnit.h:269
DwarfFile * DU
Definition: DwarfUnit.h:51
AsmPrinter * Asm
Target of Dwarf emission.
Definition: DwarfUnit.h:44
LexicalScope - This class is used to track scope information.
Definition: LexicalScopes.h:44
Base class for the full range of assembler expressions which are needed for parsing.
Definition: MCExpr.h:35
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
Definition: SmallPtrSet.h:451
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: SmallVector.h:577
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1200
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Definition: StringMap.h:112
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
Attribute
Attributes.
Definition: Dwarf.h:123
LocationAtom
Definition: Dwarf.h:136
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
BaseTypeRef(unsigned BitSize, dwarf::TypeKind Encoding)
A pair of GlobalVariable and DIExpression.