mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Object: Implement casting for concrete classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142314 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -141,6 +141,12 @@ public:
|
|||||||
virtual uint8_t getBytesInAddress() const;
|
virtual uint8_t getBytesInAddress() const;
|
||||||
virtual StringRef getFileFormatName() const;
|
virtual StringRef getFileFormatName() const;
|
||||||
virtual unsigned getArch() const;
|
virtual unsigned getArch() const;
|
||||||
|
|
||||||
|
|
||||||
|
static inline bool classof(const Binary *v) {
|
||||||
|
return v->getType() == isCOFF;
|
||||||
|
}
|
||||||
|
static inline bool classof(const COFFObjectFile *v) { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,11 @@ public:
|
|||||||
|
|
||||||
MachOObject *getObject() { return MachOObj; }
|
MachOObject *getObject() { return MachOObj; }
|
||||||
|
|
||||||
|
static inline bool classof(const Binary *v) {
|
||||||
|
return v->getType() == isMachO;
|
||||||
|
}
|
||||||
|
static inline bool classof(const MachOObjectFile *v) { return true; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual error_code getSymbolNext(DataRefImpl Symb, SymbolRef &Res) const;
|
virtual error_code getSymbolNext(DataRefImpl Symb, SymbolRef &Res) const;
|
||||||
virtual error_code getSymbolName(DataRefImpl Symb, StringRef &Res) const;
|
virtual error_code getSymbolName(DataRefImpl Symb, StringRef &Res) const;
|
||||||
|
@ -377,6 +377,11 @@ public:
|
|||||||
uint64_t getStringTableIndex() const;
|
uint64_t getStringTableIndex() const;
|
||||||
ELF::Elf64_Word getSymbolTableIndex(const Elf_Sym *symb) const;
|
ELF::Elf64_Word getSymbolTableIndex(const Elf_Sym *symb) const;
|
||||||
const Elf_Shdr *getSection(const Elf_Sym *symb) const;
|
const Elf_Shdr *getSection(const Elf_Sym *symb) const;
|
||||||
|
|
||||||
|
static inline bool classof(const Binary *v) {
|
||||||
|
return v->getType() == isELF;
|
||||||
|
}
|
||||||
|
static inline bool classof(const ELFObjectFile *v) { return true; }
|
||||||
};
|
};
|
||||||
} // end namespace
|
} // end namespace
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user