13
13
#include " llvm/ADT/ArrayRef.h"
14
14
#include " llvm/ADT/iterator.h"
15
15
#include " llvm/ADT/SmallString.h"
16
- #include " llvm/ADT/Triple.h"
17
16
#include " llvm/DebugInfo/DWARF/DWARFDataExtractor.h"
18
17
#include " llvm/DebugInfo/DWARF/DWARFExpression.h"
19
18
#include " llvm/Support/Error.h"
@@ -60,11 +59,9 @@ class CFIProgram {
60
59
unsigned size () const { return (unsigned )Instructions.size (); }
61
60
bool empty () const { return Instructions.empty (); }
62
61
63
- CFIProgram (uint64_t CodeAlignmentFactor, int64_t DataAlignmentFactor,
64
- Triple::ArchType Arch)
62
+ CFIProgram (uint64_t CodeAlignmentFactor, int64_t DataAlignmentFactor)
65
63
: CodeAlignmentFactor(CodeAlignmentFactor),
66
- DataAlignmentFactor (DataAlignmentFactor),
67
- Arch(Arch) {}
64
+ DataAlignmentFactor (DataAlignmentFactor) {}
68
65
69
66
// / Parse and store a sequence of CFI instructions from Data,
70
67
// / starting at *Offset and ending at EndOffset. *Offset is updated
@@ -79,7 +76,6 @@ class CFIProgram {
79
76
std::vector<Instruction> Instructions;
80
77
const uint64_t CodeAlignmentFactor;
81
78
const int64_t DataAlignmentFactor;
82
- Triple::ArchType Arch;
83
79
84
80
// / Convenience method to add a new instruction with the given opcode.
85
81
void addInstruction (uint8_t Opcode) {
@@ -134,9 +130,8 @@ class FrameEntry {
134
130
enum FrameKind { FK_CIE, FK_FDE };
135
131
136
132
FrameEntry (FrameKind K, uint64_t Offset, uint64_t Length, uint64_t CodeAlign,
137
- int64_t DataAlign, Triple::ArchType Arch)
138
- : Kind(K), Offset(Offset), Length(Length),
139
- CFIs (CodeAlign, DataAlign, Arch) {}
133
+ int64_t DataAlign)
134
+ : Kind(K), Offset(Offset), Length(Length), CFIs(CodeAlign, DataAlign) {}
140
135
141
136
virtual ~FrameEntry () {}
142
137
@@ -173,9 +168,9 @@ class CIE : public FrameEntry {
173
168
int64_t DataAlignmentFactor, uint64_t ReturnAddressRegister,
174
169
SmallString<8 > AugmentationData, uint32_t FDEPointerEncoding,
175
170
uint32_t LSDAPointerEncoding, Optional<uint64_t > Personality,
176
- Optional<uint32_t > PersonalityEnc, Triple::ArchType Arch )
171
+ Optional<uint32_t > PersonalityEnc)
177
172
: FrameEntry(FK_CIE, Offset, Length, CodeAlignmentFactor,
178
- DataAlignmentFactor, Arch ),
173
+ DataAlignmentFactor),
179
174
Version (Version), Augmentation(std::move(Augmentation)),
180
175
AddressSize(AddressSize), SegmentDescriptorSize(SegmentDescriptorSize),
181
176
CodeAlignmentFactor(CodeAlignmentFactor),
@@ -229,11 +224,10 @@ class FDE : public FrameEntry {
229
224
// is obtained lazily once it's actually required.
230
225
FDE (uint64_t Offset, uint64_t Length, int64_t LinkedCIEOffset,
231
226
uint64_t InitialLocation, uint64_t AddressRange, CIE *Cie,
232
- Optional<uint64_t > LSDAAddress, Triple::ArchType Arch )
227
+ Optional<uint64_t > LSDAAddress)
233
228
: FrameEntry(FK_FDE, Offset, Length,
234
229
Cie ? Cie->getCodeAlignmentFactor () : 0,
235
- Cie ? Cie->getDataAlignmentFactor() : 0,
236
- Arch),
230
+ Cie ? Cie->getDataAlignmentFactor() : 0),
237
231
LinkedCIEOffset(LinkedCIEOffset), InitialLocation(InitialLocation),
238
232
AddressRange(AddressRange), LinkedCIE(Cie), LSDAAddress(LSDAAddress) {}
239
233
@@ -262,7 +256,6 @@ class FDE : public FrameEntry {
262
256
263
257
// / A parsed .debug_frame or .eh_frame section
264
258
class DWARFDebugFrame {
265
- const Triple::ArchType Arch;
266
259
// True if this is parsing an eh_frame section.
267
260
const bool IsEH;
268
261
// Not zero for sane pointer values coming out of eh_frame
@@ -279,8 +272,7 @@ class DWARFDebugFrame {
279
272
// it is a .debug_frame section. EHFrameAddress should be different
280
273
// than zero for correct parsing of .eh_frame addresses when they
281
274
// use a PC-relative encoding.
282
- DWARFDebugFrame (Triple::ArchType Arch,
283
- bool IsEH = false , uint64_t EHFrameAddress = 0 );
275
+ DWARFDebugFrame (bool IsEH = false , uint64_t EHFrameAddress = 0 );
284
276
~DWARFDebugFrame ();
285
277
286
278
// / Dump the section data into the given stream.
0 commit comments