@@ -202,9 +202,9 @@ using UnitListTy = std::vector<std::unique_ptr<CompileUnit>>;
202
202
203
203
// / this class represents DWARF information for source file
204
204
// / and it`s address map.
205
- class DwarfFile {
205
+ class DWARFFile {
206
206
public:
207
- DwarfFile (StringRef Name, DWARFContext *Dwarf, AddressesMap *Addresses,
207
+ DWARFFile (StringRef Name, DWARFContext *Dwarf, AddressesMap *Addresses,
208
208
const std::vector<std::string> &Warnings)
209
209
: FileName(Name), Dwarf(Dwarf), Addresses(Addresses), Warnings(Warnings) {
210
210
}
@@ -222,7 +222,7 @@ class DwarfFile {
222
222
typedef std::function<void (const Twine &Warning, StringRef Context,
223
223
const DWARFDie *DIE)>
224
224
messageHandler;
225
- typedef std::function<ErrorOr<DwarfFile &>(StringRef ContainerName,
225
+ typedef std::function<ErrorOr<DWARFFile &>(StringRef ContainerName,
226
226
StringRef Path)>
227
227
objFileLoader;
228
228
typedef std::map<std::string, std::string> swiftInterfacesMap;
@@ -249,7 +249,7 @@ class DWARFLinker {
249
249
: TheDwarfEmitter(Emitter), DwarfLinkerClientID(ClientID) {}
250
250
251
251
// / Add object file to be linked.
252
- void addObjectFile (DwarfFile &File);
252
+ void addObjectFile (DWARFFile &File);
253
253
254
254
// / Link debug info for added objFiles. Object
255
255
// / files are linked all together.
@@ -376,13 +376,13 @@ class DWARFLinker {
376
376
// / returns true if we need to translate strings.
377
377
bool needToTranslateStrings () { return StringsTranslator != nullptr ; }
378
378
379
- void reportWarning (const Twine &Warning, const DwarfFile &File,
379
+ void reportWarning (const Twine &Warning, const DWARFFile &File,
380
380
const DWARFDie *DIE = nullptr ) const {
381
381
if (Options.WarningHandler != nullptr )
382
382
Options.WarningHandler (Warning, File.FileName , DIE);
383
383
}
384
384
385
- void reportError (const Twine &Warning, const DwarfFile &File,
385
+ void reportError (const Twine &Warning, const DWARFFile &File,
386
386
const DWARFDie *DIE = nullptr ) const {
387
387
if (Options.ErrorHandler != nullptr )
388
388
Options.ErrorHandler (Warning, File.FileName , DIE);
@@ -398,18 +398,18 @@ class DWARFLinker {
398
398
void updateAccelKind (DWARFContext &Dwarf);
399
399
400
400
// / Emit warnings as Dwarf compile units to leave a trail after linking.
401
- bool emitPaperTrailWarnings (const DwarfFile &File,
401
+ bool emitPaperTrailWarnings (const DWARFFile &File,
402
402
OffsetsStringPool &StringPool);
403
403
404
404
void copyInvariantDebugSection (DWARFContext &Dwarf);
405
405
406
406
// / Keeps track of data associated with one object during linking.
407
407
struct LinkContext {
408
- DwarfFile &File;
408
+ DWARFFile &File;
409
409
UnitListTy CompileUnits;
410
410
bool Skip = false ;
411
411
412
- LinkContext (DwarfFile &File) : File(File) {}
412
+ LinkContext (DWARFFile &File) : File(File) {}
413
413
414
414
// / Clear part of the context that's no longer needed when we're done with
415
415
// / the debug object.
@@ -438,7 +438,7 @@ class DWARFLinker {
438
438
// / kept. All DIEs referenced though attributes should be kept.
439
439
void lookForRefDIEsToKeep (const DWARFDie &Die, CompileUnit &CU,
440
440
unsigned Flags, const UnitListTy &Units,
441
- const DwarfFile &File,
441
+ const DWARFFile &File,
442
442
SmallVectorImpl<WorklistItem> &Worklist);
443
443
444
444
// / \defgroup FindRootDIEs Find DIEs corresponding to Address map entries.
@@ -450,7 +450,7 @@ class DWARFLinker {
450
450
// / The return value indicates whether the DIE is incomplete.
451
451
void lookForDIEsToKeep (AddressesMap &RelocMgr, RangesTy &Ranges,
452
452
const UnitListTy &Units, const DWARFDie &DIE,
453
- const DwarfFile &File, CompileUnit &CU,
453
+ const DWARFFile &File, CompileUnit &CU,
454
454
unsigned Flags);
455
455
456
456
// / If this compile unit is really a skeleton CU that points to a
@@ -460,7 +460,7 @@ class DWARFLinker {
460
460
// / pointing to the module, and a DW_AT_gnu_dwo_id with the module
461
461
// / hash.
462
462
bool registerModuleReference (DWARFDie CUDie, const DWARFUnit &Unit,
463
- const DwarfFile &File,
463
+ const DWARFFile &File,
464
464
OffsetsStringPool &OffsetsStringPool,
465
465
UniquingStringPool &UniquingStringPoolStringPool,
466
466
DeclContextTree &ODRContexts,
@@ -473,7 +473,7 @@ class DWARFLinker {
473
473
// / to Units.
474
474
Error loadClangModule (DWARFDie CUDie, StringRef FilePath,
475
475
StringRef ModuleName, uint64_t DwoId,
476
- const DwarfFile &File,
476
+ const DWARFFile &File,
477
477
OffsetsStringPool &OffsetsStringPool,
478
478
UniquingStringPool &UniquingStringPool,
479
479
DeclContextTree &ODRContexts, uint64_t ModulesEndOffset,
@@ -484,11 +484,11 @@ class DWARFLinker {
484
484
void keepDIEAndDependencies (AddressesMap &RelocMgr, RangesTy &Ranges,
485
485
const UnitListTy &Units, const DWARFDie &DIE,
486
486
CompileUnit::DIEInfo &MyInfo,
487
- const DwarfFile &File, CompileUnit &CU,
487
+ const DWARFFile &File, CompileUnit &CU,
488
488
bool UseODR);
489
489
490
490
unsigned shouldKeepDIE (AddressesMap &RelocMgr, RangesTy &Ranges,
491
- const DWARFDie &DIE, const DwarfFile &File,
491
+ const DWARFDie &DIE, const DWARFFile &File,
492
492
CompileUnit &Unit, CompileUnit::DIEInfo &MyInfo,
493
493
unsigned Flags);
494
494
@@ -499,7 +499,7 @@ class DWARFLinker {
499
499
CompileUnit::DIEInfo &MyInfo, unsigned Flags);
500
500
501
501
unsigned shouldKeepSubprogramDIE (AddressesMap &RelocMgr, RangesTy &Ranges,
502
- const DWARFDie &DIE, const DwarfFile &File,
502
+ const DWARFDie &DIE, const DWARFFile &File,
503
503
CompileUnit &Unit,
504
504
CompileUnit::DIEInfo &MyInfo,
505
505
unsigned Flags);
@@ -508,7 +508,7 @@ class DWARFLinker {
508
508
// / RefValue. The resulting DIE might be in another CompileUnit which is
509
509
// / stored into \p ReferencedCU. \returns null if resolving fails for any
510
510
// / reason.
511
- DWARFDie resolveDIEReference (const DwarfFile &File, const UnitListTy &Units,
511
+ DWARFDie resolveDIEReference (const DWARFFile &File, const UnitListTy &Units,
512
512
const DWARFFormValue &RefValue,
513
513
const DWARFDie &DIE, CompileUnit *&RefCU);
514
514
@@ -523,7 +523,7 @@ class DWARFLinker {
523
523
class DIECloner {
524
524
DWARFLinker &Linker;
525
525
DwarfEmitter *Emitter;
526
- DwarfFile &ObjFile;
526
+ DWARFFile &ObjFile;
527
527
528
528
// / Allocator used for all the DIEValue objects.
529
529
BumpPtrAllocator &DIEAlloc;
@@ -533,7 +533,7 @@ class DWARFLinker {
533
533
bool Update;
534
534
535
535
public:
536
- DIECloner (DWARFLinker &Linker, DwarfEmitter *Emitter, DwarfFile &ObjFile,
536
+ DIECloner (DWARFLinker &Linker, DwarfEmitter *Emitter, DWARFFile &ObjFile,
537
537
BumpPtrAllocator &DIEAlloc,
538
538
std::vector<std::unique_ptr<CompileUnit>> &CompileUnits,
539
539
bool Update)
@@ -551,7 +551,7 @@ class DWARFLinker {
551
551
// / applied to the entry point of the function to get the linked address.
552
552
// / \param Die the output DIE to use, pass NULL to create one.
553
553
// / \returns the root of the cloned tree or null if nothing was selected.
554
- DIE *cloneDIE (const DWARFDie &InputDIE, const DwarfFile &File,
554
+ DIE *cloneDIE (const DWARFDie &InputDIE, const DWARFFile &File,
555
555
CompileUnit &U, OffsetsStringPool &StringPool,
556
556
int64_t PCOffset, uint32_t OutOffset, unsigned Flags,
557
557
bool IsLittleEndian, DIE *Die = nullptr );
@@ -560,7 +560,7 @@ class DWARFLinker {
560
560
// / chose to keep above. If there are no valid relocs, then there's
561
561
// / nothing to clone/emit.
562
562
uint64_t cloneAllCompileUnits (DWARFContext &DwarfContext,
563
- const DwarfFile &File,
563
+ const DWARFFile &File,
564
564
OffsetsStringPool &StringPool,
565
565
bool IsLittleEndian);
566
566
@@ -606,7 +606,7 @@ class DWARFLinker {
606
606
607
607
// / Helper for cloneDIE.
608
608
unsigned cloneAttribute (DIE &Die, const DWARFDie &InputDIE,
609
- const DwarfFile &File, CompileUnit &U,
609
+ const DWARFFile &File, CompileUnit &U,
610
610
OffsetsStringPool &StringPool,
611
611
const DWARFFormValue &Val,
612
612
const AttributeSpec AttrSpec, unsigned AttrSize,
@@ -627,18 +627,18 @@ class DWARFLinker {
627
627
AttributeSpec AttrSpec,
628
628
unsigned AttrSize,
629
629
const DWARFFormValue &Val,
630
- const DwarfFile &File,
630
+ const DWARFFile &File,
631
631
CompileUnit &Unit);
632
632
633
633
// / Clone a DWARF expression that may be referencing another DIE.
634
634
void cloneExpression (DataExtractor &Data, DWARFExpression Expression,
635
- const DwarfFile &File, CompileUnit &Unit,
635
+ const DWARFFile &File, CompileUnit &Unit,
636
636
SmallVectorImpl<uint8_t > &OutputBuffer);
637
637
638
638
// / Clone an attribute referencing another DIE and add
639
639
// / it to \p Die.
640
640
// / \returns the size of the new attribute.
641
- unsigned cloneBlockAttribute (DIE &Die, const DwarfFile &File,
641
+ unsigned cloneBlockAttribute (DIE &Die, const DWARFFile &File,
642
642
CompileUnit &Unit, AttributeSpec AttrSpec,
643
643
const DWARFFormValue &Val, unsigned AttrSize,
644
644
bool IsLittleEndian);
@@ -654,7 +654,7 @@ class DWARFLinker {
654
654
// / Clone a scalar attribute and add it to \p Die.
655
655
// / \returns the size of the new attribute.
656
656
unsigned cloneScalarAttribute (DIE &Die, const DWARFDie &InputDIE,
657
- const DwarfFile &File, CompileUnit &U,
657
+ const DWARFFile &File, CompileUnit &U,
658
658
AttributeSpec AttrSpec,
659
659
const DWARFFormValue &Val, unsigned AttrSize,
660
660
AttributesInfo &Info);
@@ -670,7 +670,7 @@ class DWARFLinker {
670
670
void copyAbbrev (const DWARFAbbreviationDeclaration &Abbrev, bool hasODR);
671
671
672
672
uint32_t hashFullyQualifiedName (DWARFDie DIE, CompileUnit &U,
673
- const DwarfFile &File,
673
+ const DWARFFile &File,
674
674
int RecurseDepth = 0 );
675
675
676
676
// / Helper for cloneDIE.
@@ -685,7 +685,7 @@ class DWARFLinker {
685
685
// / Compute and emit debug_ranges section for \p Unit, and
686
686
// / patch the attributes referencing it.
687
687
void patchRangesForUnit (const CompileUnit &Unit, DWARFContext &Dwarf,
688
- const DwarfFile &File) const ;
688
+ const DWARFFile &File) const ;
689
689
690
690
// / Generate and emit the DW_AT_ranges attribute for a compile_unit if it had
691
691
// / one.
@@ -695,15 +695,15 @@ class DWARFLinker {
695
695
// / parts according to the linked function ranges and emit the result in the
696
696
// / debug_line section.
697
697
void patchLineTableForUnit (CompileUnit &Unit, DWARFContext &OrigDwarf,
698
- const DwarfFile &File);
698
+ const DWARFFile &File);
699
699
700
700
// / Emit the accelerator entries for \p Unit.
701
701
void emitAcceleratorEntriesForUnit (CompileUnit &Unit);
702
702
void emitDwarfAcceleratorEntriesForUnit (CompileUnit &Unit);
703
703
void emitAppleAcceleratorEntriesForUnit (CompileUnit &Unit);
704
704
705
705
// / Patch the frame info for an object file and emit it.
706
- void patchFrameInfoForObject (const DwarfFile &, RangesTy &Ranges,
706
+ void patchFrameInfoForObject (const DWARFFile &, RangesTy &Ranges,
707
707
DWARFContext &, unsigned AddressSize);
708
708
709
709
// / FoldingSet that uniques the abbreviations.
0 commit comments