2019-12-21 00:23:31 +08:00
|
|
|
//===- tools/dsymutil/DwarfLinkerForBinary.h --------------------*- C++ -*-===//
|
2018-06-28 00:13:40 +08:00
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2018-06-28 00:13:40 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_TOOLS_DSYMUTIL_DWARFLINKER_H
|
|
|
|
#define LLVM_TOOLS_DSYMUTIL_DWARFLINKER_H
|
|
|
|
|
|
|
|
#include "BinaryHolder.h"
|
|
|
|
#include "DebugMap.h"
|
|
|
|
#include "LinkUtils.h"
|
2019-12-21 00:23:31 +08:00
|
|
|
#include "llvm/DWARFLinker/DWARFLinker.h"
|
|
|
|
#include "llvm/DWARFLinker/DWARFLinkerCompileUnit.h"
|
|
|
|
#include "llvm/DWARFLinker/DWARFLinkerDeclContext.h"
|
2020-04-07 05:42:40 +08:00
|
|
|
#include "llvm/DWARFLinker/DWARFStreamer.h"
|
2018-06-28 00:13:40 +08:00
|
|
|
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
|
[Dsymutil][Debuginfo][NFC] #4 Refactor dsymutil to separate DWARF optimizing part.
Summary:
The primary goal of this refactoring is to separate DWARF optimizing part.
So that it could be reused by linker or by any other client.
There was a thread on llvm-dev discussing the necessity of such a refactoring:
http://lists.llvm.org/pipermail/llvm-dev/2019-September/135068.html.
This is a final part from series of patches for dsymutil.
Previous patches : D71068, D71839, D72476. This patch:
1. Creates lib/DWARFLinker interface :
void addObjectFile(DwarfLinkerObjFile &ObjFile);
bool link();
void setOptions;
1. Moves all linking logic from tools/dsymutil/DwarfLinkerForBinary
into lib/DWARFLinker.
2. Renames RelocationManager into AddressesManager.
3. Remarks creation logic moved from separate parallel execution
into object file loading routine.
Testing: it passes "check-all" lit testing. MD5 checksum for clang .dSYM bundle
matches for the dsymutil with/without that patch.
Reviewers: JDevlieghere, friss, dblaikie, aprantl, jdoerfert
Reviewed By: JDevlieghere
Subscribers: merge_guards_bot, hiraditya, jfb, llvm-commits, probinson, thegameg
Tags: #llvm, #debug-info
Differential Revision: https://reviews.llvm.org/D72915
2020-01-13 04:15:57 +08:00
|
|
|
#include "llvm/Remarks/RemarkFormat.h"
|
|
|
|
#include "llvm/Remarks/RemarkLinker.h"
|
2018-06-28 00:13:40 +08:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
namespace dsymutil {
|
|
|
|
|
[Dsymutil][Debuginfo][NFC] #4 Refactor dsymutil to separate DWARF optimizing part.
Summary:
The primary goal of this refactoring is to separate DWARF optimizing part.
So that it could be reused by linker or by any other client.
There was a thread on llvm-dev discussing the necessity of such a refactoring:
http://lists.llvm.org/pipermail/llvm-dev/2019-September/135068.html.
This is a final part from series of patches for dsymutil.
Previous patches : D71068, D71839, D72476. This patch:
1. Creates lib/DWARFLinker interface :
void addObjectFile(DwarfLinkerObjFile &ObjFile);
bool link();
void setOptions;
1. Moves all linking logic from tools/dsymutil/DwarfLinkerForBinary
into lib/DWARFLinker.
2. Renames RelocationManager into AddressesManager.
3. Remarks creation logic moved from separate parallel execution
into object file loading routine.
Testing: it passes "check-all" lit testing. MD5 checksum for clang .dSYM bundle
matches for the dsymutil with/without that patch.
Reviewers: JDevlieghere, friss, dblaikie, aprantl, jdoerfert
Reviewed By: JDevlieghere
Subscribers: merge_guards_bot, hiraditya, jfb, llvm-commits, probinson, thegameg
Tags: #llvm, #debug-info
Differential Revision: https://reviews.llvm.org/D72915
2020-01-13 04:15:57 +08:00
|
|
|
/// The core of the Dsymutil Dwarf linking logic.
|
2018-06-28 00:13:40 +08:00
|
|
|
///
|
|
|
|
/// The link of the dwarf information from the object files will be
|
[Dsymutil][Debuginfo][NFC] #4 Refactor dsymutil to separate DWARF optimizing part.
Summary:
The primary goal of this refactoring is to separate DWARF optimizing part.
So that it could be reused by linker or by any other client.
There was a thread on llvm-dev discussing the necessity of such a refactoring:
http://lists.llvm.org/pipermail/llvm-dev/2019-September/135068.html.
This is a final part from series of patches for dsymutil.
Previous patches : D71068, D71839, D72476. This patch:
1. Creates lib/DWARFLinker interface :
void addObjectFile(DwarfLinkerObjFile &ObjFile);
bool link();
void setOptions;
1. Moves all linking logic from tools/dsymutil/DwarfLinkerForBinary
into lib/DWARFLinker.
2. Renames RelocationManager into AddressesManager.
3. Remarks creation logic moved from separate parallel execution
into object file loading routine.
Testing: it passes "check-all" lit testing. MD5 checksum for clang .dSYM bundle
matches for the dsymutil with/without that patch.
Reviewers: JDevlieghere, friss, dblaikie, aprantl, jdoerfert
Reviewed By: JDevlieghere
Subscribers: merge_guards_bot, hiraditya, jfb, llvm-commits, probinson, thegameg
Tags: #llvm, #debug-info
Differential Revision: https://reviews.llvm.org/D72915
2020-01-13 04:15:57 +08:00
|
|
|
/// driven by DWARFLinker. DwarfLinkerForBinary reads DebugMap objects
|
|
|
|
/// and pass information to the DWARFLinker. DWARFLinker
|
|
|
|
/// optimizes DWARF taking into account valid relocations.
|
|
|
|
/// Finally, optimized DWARF is passed to DwarfLinkerForBinary through
|
|
|
|
/// DWARFEmitter interface.
|
2019-12-21 00:23:31 +08:00
|
|
|
class DwarfLinkerForBinary {
|
2018-06-28 00:13:40 +08:00
|
|
|
public:
|
2019-12-21 00:23:31 +08:00
|
|
|
DwarfLinkerForBinary(raw_fd_ostream &OutFile, BinaryHolder &BinHolder,
|
|
|
|
LinkOptions Options)
|
2019-07-31 03:34:26 +08:00
|
|
|
: OutFile(OutFile), BinHolder(BinHolder), Options(std::move(Options)) {}
|
2018-06-28 00:13:40 +08:00
|
|
|
|
|
|
|
/// Link the contents of the DebugMap.
|
|
|
|
bool link(const DebugMap &);
|
|
|
|
|
[Dsymutil][Debuginfo][NFC] #4 Refactor dsymutil to separate DWARF optimizing part.
Summary:
The primary goal of this refactoring is to separate DWARF optimizing part.
So that it could be reused by linker or by any other client.
There was a thread on llvm-dev discussing the necessity of such a refactoring:
http://lists.llvm.org/pipermail/llvm-dev/2019-September/135068.html.
This is a final part from series of patches for dsymutil.
Previous patches : D71068, D71839, D72476. This patch:
1. Creates lib/DWARFLinker interface :
void addObjectFile(DwarfLinkerObjFile &ObjFile);
bool link();
void setOptions;
1. Moves all linking logic from tools/dsymutil/DwarfLinkerForBinary
into lib/DWARFLinker.
2. Renames RelocationManager into AddressesManager.
3. Remarks creation logic moved from separate parallel execution
into object file loading routine.
Testing: it passes "check-all" lit testing. MD5 checksum for clang .dSYM bundle
matches for the dsymutil with/without that patch.
Reviewers: JDevlieghere, friss, dblaikie, aprantl, jdoerfert
Reviewed By: JDevlieghere
Subscribers: merge_guards_bot, hiraditya, jfb, llvm-commits, probinson, thegameg
Tags: #llvm, #debug-info
Differential Revision: https://reviews.llvm.org/D72915
2020-01-13 04:15:57 +08:00
|
|
|
void reportWarning(const Twine &Warning, StringRef Context,
|
2018-06-28 00:13:40 +08:00
|
|
|
const DWARFDie *DIE = nullptr) const;
|
|
|
|
|
2019-12-04 03:10:04 +08:00
|
|
|
/// Flags passed to DwarfLinker::lookForDIEsToKeep
|
|
|
|
enum TraversalFlags {
|
|
|
|
TF_Keep = 1 << 0, ///< Mark the traversed DIEs as kept.
|
|
|
|
TF_InFunctionScope = 1 << 1, ///< Current scope is a function scope.
|
|
|
|
TF_DependencyWalk = 1 << 2, ///< Walking the dependencies of a kept DIE.
|
|
|
|
TF_ParentWalk = 1 << 3, ///< Walking up the parents of a kept DIE.
|
|
|
|
TF_ODR = 1 << 4, ///< Use the ODR while keeping dependents.
|
|
|
|
TF_SkipPC = 1 << 5, ///< Skip all location attributes.
|
|
|
|
};
|
2019-12-21 00:23:31 +08:00
|
|
|
|
2018-06-28 00:13:40 +08:00
|
|
|
private:
|
|
|
|
|
|
|
|
/// Keeps track of relocations.
|
[Dsymutil][Debuginfo][NFC] #4 Refactor dsymutil to separate DWARF optimizing part.
Summary:
The primary goal of this refactoring is to separate DWARF optimizing part.
So that it could be reused by linker or by any other client.
There was a thread on llvm-dev discussing the necessity of such a refactoring:
http://lists.llvm.org/pipermail/llvm-dev/2019-September/135068.html.
This is a final part from series of patches for dsymutil.
Previous patches : D71068, D71839, D72476. This patch:
1. Creates lib/DWARFLinker interface :
void addObjectFile(DwarfLinkerObjFile &ObjFile);
bool link();
void setOptions;
1. Moves all linking logic from tools/dsymutil/DwarfLinkerForBinary
into lib/DWARFLinker.
2. Renames RelocationManager into AddressesManager.
3. Remarks creation logic moved from separate parallel execution
into object file loading routine.
Testing: it passes "check-all" lit testing. MD5 checksum for clang .dSYM bundle
matches for the dsymutil with/without that patch.
Reviewers: JDevlieghere, friss, dblaikie, aprantl, jdoerfert
Reviewed By: JDevlieghere
Subscribers: merge_guards_bot, hiraditya, jfb, llvm-commits, probinson, thegameg
Tags: #llvm, #debug-info
Differential Revision: https://reviews.llvm.org/D72915
2020-01-13 04:15:57 +08:00
|
|
|
class AddressManager : public AddressesMap {
|
2018-06-28 00:13:40 +08:00
|
|
|
struct ValidReloc {
|
2019-08-06 18:49:40 +08:00
|
|
|
uint64_t Offset;
|
2018-06-28 00:13:40 +08:00
|
|
|
uint32_t Size;
|
|
|
|
uint64_t Addend;
|
|
|
|
const DebugMapObject::DebugMapEntry *Mapping;
|
|
|
|
|
2019-08-06 18:49:40 +08:00
|
|
|
ValidReloc(uint64_t Offset, uint32_t Size, uint64_t Addend,
|
2018-06-28 00:13:40 +08:00
|
|
|
const DebugMapObject::DebugMapEntry *Mapping)
|
|
|
|
: Offset(Offset), Size(Size), Addend(Addend), Mapping(Mapping) {}
|
|
|
|
|
|
|
|
bool operator<(const ValidReloc &RHS) const {
|
|
|
|
return Offset < RHS.Offset;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2019-12-21 00:23:31 +08:00
|
|
|
const DwarfLinkerForBinary &Linker;
|
2018-06-28 00:13:40 +08:00
|
|
|
|
|
|
|
/// The valid relocations for the current DebugMapObject.
|
|
|
|
/// This vector is sorted by relocation offset.
|
|
|
|
std::vector<ValidReloc> ValidRelocs;
|
|
|
|
|
|
|
|
/// Index into ValidRelocs of the next relocation to consider. As we walk
|
|
|
|
/// the DIEs in acsending file offset and as ValidRelocs is sorted by file
|
|
|
|
/// offset, keeping this index up to date is all we have to do to have a
|
|
|
|
/// cheap lookup during the root DIE selection and during DIE cloning.
|
|
|
|
unsigned NextValidReloc = 0;
|
|
|
|
|
2019-12-21 00:23:31 +08:00
|
|
|
RangesTy AddressRanges;
|
|
|
|
|
2018-06-28 00:13:40 +08:00
|
|
|
public:
|
[Dsymutil][Debuginfo][NFC] #4 Refactor dsymutil to separate DWARF optimizing part.
Summary:
The primary goal of this refactoring is to separate DWARF optimizing part.
So that it could be reused by linker or by any other client.
There was a thread on llvm-dev discussing the necessity of such a refactoring:
http://lists.llvm.org/pipermail/llvm-dev/2019-September/135068.html.
This is a final part from series of patches for dsymutil.
Previous patches : D71068, D71839, D72476. This patch:
1. Creates lib/DWARFLinker interface :
void addObjectFile(DwarfLinkerObjFile &ObjFile);
bool link();
void setOptions;
1. Moves all linking logic from tools/dsymutil/DwarfLinkerForBinary
into lib/DWARFLinker.
2. Renames RelocationManager into AddressesManager.
3. Remarks creation logic moved from separate parallel execution
into object file loading routine.
Testing: it passes "check-all" lit testing. MD5 checksum for clang .dSYM bundle
matches for the dsymutil with/without that patch.
Reviewers: JDevlieghere, friss, dblaikie, aprantl, jdoerfert
Reviewed By: JDevlieghere
Subscribers: merge_guards_bot, hiraditya, jfb, llvm-commits, probinson, thegameg
Tags: #llvm, #debug-info
Differential Revision: https://reviews.llvm.org/D72915
2020-01-13 04:15:57 +08:00
|
|
|
AddressManager(DwarfLinkerForBinary &Linker, const object::ObjectFile &Obj,
|
|
|
|
const DebugMapObject &DMO)
|
2019-12-21 00:23:31 +08:00
|
|
|
: Linker(Linker) {
|
|
|
|
findValidRelocsInDebugInfo(Obj, DMO);
|
|
|
|
|
|
|
|
// Iterate over the debug map entries and put all the ones that are
|
|
|
|
// functions (because they have a size) into the Ranges map. This map is
|
|
|
|
// very similar to the FunctionRanges that are stored in each unit, with 2
|
|
|
|
// notable differences:
|
|
|
|
//
|
|
|
|
// 1. Obviously this one is global, while the other ones are per-unit.
|
|
|
|
//
|
|
|
|
// 2. This one contains not only the functions described in the DIE
|
|
|
|
// tree, but also the ones that are only in the debug map.
|
|
|
|
//
|
|
|
|
// The latter information is required to reproduce dsymutil's logic while
|
|
|
|
// linking line tables. The cases where this information matters look like
|
|
|
|
// bugs that need to be investigated, but for now we need to reproduce
|
|
|
|
// dsymutil's behavior.
|
|
|
|
// FIXME: Once we understood exactly if that information is needed,
|
|
|
|
// maybe totally remove this (or try to use it to do a real
|
|
|
|
// -gline-tables-only on Darwin.
|
|
|
|
for (const auto &Entry : DMO.symbols()) {
|
|
|
|
const auto &Mapping = Entry.getValue();
|
|
|
|
if (Mapping.Size && Mapping.ObjectAddress)
|
|
|
|
AddressRanges[*Mapping.ObjectAddress] = ObjFileAddressRange(
|
|
|
|
*Mapping.ObjectAddress + Mapping.Size,
|
|
|
|
int64_t(Mapping.BinaryAddress) - *Mapping.ObjectAddress);
|
|
|
|
}
|
|
|
|
}
|
[Dsymutil][Debuginfo][NFC] #4 Refactor dsymutil to separate DWARF optimizing part.
Summary:
The primary goal of this refactoring is to separate DWARF optimizing part.
So that it could be reused by linker or by any other client.
There was a thread on llvm-dev discussing the necessity of such a refactoring:
http://lists.llvm.org/pipermail/llvm-dev/2019-September/135068.html.
This is a final part from series of patches for dsymutil.
Previous patches : D71068, D71839, D72476. This patch:
1. Creates lib/DWARFLinker interface :
void addObjectFile(DwarfLinkerObjFile &ObjFile);
bool link();
void setOptions;
1. Moves all linking logic from tools/dsymutil/DwarfLinkerForBinary
into lib/DWARFLinker.
2. Renames RelocationManager into AddressesManager.
3. Remarks creation logic moved from separate parallel execution
into object file loading routine.
Testing: it passes "check-all" lit testing. MD5 checksum for clang .dSYM bundle
matches for the dsymutil with/without that patch.
Reviewers: JDevlieghere, friss, dblaikie, aprantl, jdoerfert
Reviewed By: JDevlieghere
Subscribers: merge_guards_bot, hiraditya, jfb, llvm-commits, probinson, thegameg
Tags: #llvm, #debug-info
Differential Revision: https://reviews.llvm.org/D72915
2020-01-13 04:15:57 +08:00
|
|
|
virtual ~AddressManager() override { clear(); }
|
2018-06-28 00:13:40 +08:00
|
|
|
|
2019-12-21 00:23:31 +08:00
|
|
|
virtual bool areRelocationsResolved() const override { return true; }
|
2018-06-28 00:13:40 +08:00
|
|
|
|
2019-12-21 00:23:31 +08:00
|
|
|
bool hasValidRelocs(bool ResetRelocsPtr = true) override {
|
|
|
|
if (ResetRelocsPtr)
|
|
|
|
NextValidReloc = 0;
|
|
|
|
return !ValidRelocs.empty();
|
|
|
|
}
|
2018-06-28 00:13:40 +08:00
|
|
|
|
|
|
|
/// \defgroup FindValidRelocations Translate debug map into a list
|
|
|
|
/// of relevant relocations
|
|
|
|
///
|
|
|
|
/// @{
|
|
|
|
bool findValidRelocsInDebugInfo(const object::ObjectFile &Obj,
|
|
|
|
const DebugMapObject &DMO);
|
|
|
|
|
|
|
|
bool findValidRelocs(const object::SectionRef &Section,
|
|
|
|
const object::ObjectFile &Obj,
|
|
|
|
const DebugMapObject &DMO);
|
|
|
|
|
|
|
|
void findValidRelocsMachO(const object::SectionRef &Section,
|
|
|
|
const object::MachOObjectFile &Obj,
|
|
|
|
const DebugMapObject &DMO);
|
|
|
|
/// @}
|
|
|
|
|
2019-12-21 00:23:31 +08:00
|
|
|
bool hasValidRelocationAt(uint64_t StartOffset, uint64_t EndOffset,
|
2020-09-16 02:12:10 +08:00
|
|
|
CompileUnit::DIEInfo &Info);
|
|
|
|
|
|
|
|
bool hasLiveMemoryLocation(const DWARFDie &DIE,
|
|
|
|
CompileUnit::DIEInfo &Info) override;
|
|
|
|
bool hasLiveAddressRange(const DWARFDie &DIE,
|
|
|
|
CompileUnit::DIEInfo &Info) override;
|
2018-06-28 00:13:40 +08:00
|
|
|
|
2019-08-06 18:49:40 +08:00
|
|
|
bool applyValidRelocs(MutableArrayRef<char> Data, uint64_t BaseOffset,
|
2019-12-21 00:23:31 +08:00
|
|
|
bool IsLittleEndian) override;
|
|
|
|
|
|
|
|
RangesTy &getValidAddressRanges() override { return AddressRanges; }
|
|
|
|
|
|
|
|
void clear() override {
|
|
|
|
AddressRanges.clear();
|
|
|
|
ValidRelocs.clear();
|
|
|
|
NextValidReloc = 0;
|
|
|
|
}
|
2018-06-28 00:13:40 +08:00
|
|
|
};
|
|
|
|
|
[Dsymutil][Debuginfo][NFC] #4 Refactor dsymutil to separate DWARF optimizing part.
Summary:
The primary goal of this refactoring is to separate DWARF optimizing part.
So that it could be reused by linker or by any other client.
There was a thread on llvm-dev discussing the necessity of such a refactoring:
http://lists.llvm.org/pipermail/llvm-dev/2019-September/135068.html.
This is a final part from series of patches for dsymutil.
Previous patches : D71068, D71839, D72476. This patch:
1. Creates lib/DWARFLinker interface :
void addObjectFile(DwarfLinkerObjFile &ObjFile);
bool link();
void setOptions;
1. Moves all linking logic from tools/dsymutil/DwarfLinkerForBinary
into lib/DWARFLinker.
2. Renames RelocationManager into AddressesManager.
3. Remarks creation logic moved from separate parallel execution
into object file loading routine.
Testing: it passes "check-all" lit testing. MD5 checksum for clang .dSYM bundle
matches for the dsymutil with/without that patch.
Reviewers: JDevlieghere, friss, dblaikie, aprantl, jdoerfert
Reviewed By: JDevlieghere
Subscribers: merge_guards_bot, hiraditya, jfb, llvm-commits, probinson, thegameg
Tags: #llvm, #debug-info
Differential Revision: https://reviews.llvm.org/D72915
2020-01-13 04:15:57 +08:00
|
|
|
private:
|
2018-06-28 00:13:40 +08:00
|
|
|
/// \defgroup Helpers Various helper methods.
|
|
|
|
///
|
|
|
|
/// @{
|
|
|
|
bool createStreamer(const Triple &TheTriple, raw_fd_ostream &OutFile);
|
|
|
|
|
|
|
|
/// Attempt to load a debug object from disk.
|
[dsymutil] Introduce a new CachedBinaryHolder
The original binary holder has an optimization where it caches a static
library (archive) between consecutive calls to GetObjects. However, the
actual memory buffer wasn't cached between calls.
This made sense when dsymutil was processing objects one after each
other, but when processing them in parallel, several binaries have to be
in memory at the same time. For this reason, every link context
contained a binary holder.
Having one binary holder per context is problematic, because the same
static archive was cached for every object file. Luckily, when the file
is mmap'ed, this was only costing us virtual memory.
This patch introduces a new BinaryHolder variant that is fully cached,
for all the object files it load, as well as the static archives. This
way, we don't have to give up on this optimization of bypassing the
file system.
Differential revision: https://reviews.llvm.org/D48501
llvm-svn: 335990
2018-06-30 00:50:41 +08:00
|
|
|
ErrorOr<const object::ObjectFile &> loadObject(const DebugMapObject &Obj,
|
[Dsymutil][Debuginfo][NFC] #4 Refactor dsymutil to separate DWARF optimizing part.
Summary:
The primary goal of this refactoring is to separate DWARF optimizing part.
So that it could be reused by linker or by any other client.
There was a thread on llvm-dev discussing the necessity of such a refactoring:
http://lists.llvm.org/pipermail/llvm-dev/2019-September/135068.html.
This is a final part from series of patches for dsymutil.
Previous patches : D71068, D71839, D72476. This patch:
1. Creates lib/DWARFLinker interface :
void addObjectFile(DwarfLinkerObjFile &ObjFile);
bool link();
void setOptions;
1. Moves all linking logic from tools/dsymutil/DwarfLinkerForBinary
into lib/DWARFLinker.
2. Renames RelocationManager into AddressesManager.
3. Remarks creation logic moved from separate parallel execution
into object file loading routine.
Testing: it passes "check-all" lit testing. MD5 checksum for clang .dSYM bundle
matches for the dsymutil with/without that patch.
Reviewers: JDevlieghere, friss, dblaikie, aprantl, jdoerfert
Reviewed By: JDevlieghere
Subscribers: merge_guards_bot, hiraditya, jfb, llvm-commits, probinson, thegameg
Tags: #llvm, #debug-info
Differential Revision: https://reviews.llvm.org/D72915
2020-01-13 04:15:57 +08:00
|
|
|
const Triple &triple);
|
2020-10-05 14:46:26 +08:00
|
|
|
ErrorOr<DWARFFile &> loadObject(const DebugMapObject &Obj,
|
2020-02-22 19:33:58 +08:00
|
|
|
const DebugMap &DebugMap,
|
|
|
|
remarks::RemarkLinker &RL);
|
2018-06-28 00:13:40 +08:00
|
|
|
|
|
|
|
raw_fd_ostream &OutFile;
|
2018-06-30 00:51:52 +08:00
|
|
|
BinaryHolder &BinHolder;
|
2018-06-28 00:13:40 +08:00
|
|
|
LinkOptions Options;
|
|
|
|
std::unique_ptr<DwarfStreamer> Streamer;
|
2020-10-05 14:46:26 +08:00
|
|
|
std::vector<std::unique_ptr<DWARFFile>> ObjectsForLinking;
|
2020-02-22 19:33:58 +08:00
|
|
|
std::vector<std::unique_ptr<DWARFContext>> ContextForLinking;
|
|
|
|
std::vector<std::unique_ptr<AddressManager>> AddressMapForLinking;
|
|
|
|
std::vector<std::string> EmptyWarnings;
|
2018-06-28 00:13:40 +08:00
|
|
|
|
2019-04-23 05:33:22 +08:00
|
|
|
/// A list of all .swiftinterface files referenced by the debug
|
|
|
|
/// info, mapping Module name to path on disk. The entries need to
|
|
|
|
/// be uniqued and sorted and there are only few entries expected
|
|
|
|
/// per compile unit, which is why this is a std::map.
|
|
|
|
std::map<std::string, std::string> ParseableSwiftInterfaces;
|
2019-07-31 03:34:26 +08:00
|
|
|
|
2018-06-28 00:13:40 +08:00
|
|
|
bool ModuleCacheHintDisplayed = false;
|
|
|
|
bool ArchiveHintDisplayed = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace dsymutil
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif // LLVM_TOOLS_DSYMUTIL_DWARFLINKER_H
|