@@ -170,43 +170,29 @@ class MCEncodedFragment : public MCFragment {
170
170
}
171
171
};
172
172
173
- // / Interface implemented by fragments that contain encoded instructions and/or
174
- // / data.
175
- // /
176
- template <unsigned ContentsSize>
177
- class MCEncodedFragmentWithContents : public MCEncodedFragment {
178
- SmallVector<char , ContentsSize> Contents;
179
-
180
- protected:
181
- MCEncodedFragmentWithContents (MCFragment::FragmentType FType,
182
- bool HasInstructions)
183
- : MCEncodedFragment(FType, HasInstructions) {}
184
-
185
- public:
186
- SmallVectorImpl<char > &getContents () { return Contents; }
187
- const SmallVectorImpl<char > &getContents () const { return Contents; }
188
- };
189
-
190
173
// / Interface implemented by fragments that contain encoded instructions and/or
191
174
// / data and also have fixups registered.
192
175
// /
193
- template <unsigned ContentsSize, unsigned FixupsSize>
194
- class MCEncodedFragmentWithFixups :
195
- public MCEncodedFragmentWithContents< ContentsSize> {
176
+ template <unsigned ContentsSize, unsigned FixupsSize>
177
+ class MCEncodedFragmentWithFixups : public MCEncodedFragment {
178
+ SmallVector< char , ContentsSize> Contents;
196
179
197
180
// / The list of fixups in this fragment.
198
181
SmallVector<MCFixup, FixupsSize> Fixups;
199
182
200
183
protected:
201
184
MCEncodedFragmentWithFixups (MCFragment::FragmentType FType,
202
185
bool HasInstructions)
203
- : MCEncodedFragmentWithContents<ContentsSize> (FType, HasInstructions) {}
186
+ : MCEncodedFragment (FType, HasInstructions) {}
204
187
205
188
public:
206
189
207
190
using const_fixup_iterator = SmallVectorImpl<MCFixup>::const_iterator;
208
191
using fixup_iterator = SmallVectorImpl<MCFixup>::iterator;
209
192
193
+ SmallVectorImpl<char > &getContents () { return Contents; }
194
+ const SmallVectorImpl<char > &getContents () const { return Contents; }
195
+
210
196
SmallVectorImpl<MCFixup> &getFixups () { return Fixups; }
211
197
const SmallVectorImpl<MCFixup> &getFixups () const { return Fixups; }
212
198
0 commit comments