+ /// @name Fixup Access
+ /// @{
+
+ /// LookupFixup - Look up the fixup for the given \arg Fragment and \arg
+ /// Offset.
+ ///
+ /// If multiple fixups exist for the same fragment and offset it is undefined
+ /// which one is returned.
+ //
+ // FIXME: This isn't horribly slow in practice, but there are much nicer
+ // solutions to applying the fixups. This will be fixed by sinking fixups into
+ // data fragments exclusively.
+ const MCAsmFixup *LookupFixup(uint64_t Offset) const {
+ for (unsigned i = 0, e = Fixups.size(); i != e; ++i)
+ if (Fixups[i].Offset == Offset)
+ return &Fixups[i];
+ return 0;
+ }
+
+ std::vector<MCAsmFixup> &getFixups() {
+ return Fixups;
+ }
+
+ fixup_iterator fixup_begin() {
+ return Fixups.begin();
+ }
+
+ fixup_iterator fixup_end() {
+ return Fixups.end();
+ }
+
+ size_t fixup_size() const { return Fixups.size(); }
+