mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Convert MachOObjectFile to a template.
For now it is templated only on being 64 or 32 bits. I will add little/big endian next. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179097 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -255,7 +255,7 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
|
||||
std::sort(Rels.begin(), Rels.end(), RelocAddressLess);
|
||||
|
||||
StringRef SegmentName = "";
|
||||
if (const MachOObjectFile *MachO = dyn_cast<const MachOObjectFile>(Obj)) {
|
||||
if (const MachOObjectFileBase *MachO = dyn_cast<const MachOObjectFileBase>(Obj)) {
|
||||
DataRefImpl DR = i->getRawDataRefImpl();
|
||||
SegmentName = MachO->getSectionFinalSegmentName(DR);
|
||||
}
|
||||
@ -591,7 +591,7 @@ static void PrintSymbolTable(const ObjectFile *o) {
|
||||
else if (Section == o->end_sections())
|
||||
outs() << "*UND*";
|
||||
else {
|
||||
if (const MachOObjectFile *MachO = dyn_cast<const MachOObjectFile>(o)) {
|
||||
if (const MachOObjectFileBase *MachO = dyn_cast<const MachOObjectFileBase>(o)) {
|
||||
DataRefImpl DR = Section->getRawDataRefImpl();
|
||||
StringRef SegmentName = MachO->getSectionFinalSegmentName(DR);
|
||||
outs() << SegmentName << ",";
|
||||
|
Reference in New Issue
Block a user