mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
Make getObject const. Remove a const_cast.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178980 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
196abbffe9
commit
305b826f92
@ -155,7 +155,7 @@ public:
|
||||
const MachOFormat::LinkeditDataLoadCommand *
|
||||
getLinkeditDataLoadCommand(LoadCommandInfo LCI) const;
|
||||
|
||||
MachOObject *getObject() { return MachOObj.get(); }
|
||||
const MachOObject *getObject() const { return MachOObj.get(); }
|
||||
|
||||
static inline bool classof(const Binary *v) {
|
||||
return v->isMachO();
|
||||
|
@ -108,7 +108,7 @@ struct SymbolSorter {
|
||||
|
||||
// Print additional information about an address, if available.
|
||||
static void DumpAddress(uint64_t Address, ArrayRef<SectionRef> Sections,
|
||||
MachOObject *MachOObj, raw_ostream &OS) {
|
||||
const MachOObject *MachOObj, raw_ostream &OS) {
|
||||
for (unsigned i = 0; i != Sections.size(); ++i) {
|
||||
uint64_t SectAddr = 0, SectSize = 0;
|
||||
Sections[i].getAddress(SectAddr);
|
||||
@ -241,7 +241,7 @@ void llvm::DisassembleInputMachO(StringRef Filename) {
|
||||
|
||||
OwningPtr<MachOObjectFile> MachOOF(static_cast<MachOObjectFile*>(
|
||||
ObjectFile::createMachOObjectFile(Buff.take())));
|
||||
MachOObject *MachOObj = MachOOF->getObject();
|
||||
const MachOObject *MachOObj = MachOOF->getObject();
|
||||
|
||||
const Target *TheTarget = GetTarget(MachOObj);
|
||||
if (!TheTarget) {
|
||||
|
@ -254,7 +254,7 @@ void MachODumper::printSections() {
|
||||
|
||||
++SectionIndex;
|
||||
|
||||
const MachOObject *MachO = const_cast<MachOObjectFile*>(Obj)->getObject();
|
||||
const MachOObject *MachO = Obj->getObject();
|
||||
|
||||
MachOSection Section;
|
||||
getSection(MachO, SecI->getRawDataRefImpl(), Section);
|
||||
|
Loading…
Reference in New Issue
Block a user