diff options
Diffstat (limited to 'llvm/lib/Object')
| -rw-r--r-- | llvm/lib/Object/COFFObjectFile.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Object/MachOObjectFile.cpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp index 29ea0a1a79c..717f019509b 100644 --- a/llvm/lib/Object/COFFObjectFile.cpp +++ b/llvm/lib/Object/COFFObjectFile.cpp @@ -979,6 +979,10 @@ COFFObjectFile::getRelocationValueString(DataRefImpl Rel, return object_error::success; } +bool COFFObjectFile::isRelocatableObject() const { + return !DataDirectory; +} + bool ImportDirectoryEntryRef:: operator==(const ImportDirectoryEntryRef &Other) const { return ImportTable == Other.ImportTable && Index == Other.Index; diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index 8e19eb5631d..afc729f9f82 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -1688,6 +1688,10 @@ void MachOObjectFile::ReadULEB128s(uint64_t Index, } } +bool MachOObjectFile::isRelocatableObject() const { + return getHeader().filetype == MachO::MH_OBJECT; +} + ErrorOr<std::unique_ptr<MachOObjectFile>> ObjectFile::createMachOObjectFile(std::unique_ptr<MemoryBuffer> &Buffer) { StringRef Magic = Buffer->getBuffer().slice(0, 4); |

