aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Object/MachO.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Object/MachO.h')
-rw-r--r--include/llvm/Object/MachO.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/include/llvm/Object/MachO.h b/include/llvm/Object/MachO.h
index 9bd591a540..8b3539a3e1 100644
--- a/include/llvm/Object/MachO.h
+++ b/include/llvm/Object/MachO.h
@@ -77,6 +77,11 @@ namespace MachOFormat {
support::ulittle64_t Value;
};
+ struct LoadCommand {
+ support::ulittle32_t Type;
+ support::ulittle32_t Size;
+ };
+
struct SymtabLoadCommand {
support::ulittle32_t Type;
support::ulittle32_t Size;
@@ -122,10 +127,16 @@ namespace MachOFormat {
};
}
-typedef MachOObject::LoadCommandInfo LoadCommandInfo;
-
class MachOObjectFile : public ObjectFile {
public:
+ struct LoadCommandInfo {
+ /// The load command information.
+ const MachOFormat::LoadCommand *Command;
+
+ /// The offset to the start of the load command in memory.
+ uint64_t Offset;
+ };
+
MachOObjectFile(MemoryBuffer *Object, error_code &ec);
virtual symbol_iterator begin_symbols() const;
@@ -161,7 +172,7 @@ public:
const MachOFormat::SymbolTableEntry *
getSymbolTableEntry(DataRefImpl DRI) const;
bool is64Bit() const;
- const LoadCommandInfo &getLoadCommandInfo(unsigned Index) const;
+ LoadCommandInfo getLoadCommandInfo(unsigned Index) const;
void ReadULEB128s(uint64_t Index, SmallVectorImpl<uint64_t> &Out) const;
const macho::Header &getHeader() const;