summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object')
-rw-r--r--llvm/lib/Object/MachOObjectFile.cpp6
-rw-r--r--llvm/lib/Object/ObjectFile.cpp2
2 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp
index b943c4063d6..7b4be973a09 100644
--- a/llvm/lib/Object/MachOObjectFile.cpp
+++ b/llvm/lib/Object/MachOObjectFile.cpp
@@ -1928,6 +1928,12 @@ bool MachOObjectFile::isSectionBitcode(DataRefImpl Sec) const {
return false;
}
+bool MachOObjectFile::isSectionStripped(DataRefImpl Sec) const {
+ if (is64Bit())
+ return getSection64(Sec).offset == 0;
+ return getSection(Sec).offset == 0;
+}
+
relocation_iterator MachOObjectFile::section_rel_begin(DataRefImpl Sec) const {
DataRefImpl Ret;
Ret.d.a = Sec.d.a;
diff --git a/llvm/lib/Object/ObjectFile.cpp b/llvm/lib/Object/ObjectFile.cpp
index 67818409986..2b80d0bf538 100644
--- a/llvm/lib/Object/ObjectFile.cpp
+++ b/llvm/lib/Object/ObjectFile.cpp
@@ -75,6 +75,8 @@ bool ObjectFile::isSectionBitcode(DataRefImpl Sec) const {
return false;
}
+bool ObjectFile::isSectionStripped(DataRefImpl Sec) const { return false; }
+
section_iterator ObjectFile::getRelocatedSection(DataRefImpl Sec) const {
return section_iterator(SectionRef(Sec, this));
}
OpenPOWER on IntegriCloud