@@ -170,43 +170,29 @@ class MCEncodedFragment : public MCFragment {
170170 }
171171};
172172
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-
190173// / Interface implemented by fragments that contain encoded instructions and/or
191174// / data and also have fixups registered.
192175// /
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;
196179
197180 // / The list of fixups in this fragment.
198181 SmallVector<MCFixup, FixupsSize> Fixups;
199182
200183protected:
201184 MCEncodedFragmentWithFixups (MCFragment::FragmentType FType,
202185 bool HasInstructions)
203- : MCEncodedFragmentWithContents<ContentsSize> (FType, HasInstructions) {}
186+ : MCEncodedFragment (FType, HasInstructions) {}
204187
205188public:
206189
207190 using const_fixup_iterator = SmallVectorImpl<MCFixup>::const_iterator;
208191 using fixup_iterator = SmallVectorImpl<MCFixup>::iterator;
209192
193+ SmallVectorImpl<char > &getContents () { return Contents; }
194+ const SmallVectorImpl<char > &getContents () const { return Contents; }
195+
210196 SmallVectorImpl<MCFixup> &getFixups () { return Fixups; }
211197 const SmallVectorImpl<MCFixup> &getFixups () const { return Fixups; }
212198
0 commit comments