LLVM  15.0.0git
DWARFLinkerCompileUnit.h
Go to the documentation of this file.
1 //===- DWARFLinkerCompileUnit.h ---------------------------------*- 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 #ifndef LLVM_DWARFLINKER_DWARFLINKERCOMPILEUNIT_H
10 #define LLVM_DWARFLINKER_DWARFLINKERCOMPILEUNIT_H
11 
12 #include "llvm/ADT/DenseMap.h"
13 #include "llvm/ADT/IntervalMap.h"
14 #include "llvm/CodeGen/DIE.h"
16 
17 namespace llvm {
18 
19 class DeclContext;
20 
21 template <typename KeyT, typename ValT>
22 using HalfOpenIntervalMap =
23  IntervalMap<KeyT, ValT, IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize,
25 
27 
28 // FIXME: Delete this structure.
29 struct PatchLocation {
31 
32  PatchLocation() = default;
34 
35  void set(uint64_t New) const {
36  assert(I);
37  const auto &Old = *I;
38  assert(Old.getType() == DIEValue::isInteger);
39  *I = DIEValue(Old.getAttribute(), Old.getForm(), DIEInteger(New));
40  }
41 
42  uint64_t get() const {
43  assert(I);
44  return I->getDIEInteger().getValue();
45  }
46 };
47 
48 /// Stores all information relating to a compile unit, be it in its original
49 /// instance in the object file to its brand new cloned and generated DIE tree.
50 class CompileUnit {
51 public:
52  /// Information gathered about a DIE in the object file.
53  struct DIEInfo {
54  /// Address offset to apply to the described entity.
55  int64_t AddrAdjust;
56 
57  /// ODR Declaration context.
59 
60  /// Cloned version of that DIE.
62 
63  /// The index of this DIE's parent.
65 
66  /// Is the DIE part of the linked output?
67  bool Keep : 1;
68 
69  /// Was this DIE's entity found in the map?
70  bool InDebugMap : 1;
71 
72  /// Is this a pure forward declaration we can strip?
73  bool Prune : 1;
74 
75  /// Does DIE transitively refer an incomplete decl?
76  bool Incomplete : 1;
77 
78  /// Is DIE in the clang module scope?
79  bool InModuleScope : 1;
80 
81  /// Is ODR marking done?
82  bool ODRMarkingDone : 1;
83  };
84 
85  CompileUnit(DWARFUnit &OrigUnit, unsigned ID, bool CanUseODR,
86  StringRef ClangModuleName)
87  : OrigUnit(OrigUnit), ID(ID), Ranges(RangeAlloc),
88  ClangModuleName(ClangModuleName) {
89  Info.resize(OrigUnit.getNumDIEs());
90 
91  auto CUDie = OrigUnit.getUnitDIE(false);
92  if (!CUDie) {
93  HasODR = false;
94  return;
95  }
96  if (auto Lang = dwarf::toUnsigned(CUDie.find(dwarf::DW_AT_language)))
97  HasODR = CanUseODR && (*Lang == dwarf::DW_LANG_C_plus_plus ||
98  *Lang == dwarf::DW_LANG_C_plus_plus_03 ||
99  *Lang == dwarf::DW_LANG_C_plus_plus_11 ||
100  *Lang == dwarf::DW_LANG_C_plus_plus_14 ||
101  *Lang == dwarf::DW_LANG_ObjC_plus_plus);
102  else
103  HasODR = false;
104  }
105 
106  DWARFUnit &getOrigUnit() const { return OrigUnit; }
107 
108  unsigned getUniqueID() const { return ID; }
109 
110  void createOutputDIE() { NewUnit.emplace(OrigUnit.getUnitDIE().getTag()); }
111 
113  if (NewUnit)
114  return &const_cast<BasicDIEUnit &>(*NewUnit).getUnitDie();
115  return nullptr;
116  }
117 
118  bool hasODR() const { return HasODR; }
119  bool isClangModule() const { return !ClangModuleName.empty(); }
121  /// Return the DW_AT_LLVM_sysroot of the compile unit or an empty StringRef.
123 
124  const std::string &getClangModuleName() const { return ClangModuleName; }
125 
126  DIEInfo &getInfo(unsigned Idx) { return Info[Idx]; }
127  const DIEInfo &getInfo(unsigned Idx) const { return Info[Idx]; }
128 
129  DIEInfo &getInfo(const DWARFDie &Die) {
130  unsigned Idx = getOrigUnit().getDIEIndex(Die);
131  return Info[Idx];
132  }
133 
134  uint64_t getStartOffset() const { return StartOffset; }
135  uint64_t getNextUnitOffset() const { return NextUnitOffset; }
137 
138  uint64_t getLowPc() const { return LowPc; }
139  uint64_t getHighPc() const { return HighPc; }
140  bool hasLabelAt(uint64_t Addr) const { return Labels.count(Addr); }
141 
143  return UnitRangeAttribute;
144  }
145 
146  const FunctionIntervals &getFunctionRanges() const { return Ranges; }
147 
148  const std::vector<PatchLocation> &getRangesAttributes() const {
149  return RangeAttributes;
150  }
151 
152  const std::vector<std::pair<PatchLocation, int64_t>> &
154  return LocationAttributes;
155  }
156 
157  /// Mark every DIE in this unit as kept. This function also
158  /// marks variables as InDebugMap so that they appear in the
159  /// reconstructed accelerator tables.
160  void markEverythingAsKept();
161 
162  /// Compute the end offset for this unit. Must be called after the CU's DIEs
163  /// have been cloned. \returns the next unit offset (which is also the
164  /// current debug_info section size).
166 
167  /// Keep track of a forward reference to DIE \p Die in \p RefUnit by \p
168  /// Attr. The attribute should be fixed up later to point to the absolute
169  /// offset of \p Die in the debug_info section or to the canonical offset of
170  /// \p Ctxt if it is non-null.
171  void noteForwardReference(DIE *Die, const CompileUnit *RefUnit,
172  DeclContext *Ctxt, PatchLocation Attr);
173 
174  /// Apply all fixups recorded by noteForwardReference().
175  void fixupForwardReferences();
176 
177  /// Add the low_pc of a label that is relocated by applying
178  /// offset \p PCOffset.
179  void addLabelLowPc(uint64_t LabelLowPc, int64_t PcOffset);
180 
181  /// Add a function range [\p LowPC, \p HighPC) that is relocated by applying
182  /// offset \p PCOffset.
183  void addFunctionRange(uint64_t LowPC, uint64_t HighPC, int64_t PCOffset);
184 
185  /// Keep track of a DW_AT_range attribute that we will need to patch up later.
186  void noteRangeAttribute(const DIE &Die, PatchLocation Attr);
187 
188  /// Keep track of a location attribute pointing to a location list in the
189  /// debug_loc section.
190  void noteLocationAttribute(PatchLocation Attr, int64_t PcOffset);
191 
192  /// Add a name accelerator entry for \a Die with \a Name.
194 
195  /// Add a name accelerator entry for \a Die with \a Name.
197  bool SkipPubnamesSection = false);
198 
199  /// Add various accelerator entries for \p Die with \p Name which is stored
200  /// in the string table at \p Offset. \p Name must be an Objective-C
201  /// selector.
203  bool SkipPubnamesSection = false);
204 
205  /// Add a type accelerator entry for \p Die with \p Name which is stored in
206  /// the string table at \p Offset.
208  bool ObjcClassImplementation,
209  uint32_t QualifiedNameHash);
210 
211  struct AccelInfo {
212  /// Name of the entry.
214 
215  /// DIE this entry describes.
216  const DIE *Die;
217 
218  /// Hash of the fully qualified name.
220 
221  /// Emit this entry only in the apple_* sections.
223 
224  /// Is this an ObjC class implementation?
226 
228  bool SkipPubSection = false)
230 
232  uint32_t QualifiedNameHash, bool ObjCClassIsImplementation)
235  ObjcClassImplementation(ObjCClassIsImplementation) {}
236  };
237 
238  const std::vector<AccelInfo> &getPubnames() const { return Pubnames; }
239  const std::vector<AccelInfo> &getPubtypes() const { return Pubtypes; }
240  const std::vector<AccelInfo> &getNamespaces() const { return Namespaces; }
241  const std::vector<AccelInfo> &getObjC() const { return ObjC; }
242 
243  MCSymbol *getLabelBegin() { return LabelBegin; }
244  void setLabelBegin(MCSymbol *S) { LabelBegin = S; }
245 
246 private:
247  DWARFUnit &OrigUnit;
248  unsigned ID;
249  std::vector<DIEInfo> Info; ///< DIE info indexed by DIE index.
250  Optional<BasicDIEUnit> NewUnit;
251  MCSymbol *LabelBegin = nullptr;
252 
253  uint64_t StartOffset;
254  uint64_t NextUnitOffset;
255 
257  uint64_t HighPc = 0;
258 
259  /// A list of attributes to fixup with the absolute offset of
260  /// a DIE in the debug_info section.
261  ///
262  /// The offsets for the attributes in this array couldn't be set while
263  /// cloning because for cross-cu forward references the target DIE's offset
264  /// isn't known you emit the reference attribute.
265  std::vector<
266  std::tuple<DIE *, const CompileUnit *, DeclContext *, PatchLocation>>
267  ForwardDIEReferences;
268 
269  FunctionIntervals::Allocator RangeAlloc;
270 
271  /// The ranges in that interval map are the PC ranges for
272  /// functions in this unit, associated with the PC offset to apply
273  /// to the addresses to get the linked address.
274  FunctionIntervals Ranges;
275 
276  /// The DW_AT_low_pc of each DW_TAG_label.
278 
279  /// DW_AT_ranges attributes to patch after we have gathered
280  /// all the unit's function addresses.
281  /// @{
282  std::vector<PatchLocation> RangeAttributes;
283  Optional<PatchLocation> UnitRangeAttribute;
284  /// @}
285 
286  /// Location attributes that need to be transferred from the
287  /// original debug_loc section to the liked one. They are stored
288  /// along with the PC offset that is to be applied to their
289  /// function's address.
290  std::vector<std::pair<PatchLocation, int64_t>> LocationAttributes;
291 
292  /// Accelerator entries for the unit, both for the pub*
293  /// sections and the apple* ones.
294  /// @{
295  std::vector<AccelInfo> Pubnames;
296  std::vector<AccelInfo> Pubtypes;
297  std::vector<AccelInfo> Namespaces;
298  std::vector<AccelInfo> ObjC;
299  /// @}
300 
301  /// Is this unit subject to the ODR rule?
302  bool HasODR;
303 
304  /// The DW_AT_language of this unit.
305  uint16_t Language = 0;
306 
307  /// The DW_AT_LLVM_sysroot of this unit.
308  std::string SysRoot;
309 
310  /// If this is a Clang module, this holds the module's name.
311  std::string ClangModuleName;
312 };
313 
314 } // end namespace llvm
315 
316 #endif // LLVM_DWARFLINKER_DWARFLINKERCOMPILEUNIT_H
llvm::CompileUnit::DIEInfo::AddrAdjust
int64_t AddrAdjust
Address offset to apply to the described entity.
Definition: DWARFLinkerCompileUnit.h:55
llvm::CompileUnit::getUnitRangesAttribute
Optional< PatchLocation > getUnitRangesAttribute() const
Definition: DWARFLinkerCompileUnit.h:142
llvm::CompileUnit::hasLabelAt
bool hasLabelAt(uint64_t Addr) const
Definition: DWARFLinkerCompileUnit.h:140
llvm::CompileUnit::getOrigUnit
DWARFUnit & getOrigUnit() const
Definition: DWARFLinkerCompileUnit.h:106
llvm::CompileUnit::DIEInfo::Ctxt
DeclContext * Ctxt
ODR Declaration context.
Definition: DWARFLinkerCompileUnit.h:58
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
llvm::CompileUnit::getInfo
DIEInfo & getInfo(unsigned Idx)
Definition: DWARFLinkerCompileUnit.h:126
llvm::DeclContext
A DeclContext is a named program scope that is used for ODR uniquing of types.
Definition: DWARFLinkerDeclContext.h:78
llvm::PatchLocation::get
uint64_t get() const
Definition: DWARFLinkerCompileUnit.h:42
llvm::DIEValue
Definition: DIE.h:369
llvm::CompileUnit::DIEInfo::ParentIdx
uint32_t ParentIdx
The index of this DIE's parent.
Definition: DWARFLinkerCompileUnit.h:64
llvm::CompileUnit::getRangesAttributes
const std::vector< PatchLocation > & getRangesAttributes() const
Definition: DWARFLinkerCompileUnit.h:148
llvm::HalfOpenIntervalMap
IntervalMap< KeyT, ValT, IntervalMapImpl::NodeSizer< KeyT, ValT >::LeafSize, IntervalMapHalfOpenInfo< KeyT > > HalfOpenIntervalMap
Definition: DWARFLinkerCompileUnit.h:24
llvm::CompileUnit::addTypeAccelerator
void addTypeAccelerator(const DIE *Die, DwarfStringPoolEntryRef Name, bool ObjcClassImplementation, uint32_t QualifiedNameHash)
Add a type accelerator entry for Die with Name which is stored in the string table at Offset.
Definition: DWARFLinkerCompileUnit.cpp:145
llvm::SmallDenseMap< uint64_t, uint64_t, 1 >
llvm::PatchLocation::PatchLocation
PatchLocation(DIE::value_iterator I)
Definition: DWARFLinkerCompileUnit.h:33
llvm::CompileUnit::DIEInfo::Prune
bool Prune
Is this a pure forward declaration we can strip?
Definition: DWARFLinkerCompileUnit.h:73
llvm::BasicDIEUnit
Definition: DIE.h:923
llvm::CompileUnit::getClangModuleName
const std::string & getClangModuleName() const
Definition: DWARFLinkerCompileUnit.h:124
DenseMap.h
llvm::CompileUnit::getLanguage
uint16_t getLanguage()
Definition: DWARFLinkerCompileUnit.cpp:24
llvm::CompileUnit::getPubtypes
const std::vector< AccelInfo > & getPubtypes() const
Definition: DWARFLinkerCompileUnit.h:239
llvm::CompileUnit::getLabelBegin
MCSymbol * getLabelBegin()
Definition: DWARFLinkerCompileUnit.h:243
llvm::CompileUnit::CompileUnit
CompileUnit(DWARFUnit &OrigUnit, unsigned ID, bool CanUseODR, StringRef ClangModuleName)
Definition: DWARFLinkerCompileUnit.h:85
llvm::Optional
Definition: APInt.h:33
llvm::DenseMapBase::count
size_type count(const_arg_type_t< KeyT > Val) const
Return 1 if the specified key is in the map, 0 otherwise.
Definition: DenseMap.h:147
llvm::CompileUnit::noteRangeAttribute
void noteRangeAttribute(const DIE &Die, PatchLocation Attr)
Keep track of a DW_AT_range attribute that we will need to patch up later.
Definition: DWARFLinkerCompileUnit.cpp:117
llvm::CompileUnit::getHighPc
uint64_t getHighPc() const
Definition: DWARFLinkerCompileUnit.h:139
llvm::DIE
A structured debug information entry.
Definition: DIE.h:739
llvm::max
Expected< ExpressionValue > max(const ExpressionValue &Lhs, const ExpressionValue &Rhs)
Definition: FileCheck.cpp:337
llvm::CompileUnit::DIEInfo::InDebugMap
bool InDebugMap
Was this DIE's entity found in the map?
Definition: DWARFLinkerCompileUnit.h:70
llvm::CompileUnit::AccelInfo::SkipPubSection
bool SkipPubSection
Emit this entry only in the apple_* sections.
Definition: DWARFLinkerCompileUnit.h:222
llvm::CompileUnit::getLocationAttributes
const std::vector< std::pair< PatchLocation, int64_t > > & getLocationAttributes() const
Definition: DWARFLinkerCompileUnit.h:153
llvm::DwarfStringPoolEntryRef
DwarfStringPoolEntryRef: Dwarf string pool entry reference.
Definition: DwarfStringPoolEntry.h:44
llvm::CompileUnit::addObjCAccelerator
void addObjCAccelerator(const DIE *Die, DwarfStringPoolEntryRef Name, bool SkipPubnamesSection=false)
Add various accelerator entries for Die with Name which is stored in the string table at Offset.
Definition: DWARFLinkerCompileUnit.cpp:133
llvm::yaml::isInteger
static bool isInteger(StringRef Val)
Definition: ELFYAML.cpp:1505
llvm::CompileUnit::AccelInfo::AccelInfo
AccelInfo(DwarfStringPoolEntryRef Name, const DIE *Die, uint32_t QualifiedNameHash, bool ObjCClassIsImplementation)
Definition: DWARFLinkerCompileUnit.h:231
llvm::DWARFUnit::getUnitDIE
DWARFDie getUnitDIE(bool ExtractUnitDIEOnly=true)
Definition: DWARFUnit.h:402
llvm::CompileUnit::DIEInfo::Clone
DIE * Clone
Cloned version of that DIE.
Definition: DWARFLinkerCompileUnit.h:61
llvm::DWARFUnit::getNumDIEs
unsigned getNumDIEs()
Returns the number of DIEs in the unit.
Definition: DWARFUnit.h:464
llvm::CompileUnit::DIEInfo
Information gathered about a DIE in the object file.
Definition: DWARFLinkerCompileUnit.h:53
llvm::CompileUnit::getInfo
DIEInfo & getInfo(const DWARFDie &Die)
Definition: DWARFLinkerCompileUnit.h:129
llvm::CompileUnit::getNamespaces
const std::vector< AccelInfo > & getNamespaces() const
Definition: DWARFLinkerCompileUnit.h:240
llvm::CompileUnit::getFunctionRanges
const FunctionIntervals & getFunctionRanges() const
Definition: DWARFLinkerCompileUnit.h:146
llvm::DIEValueList::value_iterator
Definition: DIE.h:675
llvm::DebugInfoSize
Hold the input and output of the debug info size in bytes.
Definition: DWARFLinker.cpp:39
false
Definition: StackSlotColoring.cpp:141
llvm::CompileUnit::getUniqueID
unsigned getUniqueID() const
Definition: DWARFLinkerCompileUnit.h:108
llvm::DIEInteger
An integer value DIE.
Definition: DIE.h:163
llvm::PatchLocation::I
DIE::value_iterator I
Definition: DWARFLinkerCompileUnit.h:30
llvm::CompileUnit::getPubnames
const std::vector< AccelInfo > & getPubnames() const
Definition: DWARFLinkerCompileUnit.h:238
llvm::CallingConv::ID
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition: CallingConv.h:24
llvm::CompileUnit::getInfo
const DIEInfo & getInfo(unsigned Idx) const
Definition: DWARFLinkerCompileUnit.h:127
DIE.h
llvm::IntervalMap::Allocator
typename Sizer::Allocator Allocator
Definition: IntervalMap.h:962
llvm::CompileUnit::AccelInfo
Definition: DWARFLinkerCompileUnit.h:211
uint64_t
llvm::CompileUnit::getObjC
const std::vector< AccelInfo > & getObjC() const
Definition: DWARFLinkerCompileUnit.h:241
llvm::CompileUnit::AccelInfo::AccelInfo
AccelInfo(DwarfStringPoolEntryRef Name, const DIE *Die, bool SkipPubSection=false)
Definition: DWARFLinkerCompileUnit.h:227
llvm::CompileUnit::addLabelLowPc
void addLabelLowPc(uint64_t LabelLowPc, int64_t PcOffset)
Add the low_pc of a label that is relocated by applying offset PCOffset.
Definition: DWARFLinkerCompileUnit.cpp:102
llvm::CompileUnit::DIEInfo::Keep
bool Keep
Is the DIE part of the linked output?
Definition: DWARFLinkerCompileUnit.h:67
Addr
uint64_t Addr
Definition: ELFObjHandler.cpp:78
llvm::CompileUnit
Stores all information relating to a compile unit, be it in its original instance in the object file ...
Definition: DWARFLinkerCompileUnit.h:50
DWARFUnit.h
llvm::CompileUnit::getStartOffset
uint64_t getStartOffset() const
Definition: DWARFLinkerCompileUnit.h:134
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::CompileUnit::getLowPc
uint64_t getLowPc() const
Definition: DWARFLinkerCompileUnit.h:138
llvm::CompileUnit::getNextUnitOffset
uint64_t getNextUnitOffset() const
Definition: DWARFLinkerCompileUnit.h:135
llvm::CompileUnit::setStartOffset
void setStartOffset(uint64_t DebugInfoSize)
Definition: DWARFLinkerCompileUnit.h:136
llvm::IntervalMapHalfOpenInfo
Definition: IntervalMap.h:167
llvm::CompileUnit::setLabelBegin
void setLabelBegin(MCSymbol *S)
Definition: DWARFLinkerCompileUnit.h:244
llvm::CompileUnit::addFunctionRange
void addFunctionRange(uint64_t LowPC, uint64_t HighPC, int64_t PCOffset)
Add a function range [LowPC, HighPC) that is relocated by applying offset PCOffset.
Definition: DWARFLinkerCompileUnit.cpp:106
llvm::CompileUnit::DIEInfo::ODRMarkingDone
bool ODRMarkingDone
Is ODR marking done?
Definition: DWARFLinkerCompileUnit.h:82
llvm::CompileUnit::AccelInfo::Name
DwarfStringPoolEntryRef Name
Name of the entry.
Definition: DWARFLinkerCompileUnit.h:213
llvm::CompileUnit::AccelInfo::QualifiedNameHash
uint32_t QualifiedNameHash
Hash of the fully qualified name.
Definition: DWARFLinkerCompileUnit.h:219
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::CompileUnit::addNameAccelerator
void addNameAccelerator(const DIE *Die, DwarfStringPoolEntryRef Name, bool SkipPubnamesSection=false)
Add a name accelerator entry for Die with Name.
Definition: DWARFLinkerCompileUnit.cpp:139
llvm::CompileUnit::noteLocationAttribute
void noteLocationAttribute(PatchLocation Attr, int64_t PcOffset)
Keep track of a location attribute pointing to a location list in the debug_loc section.
Definition: DWARFLinkerCompileUnit.cpp:124
uint32_t
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::CompileUnit::addNamespaceAccelerator
void addNamespaceAccelerator(const DIE *Die, DwarfStringPoolEntryRef Name)
Add a name accelerator entry for Die with Name.
Definition: DWARFLinkerCompileUnit.cpp:128
llvm::CompileUnit::computeNextUnitOffset
uint64_t computeNextUnitOffset(uint16_t DwarfVersion)
Compute the end offset for this unit.
Definition: DWARFLinkerCompileUnit.cpp:70
llvm::CompileUnit::getSysRoot
StringRef getSysRoot()
Return the DW_AT_LLVM_sysroot of the compile unit or an empty StringRef.
Definition: DWARFLinkerCompileUnit.cpp:32
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:50
uint16_t
llvm::CompileUnit::fixupForwardReferences
void fixupForwardReferences()
Apply all fixups recorded by noteForwardReference().
Definition: DWARFLinkerCompileUnit.cpp:86
llvm::DWARFUnit
Definition: DWARFUnit.h:207
llvm::PatchLocation
Definition: DWARFLinkerCompileUnit.h:29
llvm::PatchLocation::set
void set(uint64_t New) const
Definition: DWARFLinkerCompileUnit.h:35
llvm::CompileUnit::hasODR
bool hasODR() const
Definition: DWARFLinkerCompileUnit.h:118
llvm::CompileUnit::getOutputUnitDIE
DIE * getOutputUnitDIE() const
Definition: DWARFLinkerCompileUnit.h:112
llvm::dwarf::toUnsigned
Optional< uint64_t > toUnsigned(const Optional< DWARFFormValue > &V)
Take an optional DWARFFormValue and try to extract an unsigned constant.
Definition: DWARFFormValue.h:225
llvm::CompileUnit::createOutputDIE
void createOutputDIE()
Definition: DWARFLinkerCompileUnit.h:110
llvm::CompileUnit::AccelInfo::ObjcClassImplementation
bool ObjcClassImplementation
Is this an ObjC class implementation?
Definition: DWARFLinkerCompileUnit.h:225
llvm::DWARFDie::getTag
dwarf::Tag getTag() const
Definition: DWARFDie.h:72
llvm::PatchLocation::PatchLocation
PatchLocation()=default
IntervalMap.h
llvm::CompileUnit::AccelInfo::Die
const DIE * Die
DIE this entry describes.
Definition: DWARFLinkerCompileUnit.h:216
llvm::IntervalMap
Definition: IntervalMap.h:936
llvm::CompileUnit::noteForwardReference
void noteForwardReference(DIE *Die, const CompileUnit *RefUnit, DeclContext *Ctxt, PatchLocation Attr)
Keep track of a forward reference to DIE Die in RefUnit by Attr.
Definition: DWARFLinkerCompileUnit.cpp:81
llvm::CompileUnit::DIEInfo::InModuleScope
bool InModuleScope
Is DIE in the clang module scope?
Definition: DWARFLinkerCompileUnit.h:79
llvm::DWARFDie
Utility class that carries the DWARF compile/type unit and the debug info entry in an object.
Definition: DWARFDie.h:43
llvm::CompileUnit::DIEInfo::Incomplete
bool Incomplete
Does DIE transitively refer an incomplete decl?
Definition: DWARFLinkerCompileUnit.h:76
llvm::CompileUnit::markEverythingAsKept
void markEverythingAsKept()
Mark every DIE in this unit as kept.
Definition: DWARFLinkerCompileUnit.cpp:40
llvm::DIEUnit::getUnitDie
DIE & getUnitDie()
Definition: DIE.h:919
llvm::CompileUnit::isClangModule
bool isClangModule() const
Definition: DWARFLinkerCompileUnit.h:119