15
15
#include " bolt/Core/GDBIndex.h"
16
16
#include " llvm/ADT/StringRef.h"
17
17
#include " llvm/CodeGen/DIE.h"
18
- #include " llvm/DWP/DWP.h"
19
18
#include " llvm/MC/MCContext.h"
20
19
#include " llvm/Support/ToolOutputFile.h"
21
20
#include < cstdint>
@@ -41,13 +40,6 @@ class DWARFRewriter {
41
40
uint64_t TypeHash;
42
41
uint64_t TypeDIERelativeOffset;
43
42
};
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>;
51
43
52
44
private:
53
45
BinaryContext &BC;
@@ -194,35 +186,6 @@ class DWARFRewriter {
194
186
const std::string &, DebugLocWriter &,
195
187
DebugStrOffsetsWriter &, DebugStrWriter &);
196
188
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 &);
226
189
};
227
190
228
191
} // namespace bolt
0 commit comments