Skip to content

Commit 79dcd93

Browse files
authored
[BOLT][DWARF] Remove option to write to DWP (#100771)
Remove the --write-dwp option as well as related code and tests.
1 parent 546e4a2 commit 79dcd93

10 files changed

+18
-529
lines changed

bolt/include/bolt/Rewrite/DWARFRewriter.h

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "bolt/Core/GDBIndex.h"
1616
#include "llvm/ADT/StringRef.h"
1717
#include "llvm/CodeGen/DIE.h"
18-
#include "llvm/DWP/DWP.h"
1918
#include "llvm/MC/MCContext.h"
2019
#include "llvm/Support/ToolOutputFile.h"
2120
#include <cstdint>
@@ -41,13 +40,6 @@ class DWARFRewriter {
4140
uint64_t TypeHash;
4241
uint64_t TypeDIERelativeOffset;
4342
};
44-
/// Contains information for CU or TU so we can output correct {cu, tu}-index.
45-
struct UnitMeta {
46-
uint64_t Offset;
47-
uint64_t Length;
48-
uint64_t TUHash;
49-
};
50-
using UnitMetaVectorType = std::vector<UnitMeta>;
5143

5244
private:
5345
BinaryContext &BC;
@@ -194,35 +186,6 @@ class DWARFRewriter {
194186
const std::string &, DebugLocWriter &,
195187
DebugStrOffsetsWriter &, DebugStrWriter &);
196188
using KnownSectionsEntry = std::pair<MCSection *, DWARFSectionKind>;
197-
struct DWPState {
198-
std::unique_ptr<ToolOutputFile> Out;
199-
std::unique_ptr<BinaryContext> TmpBC;
200-
std::unique_ptr<MCStreamer> Streamer;
201-
std::unique_ptr<DWPStringPool> Strings;
202-
/// Used to store String sections for .dwo files if they are being modified.
203-
std::vector<std::unique_ptr<DebugBufferVector>> StrSections;
204-
const MCObjectFileInfo *MCOFI = nullptr;
205-
const DWARFUnitIndex *CUIndex = nullptr;
206-
std::deque<SmallString<32>> UncompressedSections;
207-
MapVector<uint64_t, UnitIndexEntry> IndexEntries;
208-
MapVector<uint64_t, UnitIndexEntry> TypeIndexEntries;
209-
StringMap<KnownSectionsEntry> KnownSections;
210-
uint32_t ContributionOffsets[8] = {};
211-
uint32_t IndexVersion = 2;
212-
uint64_t DebugInfoSize = 0;
213-
uint16_t Version = 0;
214-
bool IsDWP = false;
215-
};
216-
/// Init .dwp file
217-
void initDWPState(DWPState &);
218-
219-
/// Write out .dwp File
220-
void finalizeDWP(DWPState &);
221-
222-
/// add content of dwo to .dwp file.
223-
void updateDWP(DWARFUnit &, const OverriddenSectionsMap &, const UnitMeta &,
224-
UnitMetaVectorType &, DWPState &, DebugLocWriter &,
225-
DebugStrOffsetsWriter &, DebugStrWriter &);
226189
};
227190

228191
} // namespace bolt

bolt/lib/Rewrite/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
set(LLVM_LINK_COMPONENTS
22
Core
33
DebugInfoDWARF
4-
DWP
54
JITLink
65
MC
76
Object

0 commit comments

Comments
 (0)