[llvm] a58b20e - [llvm] Rename DwarfFile to DWARFFile to fix ODR violation (NFC)
Jonas Devlieghere via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 4 23:51:12 PDT 2020
Author: Jonas Devlieghere
Date: 2020-10-04T23:46:36-07:00
New Revision: a58b20e5a4fb64404cb62d2bb6a5e6dc40d22784
URL: https://github.com/llvm/llvm-project/commit/a58b20e5a4fb64404cb62d2bb6a5e6dc40d22784
DIFF: https://github.com/llvm/llvm-project/commit/a58b20e5a4fb64404cb62d2bb6a5e6dc40d22784.diff
LOG: [llvm] Rename DwarfFile to DWARFFile to fix ODR violation (NFC)
Rename the DwarfFile class in DWARFLinker to DWARFFile. This is
consistent with the other DWARF classes and avoids a ODR violation with
the DwarfFile class in AsmPrinter.
Added:
Modified:
llvm/include/llvm/DWARFLinker/DWARFLinker.h
llvm/lib/DWARFLinker/DWARFLinker.cpp
llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
llvm/tools/dsymutil/DwarfLinkerForBinary.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/DWARFLinker/DWARFLinker.h b/llvm/include/llvm/DWARFLinker/DWARFLinker.h
index be3c5ebcadae..2fb61b9edf55 100644
--- a/llvm/include/llvm/DWARFLinker/DWARFLinker.h
+++ b/llvm/include/llvm/DWARFLinker/DWARFLinker.h
@@ -202,9 +202,9 @@ using UnitListTy = std::vector<std::unique_ptr<CompileUnit>>;
/// this class represents DWARF information for source file
/// and it`s address map.
-class DwarfFile {
+class DWARFFile {
public:
- DwarfFile(StringRef Name, DWARFContext *Dwarf, AddressesMap *Addresses,
+ DWARFFile(StringRef Name, DWARFContext *Dwarf, AddressesMap *Addresses,
const std::vector<std::string> &Warnings)
: FileName(Name), Dwarf(Dwarf), Addresses(Addresses), Warnings(Warnings) {
}
@@ -222,7 +222,7 @@ class DwarfFile {
typedef std::function<void(const Twine &Warning, StringRef Context,
const DWARFDie *DIE)>
messageHandler;
-typedef std::function<ErrorOr<DwarfFile &>(StringRef ContainerName,
+typedef std::function<ErrorOr<DWARFFile &>(StringRef ContainerName,
StringRef Path)>
objFileLoader;
typedef std::map<std::string, std::string> swiftInterfacesMap;
@@ -249,7 +249,7 @@ class DWARFLinker {
: TheDwarfEmitter(Emitter), DwarfLinkerClientID(ClientID) {}
/// Add object file to be linked.
- void addObjectFile(DwarfFile &File);
+ void addObjectFile(DWARFFile &File);
/// Link debug info for added objFiles. Object
/// files are linked all together.
@@ -376,13 +376,13 @@ class DWARFLinker {
/// returns true if we need to translate strings.
bool needToTranslateStrings() { return StringsTranslator != nullptr; }
- void reportWarning(const Twine &Warning, const DwarfFile &File,
+ void reportWarning(const Twine &Warning, const DWARFFile &File,
const DWARFDie *DIE = nullptr) const {
if (Options.WarningHandler != nullptr)
Options.WarningHandler(Warning, File.FileName, DIE);
}
- void reportError(const Twine &Warning, const DwarfFile &File,
+ void reportError(const Twine &Warning, const DWARFFile &File,
const DWARFDie *DIE = nullptr) const {
if (Options.ErrorHandler != nullptr)
Options.ErrorHandler(Warning, File.FileName, DIE);
@@ -398,18 +398,18 @@ class DWARFLinker {
void updateAccelKind(DWARFContext &Dwarf);
/// Emit warnings as Dwarf compile units to leave a trail after linking.
- bool emitPaperTrailWarnings(const DwarfFile &File,
+ bool emitPaperTrailWarnings(const DWARFFile &File,
OffsetsStringPool &StringPool);
void copyInvariantDebugSection(DWARFContext &Dwarf);
/// Keeps track of data associated with one object during linking.
struct LinkContext {
- DwarfFile &File;
+ DWARFFile &File;
UnitListTy CompileUnits;
bool Skip = false;
- LinkContext(DwarfFile &File) : File(File) {}
+ LinkContext(DWARFFile &File) : File(File) {}
/// Clear part of the context that's no longer needed when we're done with
/// the debug object.
@@ -438,7 +438,7 @@ class DWARFLinker {
/// kept. All DIEs referenced though attributes should be kept.
void lookForRefDIEsToKeep(const DWARFDie &Die, CompileUnit &CU,
unsigned Flags, const UnitListTy &Units,
- const DwarfFile &File,
+ const DWARFFile &File,
SmallVectorImpl<WorklistItem> &Worklist);
/// \defgroup FindRootDIEs Find DIEs corresponding to Address map entries.
@@ -450,7 +450,7 @@ class DWARFLinker {
/// The return value indicates whether the DIE is incomplete.
void lookForDIEsToKeep(AddressesMap &RelocMgr, RangesTy &Ranges,
const UnitListTy &Units, const DWARFDie &DIE,
- const DwarfFile &File, CompileUnit &CU,
+ const DWARFFile &File, CompileUnit &CU,
unsigned Flags);
/// If this compile unit is really a skeleton CU that points to a
@@ -460,7 +460,7 @@ class DWARFLinker {
/// pointing to the module, and a DW_AT_gnu_dwo_id with the module
/// hash.
bool registerModuleReference(DWARFDie CUDie, const DWARFUnit &Unit,
- const DwarfFile &File,
+ const DWARFFile &File,
OffsetsStringPool &OffsetsStringPool,
UniquingStringPool &UniquingStringPoolStringPool,
DeclContextTree &ODRContexts,
@@ -473,7 +473,7 @@ class DWARFLinker {
/// to Units.
Error loadClangModule(DWARFDie CUDie, StringRef FilePath,
StringRef ModuleName, uint64_t DwoId,
- const DwarfFile &File,
+ const DWARFFile &File,
OffsetsStringPool &OffsetsStringPool,
UniquingStringPool &UniquingStringPool,
DeclContextTree &ODRContexts, uint64_t ModulesEndOffset,
@@ -484,11 +484,11 @@ class DWARFLinker {
void keepDIEAndDependencies(AddressesMap &RelocMgr, RangesTy &Ranges,
const UnitListTy &Units, const DWARFDie &DIE,
CompileUnit::DIEInfo &MyInfo,
- const DwarfFile &File, CompileUnit &CU,
+ const DWARFFile &File, CompileUnit &CU,
bool UseODR);
unsigned shouldKeepDIE(AddressesMap &RelocMgr, RangesTy &Ranges,
- const DWARFDie &DIE, const DwarfFile &File,
+ const DWARFDie &DIE, const DWARFFile &File,
CompileUnit &Unit, CompileUnit::DIEInfo &MyInfo,
unsigned Flags);
@@ -499,7 +499,7 @@ class DWARFLinker {
CompileUnit::DIEInfo &MyInfo, unsigned Flags);
unsigned shouldKeepSubprogramDIE(AddressesMap &RelocMgr, RangesTy &Ranges,
- const DWARFDie &DIE, const DwarfFile &File,
+ const DWARFDie &DIE, const DWARFFile &File,
CompileUnit &Unit,
CompileUnit::DIEInfo &MyInfo,
unsigned Flags);
@@ -508,7 +508,7 @@ class DWARFLinker {
/// RefValue. The resulting DIE might be in another CompileUnit which is
/// stored into \p ReferencedCU. \returns null if resolving fails for any
/// reason.
- DWARFDie resolveDIEReference(const DwarfFile &File, const UnitListTy &Units,
+ DWARFDie resolveDIEReference(const DWARFFile &File, const UnitListTy &Units,
const DWARFFormValue &RefValue,
const DWARFDie &DIE, CompileUnit *&RefCU);
@@ -523,7 +523,7 @@ class DWARFLinker {
class DIECloner {
DWARFLinker &Linker;
DwarfEmitter *Emitter;
- DwarfFile &ObjFile;
+ DWARFFile &ObjFile;
/// Allocator used for all the DIEValue objects.
BumpPtrAllocator &DIEAlloc;
@@ -533,7 +533,7 @@ class DWARFLinker {
bool Update;
public:
- DIECloner(DWARFLinker &Linker, DwarfEmitter *Emitter, DwarfFile &ObjFile,
+ DIECloner(DWARFLinker &Linker, DwarfEmitter *Emitter, DWARFFile &ObjFile,
BumpPtrAllocator &DIEAlloc,
std::vector<std::unique_ptr<CompileUnit>> &CompileUnits,
bool Update)
@@ -551,7 +551,7 @@ class DWARFLinker {
/// applied to the entry point of the function to get the linked address.
/// \param Die the output DIE to use, pass NULL to create one.
/// \returns the root of the cloned tree or null if nothing was selected.
- DIE *cloneDIE(const DWARFDie &InputDIE, const DwarfFile &File,
+ DIE *cloneDIE(const DWARFDie &InputDIE, const DWARFFile &File,
CompileUnit &U, OffsetsStringPool &StringPool,
int64_t PCOffset, uint32_t OutOffset, unsigned Flags,
bool IsLittleEndian, DIE *Die = nullptr);
@@ -560,7 +560,7 @@ class DWARFLinker {
/// chose to keep above. If there are no valid relocs, then there's
/// nothing to clone/emit.
uint64_t cloneAllCompileUnits(DWARFContext &DwarfContext,
- const DwarfFile &File,
+ const DWARFFile &File,
OffsetsStringPool &StringPool,
bool IsLittleEndian);
@@ -606,7 +606,7 @@ class DWARFLinker {
/// Helper for cloneDIE.
unsigned cloneAttribute(DIE &Die, const DWARFDie &InputDIE,
- const DwarfFile &File, CompileUnit &U,
+ const DWARFFile &File, CompileUnit &U,
OffsetsStringPool &StringPool,
const DWARFFormValue &Val,
const AttributeSpec AttrSpec, unsigned AttrSize,
@@ -627,18 +627,18 @@ class DWARFLinker {
AttributeSpec AttrSpec,
unsigned AttrSize,
const DWARFFormValue &Val,
- const DwarfFile &File,
+ const DWARFFile &File,
CompileUnit &Unit);
/// Clone a DWARF expression that may be referencing another DIE.
void cloneExpression(DataExtractor &Data, DWARFExpression Expression,
- const DwarfFile &File, CompileUnit &Unit,
+ const DWARFFile &File, CompileUnit &Unit,
SmallVectorImpl<uint8_t> &OutputBuffer);
/// Clone an attribute referencing another DIE and add
/// it to \p Die.
/// \returns the size of the new attribute.
- unsigned cloneBlockAttribute(DIE &Die, const DwarfFile &File,
+ unsigned cloneBlockAttribute(DIE &Die, const DWARFFile &File,
CompileUnit &Unit, AttributeSpec AttrSpec,
const DWARFFormValue &Val, unsigned AttrSize,
bool IsLittleEndian);
@@ -654,7 +654,7 @@ class DWARFLinker {
/// Clone a scalar attribute and add it to \p Die.
/// \returns the size of the new attribute.
unsigned cloneScalarAttribute(DIE &Die, const DWARFDie &InputDIE,
- const DwarfFile &File, CompileUnit &U,
+ const DWARFFile &File, CompileUnit &U,
AttributeSpec AttrSpec,
const DWARFFormValue &Val, unsigned AttrSize,
AttributesInfo &Info);
@@ -670,7 +670,7 @@ class DWARFLinker {
void copyAbbrev(const DWARFAbbreviationDeclaration &Abbrev, bool hasODR);
uint32_t hashFullyQualifiedName(DWARFDie DIE, CompileUnit &U,
- const DwarfFile &File,
+ const DWARFFile &File,
int RecurseDepth = 0);
/// Helper for cloneDIE.
@@ -685,7 +685,7 @@ class DWARFLinker {
/// Compute and emit debug_ranges section for \p Unit, and
/// patch the attributes referencing it.
void patchRangesForUnit(const CompileUnit &Unit, DWARFContext &Dwarf,
- const DwarfFile &File) const;
+ const DWARFFile &File) const;
/// Generate and emit the DW_AT_ranges attribute for a compile_unit if it had
/// one.
@@ -695,7 +695,7 @@ class DWARFLinker {
/// parts according to the linked function ranges and emit the result in the
/// debug_line section.
void patchLineTableForUnit(CompileUnit &Unit, DWARFContext &OrigDwarf,
- const DwarfFile &File);
+ const DWARFFile &File);
/// Emit the accelerator entries for \p Unit.
void emitAcceleratorEntriesForUnit(CompileUnit &Unit);
@@ -703,7 +703,7 @@ class DWARFLinker {
void emitAppleAcceleratorEntriesForUnit(CompileUnit &Unit);
/// Patch the frame info for an object file and emit it.
- void patchFrameInfoForObject(const DwarfFile &, RangesTy &Ranges,
+ void patchFrameInfoForObject(const DWARFFile &, RangesTy &Ranges,
DWARFContext &, unsigned AddressSize);
/// FoldingSet that uniques the abbreviations.
diff --git a/llvm/lib/DWARFLinker/DWARFLinker.cpp b/llvm/lib/DWARFLinker/DWARFLinker.cpp
index 12b19e77a422..2b1227428105 100644
--- a/llvm/lib/DWARFLinker/DWARFLinker.cpp
+++ b/llvm/lib/DWARFLinker/DWARFLinker.cpp
@@ -63,7 +63,7 @@ static CompileUnit *getUnitForOffset(const UnitListTy &Units, uint64_t Offset) {
/// Resolve the DIE attribute reference that has been extracted in \p RefValue.
/// The resulting DIE might be in another CompileUnit which is stored into \p
/// ReferencedCU. \returns null if resolving fails for any reason.
-DWARFDie DWARFLinker::resolveDIEReference(const DwarfFile &File,
+DWARFDie DWARFLinker::resolveDIEReference(const DWARFFile &File,
const UnitListTy &Units,
const DWARFFormValue &RefValue,
const DWARFDie &DIE,
@@ -420,7 +420,7 @@ unsigned DWARFLinker::shouldKeepVariableDIE(AddressesMap &RelocMgr,
/// \returns updated TraversalFlags.
unsigned DWARFLinker::shouldKeepSubprogramDIE(
AddressesMap &RelocMgr, RangesTy &Ranges, const DWARFDie &DIE,
- const DwarfFile &File, CompileUnit &Unit, CompileUnit::DIEInfo &MyInfo,
+ const DWARFFile &File, CompileUnit &Unit, CompileUnit::DIEInfo &MyInfo,
unsigned Flags) {
const auto *Abbrev = DIE.getAbbreviationDeclarationPtr();
@@ -482,7 +482,7 @@ unsigned DWARFLinker::shouldKeepSubprogramDIE(
/// Check if a DIE should be kept.
/// \returns updated TraversalFlags.
unsigned DWARFLinker::shouldKeepDIE(AddressesMap &RelocMgr, RangesTy &Ranges,
- const DWARFDie &DIE, const DwarfFile &File,
+ const DWARFDie &DIE, const DWARFFile &File,
CompileUnit &Unit,
CompileUnit::DIEInfo &MyInfo,
unsigned Flags) {
@@ -590,7 +590,7 @@ void DWARFLinker::lookForChildDIEsToKeep(
/// kept. All DIEs referenced though attributes should be kept.
void DWARFLinker::lookForRefDIEsToKeep(
const DWARFDie &Die, CompileUnit &CU, unsigned Flags,
- const UnitListTy &Units, const DwarfFile &File,
+ const UnitListTy &Units, const DWARFFile &File,
SmallVectorImpl<WorklistItem> &Worklist) {
bool UseOdr = (Flags & DWARFLinker::TF_DependencyWalk)
? (Flags & DWARFLinker::TF_ODR)
@@ -700,7 +700,7 @@ void DWARFLinker::lookForParentDIEsToKeep(
/// The return value indicates whether the DIE is incomplete.
void DWARFLinker::lookForDIEsToKeep(AddressesMap &AddressesMap,
RangesTy &Ranges, const UnitListTy &Units,
- const DWARFDie &Die, const DwarfFile &File,
+ const DWARFDie &Die, const DWARFFile &File,
CompileUnit &Cu, unsigned Flags) {
// LIFO work list.
SmallVector<WorklistItem, 4> Worklist;
@@ -838,7 +838,7 @@ unsigned DWARFLinker::DIECloner::cloneStringAttribute(
unsigned DWARFLinker::DIECloner::cloneDieReferenceAttribute(
DIE &Die, const DWARFDie &InputDIE, AttributeSpec AttrSpec,
- unsigned AttrSize, const DWARFFormValue &Val, const DwarfFile &File,
+ unsigned AttrSize, const DWARFFormValue &Val, const DWARFFile &File,
CompileUnit &Unit) {
const DWARFUnit &U = Unit.getOrigUnit();
uint64_t Ref = *Val.getAsReference();
@@ -910,7 +910,7 @@ unsigned DWARFLinker::DIECloner::cloneDieReferenceAttribute(
}
void DWARFLinker::DIECloner::cloneExpression(
- DataExtractor &Data, DWARFExpression Expression, const DwarfFile &File,
+ DataExtractor &Data, DWARFExpression Expression, const DWARFFile &File,
CompileUnit &Unit, SmallVectorImpl<uint8_t> &OutputBuffer) {
using Encoding = DWARFExpression::Operation::Encoding;
@@ -975,7 +975,7 @@ void DWARFLinker::DIECloner::cloneExpression(
}
unsigned DWARFLinker::DIECloner::cloneBlockAttribute(
- DIE &Die, const DwarfFile &File, CompileUnit &Unit, AttributeSpec AttrSpec,
+ DIE &Die, const DWARFFile &File, CompileUnit &Unit, AttributeSpec AttrSpec,
const DWARFFormValue &Val, unsigned AttrSize, bool IsLittleEndian) {
DIEValueList *Attr;
DIEValue Value;
@@ -1087,7 +1087,7 @@ unsigned DWARFLinker::DIECloner::cloneAddressAttribute(
}
unsigned DWARFLinker::DIECloner::cloneScalarAttribute(
- DIE &Die, const DWARFDie &InputDIE, const DwarfFile &File,
+ DIE &Die, const DWARFDie &InputDIE, const DWARFFile &File,
CompileUnit &Unit, AttributeSpec AttrSpec, const DWARFFormValue &Val,
unsigned AttrSize, AttributesInfo &Info) {
uint64_t Value;
@@ -1155,7 +1155,7 @@ unsigned DWARFLinker::DIECloner::cloneScalarAttribute(
/// value \p Val, and add it to \p Die.
/// \returns the size of the cloned attribute.
unsigned DWARFLinker::DIECloner::cloneAttribute(
- DIE &Die, const DWARFDie &InputDIE, const DwarfFile &File,
+ DIE &Die, const DWARFDie &InputDIE, const DWARFFile &File,
CompileUnit &Unit, OffsetsStringPool &StringPool, const DWARFFormValue &Val,
const AttributeSpec AttrSpec, unsigned AttrSize, AttributesInfo &Info,
bool IsLittleEndian) {
@@ -1273,7 +1273,7 @@ shouldSkipAttribute(DWARFAbbreviationDeclaration::AttributeSpec AttrSpec,
}
DIE *DWARFLinker::DIECloner::cloneDIE(const DWARFDie &InputDIE,
- const DwarfFile &File, CompileUnit &Unit,
+ const DWARFFile &File, CompileUnit &Unit,
OffsetsStringPool &StringPool,
int64_t PCOffset, uint32_t OutOffset,
unsigned Flags, bool IsLittleEndian,
@@ -1483,7 +1483,7 @@ DIE *DWARFLinker::DIECloner::cloneDIE(const DWARFDie &InputDIE,
/// to point at the new entries.
void DWARFLinker::patchRangesForUnit(const CompileUnit &Unit,
DWARFContext &OrigDwarf,
- const DwarfFile &File) const {
+ const DWARFFile &File) const {
DWARFDebugRangeList RangeList;
const auto &FunctionRanges = Unit.getFunctionRanges();
unsigned AddressSize = Unit.getOrigUnit().getAddressByteSize();
@@ -1590,7 +1590,7 @@ static void patchStmtList(DIE &Die, DIEInteger Offset) {
/// are present in the binary.
void DWARFLinker::patchLineTableForUnit(CompileUnit &Unit,
DWARFContext &OrigDwarf,
- const DwarfFile &File) {
+ const DWARFFile &File) {
DWARFDie CUDie = Unit.getOrigUnit().getUnitDIE();
auto StmtList = dwarf::toSectionOffset(CUDie.find(dwarf::DW_AT_stmt_list));
if (!StmtList)
@@ -1790,7 +1790,7 @@ void DWARFLinker::emitDwarfAcceleratorEntriesForUnit(CompileUnit &Unit) {
/// This is actually pretty easy as the data of the CIEs and FDEs can
/// be considered as black boxes and moved as is. The only thing to do
/// is to patch the addresses in the headers.
-void DWARFLinker::patchFrameInfoForObject(const DwarfFile &File,
+void DWARFLinker::patchFrameInfoForObject(const DWARFFile &File,
RangesTy &Ranges,
DWARFContext &OrigDwarf,
unsigned AddrSize) {
@@ -1887,7 +1887,7 @@ void DWARFLinker::DIECloner::copyAbbrev(
uint32_t DWARFLinker::DIECloner::hashFullyQualifiedName(DWARFDie DIE,
CompileUnit &U,
- const DwarfFile &File,
+ const DWARFFile &File,
int ChildRecurseDepth) {
const char *Name = nullptr;
DWARFUnit *OrigUnit = &U.getOrigUnit();
@@ -1952,7 +1952,7 @@ static std::string remapPath(StringRef Path,
}
bool DWARFLinker::registerModuleReference(
- DWARFDie CUDie, const DWARFUnit &Unit, const DwarfFile &File,
+ DWARFDie CUDie, const DWARFUnit &Unit, const DWARFFile &File,
OffsetsStringPool &StringPool, UniquingStringPool &UniquingStringPool,
DeclContextTree &ODRContexts, uint64_t ModulesEndOffset, unsigned &UnitID,
bool IsLittleEndian, unsigned Indent, bool Quiet) {
@@ -2011,7 +2011,7 @@ bool DWARFLinker::registerModuleReference(
Error DWARFLinker::loadClangModule(
DWARFDie CUDie, StringRef Filename, StringRef ModuleName, uint64_t DwoId,
- const DwarfFile &File, OffsetsStringPool &StringPool,
+ const DWARFFile &File, OffsetsStringPool &StringPool,
UniquingStringPool &UniquingStringPool, DeclContextTree &ODRContexts,
uint64_t ModulesEndOffset, unsigned &UnitID, bool IsLittleEndian,
unsigned Indent, bool Quiet) {
@@ -2096,7 +2096,7 @@ Error DWARFLinker::loadClangModule(
}
uint64_t DWARFLinker::DIECloner::cloneAllCompileUnits(
- DWARFContext &DwarfContext, const DwarfFile &File,
+ DWARFContext &DwarfContext, const DWARFFile &File,
OffsetsStringPool &StringPool, bool IsLittleEndian) {
uint64_t OutputDebugInfoSize =
Linker.Options.NoOutput ? 0 : Emitter->getDebugInfoSectionSize();
@@ -2190,7 +2190,7 @@ void DWARFLinker::updateAccelKind(DWARFContext &Dwarf) {
}
}
-bool DWARFLinker::emitPaperTrailWarnings(const DwarfFile &File,
+bool DWARFLinker::emitPaperTrailWarnings(const DWARFFile &File,
OffsetsStringPool &StringPool) {
if (File.Warnings.empty())
@@ -2267,7 +2267,7 @@ void DWARFLinker::copyInvariantDebugSection(DWARFContext &Dwarf) {
"debug_aranges");
}
-void DWARFLinker::addObjectFile(DwarfFile &File) {
+void DWARFLinker::addObjectFile(DWARFFile &File) {
ObjectContexts.emplace_back(LinkContext(File));
if (ObjectContexts.back().File.Dwarf)
diff --git a/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp b/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
index 07237e220c31..3c71567b54bb 100644
--- a/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
+++ b/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
@@ -262,7 +262,7 @@ static Error emitRemarks(const LinkOptions &Options, StringRef BinaryPath,
return Error::success();
}
-ErrorOr<DwarfFile &>
+ErrorOr<DWARFFile &>
DwarfLinkerForBinary::loadObject(const DebugMapObject &Obj,
const DebugMap &DebugMap,
remarks::RemarkLinker &RL) {
@@ -274,7 +274,7 @@ DwarfLinkerForBinary::loadObject(const DebugMapObject &Obj,
AddressMapForLinking.push_back(
std::make_unique<AddressManager>(*this, *ErrorOrObj, Obj));
- ObjectsForLinking.push_back(std::make_unique<DwarfFile>(
+ ObjectsForLinking.push_back(std::make_unique<DWARFFile>(
Obj.getObjectFilename(), ContextForLinking.back().get(),
AddressMapForLinking.back().get(),
Obj.empty() ? Obj.getWarnings() : EmptyWarnings));
@@ -334,7 +334,7 @@ bool DwarfLinkerForBinary::link(const DebugMap &Map) {
});
GeneralLinker.setObjFileLoader(
[&DebugMap, &RL, this](StringRef ContainerName,
- StringRef Path) -> ErrorOr<DwarfFile &> {
+ StringRef Path) -> ErrorOr<DWARFFile &> {
auto &Obj = DebugMap.addDebugMapObject(
Path, sys::TimePoint<std::chrono::seconds>(), MachO::N_OSO);
@@ -429,7 +429,7 @@ bool DwarfLinkerForBinary::link(const DebugMap &Map) {
if (auto ErrorOrObj = loadObject(*Obj, Map, RL))
GeneralLinker.addObjectFile(*ErrorOrObj);
else {
- ObjectsForLinking.push_back(std::make_unique<DwarfFile>(
+ ObjectsForLinking.push_back(std::make_unique<DWARFFile>(
Obj->getObjectFilename(), nullptr, nullptr,
Obj->empty() ? Obj->getWarnings() : EmptyWarnings));
GeneralLinker.addObjectFile(*ObjectsForLinking.back());
diff --git a/llvm/tools/dsymutil/DwarfLinkerForBinary.h b/llvm/tools/dsymutil/DwarfLinkerForBinary.h
index 7cabacbb993b..842b27c70ab4 100644
--- a/llvm/tools/dsymutil/DwarfLinkerForBinary.h
+++ b/llvm/tools/dsymutil/DwarfLinkerForBinary.h
@@ -167,7 +167,7 @@ class DwarfLinkerForBinary {
/// Attempt to load a debug object from disk.
ErrorOr<const object::ObjectFile &> loadObject(const DebugMapObject &Obj,
const Triple &triple);
- ErrorOr<DwarfFile &> loadObject(const DebugMapObject &Obj,
+ ErrorOr<DWARFFile &> loadObject(const DebugMapObject &Obj,
const DebugMap &DebugMap,
remarks::RemarkLinker &RL);
@@ -175,7 +175,7 @@ class DwarfLinkerForBinary {
BinaryHolder &BinHolder;
LinkOptions Options;
std::unique_ptr<DwarfStreamer> Streamer;
- std::vector<std::unique_ptr<DwarfFile>> ObjectsForLinking;
+ std::vector<std::unique_ptr<DWARFFile>> ObjectsForLinking;
std::vector<std::unique_ptr<DWARFContext>> ContextForLinking;
std::vector<std::unique_ptr<AddressManager>> AddressMapForLinking;
std::vector<std::string> EmptyWarnings;
More information about the llvm-commits
mailing list