summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/Atoms.h
diff options
context:
space:
mode:
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/Atoms.h')
-rw-r--r--lld/lib/ReaderWriter/MachO/Atoms.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/lld/lib/ReaderWriter/MachO/Atoms.h b/lld/lib/ReaderWriter/MachO/Atoms.h
index 3d073904ab8..9db091ea315 100644
--- a/lld/lib/ReaderWriter/MachO/Atoms.h
+++ b/lld/lib/ReaderWriter/MachO/Atoms.h
@@ -49,11 +49,17 @@ public:
}
ArrayRef<uint8_t> rawContent() const override {
- // Zerofill atoms have a content pointer which is null.
- assert(_content.data() != nullptr);
+ // Note: Zerofill atoms have a content pointer which is null.
return _content;
}
+ void addReference(uint32_t offsetInAtom, uint16_t relocType,
+ const Atom *target, Reference::Addend addend,
+ Reference::KindArch arch = Reference::KindArch::x86_64,
+ Reference::KindNamespace ns = Reference::KindNamespace::mach_o) {
+ SimpleDefinedAtom::addReference(ns, arch, relocType, offsetInAtom, target, addend);
+ }
+
private:
const StringRef _name;
const ArrayRef<uint8_t> _content;
OpenPOWER on IntegriCloud