mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Follow up of the introduction of MCSymbolizer.
- Ressurect old MCDisassemble API to soften transition. - Extend MCTargetDesc to set target specific symbolizer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182688 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
#include "llvm/MC/MCRegisterInfo.h"
|
||||
#include "llvm/MC/MCRelocationInfo.h"
|
||||
#include "llvm/MC/MCSubtargetInfo.h"
|
||||
#include "llvm/MC/MCSymbolizer.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/MemoryObject.h"
|
||||
#include "llvm/Support/TargetRegistry.h"
|
||||
@ -80,9 +81,12 @@ LLVMDisasmContextRef LLVMCreateDisasmCPU(const char *Triple, const char *CPU,
|
||||
if (!RelInfo)
|
||||
return 0;
|
||||
|
||||
OwningPtr<MCSymbolizer> Symbolizer(
|
||||
TheTarget->createMCSymbolizer(Triple, GetOpInfo, SymbolLookUp, DisInfo,
|
||||
Ctx, RelInfo.take()));
|
||||
DisAsm->setSymbolizer(Symbolizer);
|
||||
DisAsm->setupForSymbolicDisassembly(GetOpInfo, SymbolLookUp, DisInfo,
|
||||
Ctx, RelInfo);
|
||||
|
||||
// Set up the instruction printer.
|
||||
int AsmPrinterVariant = MAI->getAssemblerDialect();
|
||||
MCInstPrinter *IP = TheTarget->createMCInstPrinter(AsmPrinterVariant,
|
||||
|
Reference in New Issue
Block a user