Skip to content

Commit c193124

Browse files
committed
[MC] Remove fixup_begin/fixup_end
1 parent 47bdbb3 commit c193124

File tree

3 files changed

+3
-17
lines changed

3 files changed

+3
-17
lines changed

llvm/include/llvm/MC/MCFragment.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,6 @@ class MCEncodedFragmentWithFixups : public MCEncodedFragment {
190190
: MCEncodedFragment(FType, HasInstructions) {}
191191

192192
public:
193-
194-
using const_fixup_iterator = SmallVectorImpl<MCFixup>::const_iterator;
195-
using fixup_iterator = SmallVectorImpl<MCFixup>::iterator;
196-
197193
SmallVectorImpl<char> &getContents() { return Contents; }
198194
const SmallVectorImpl<char> &getContents() const { return Contents; }
199195

@@ -204,12 +200,6 @@ class MCEncodedFragmentWithFixups : public MCEncodedFragment {
204200
SmallVectorImpl<MCFixup> &getFixups() { return Fixups; }
205201
const SmallVectorImpl<MCFixup> &getFixups() const { return Fixups; }
206202

207-
fixup_iterator fixup_begin() { return Fixups.begin(); }
208-
const_fixup_iterator fixup_begin() const { return Fixups.begin(); }
209-
210-
fixup_iterator fixup_end() { return Fixups.end(); }
211-
const_fixup_iterator fixup_end() const { return Fixups.end(); }
212-
213203
static bool classof(const MCFragment *F) {
214204
MCFragment::FragmentType Kind = F->getKind();
215205
return Kind == MCFragment::FT_Relaxable || Kind == MCFragment::FT_Data ||

llvm/lib/MC/MCAssembler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ void MCAssembler::writeSectionData(raw_ostream &OS,
829829
// into a virtual section. This is to support clients which use standard
830830
// directives to fill the contents of virtual sections.
831831
const MCDataFragment &DF = cast<MCDataFragment>(F);
832-
if (DF.fixup_begin() != DF.fixup_end())
832+
if (DF.getFixups().size())
833833
getContext().reportError(SMLoc(), Sec->getVirtualSectionKind() +
834834
" section '" + Sec->getName() +
835835
"' cannot have fixups");

llvm/lib/MC/MCFragment.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,14 +150,10 @@ LLVM_DUMP_METHOD void MCFragment::dump() const {
150150
}
151151
OS << "] (" << Contents.size() << " bytes)";
152152

153-
if (DF->fixup_begin() != DF->fixup_end()) {
153+
if (DF->getFixups().size()) {
154154
OS << ",\n ";
155155
OS << " Fixups:[";
156-
for (MCDataFragment::const_fixup_iterator it = DF->fixup_begin(),
157-
ie = DF->fixup_end(); it != ie; ++it) {
158-
if (it != DF->fixup_begin()) OS << ",\n ";
159-
OS << *it;
160-
}
156+
interleave(DF->getFixups(), OS, ",\n ");
161157
OS << "]";
162158
}
163159
break;

0 commit comments

Comments
 (0)