mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-26 07:29:55 +00:00
edis: Save the TargetMachine in the EDDisassembler object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108663 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
754b9c9c27
commit
0261243f6e
@ -175,11 +175,10 @@ EDDisassembler::EDDisassembler(CPUKey &key) :
|
||||
|
||||
std::string featureString;
|
||||
|
||||
OwningPtr<const TargetMachine>
|
||||
targetMachine(Tgt->createTargetMachine(tripleString,
|
||||
TargetMachine.reset(Tgt->createTargetMachine(tripleString,
|
||||
featureString));
|
||||
|
||||
const TargetRegisterInfo *registerInfo = targetMachine->getRegisterInfo();
|
||||
const TargetRegisterInfo *registerInfo = TargetMachine->getRegisterInfo();
|
||||
|
||||
if (!registerInfo)
|
||||
return;
|
||||
@ -209,7 +208,7 @@ EDDisassembler::EDDisassembler(CPUKey &key) :
|
||||
SpecificAsmLexer.reset(Tgt->createAsmLexer(*AsmInfo));
|
||||
SpecificAsmLexer->InstallLexer(*GenericAsmLexer);
|
||||
|
||||
initMaps(*targetMachine->getRegisterInfo());
|
||||
initMaps(*TargetMachine->getRegisterInfo());
|
||||
|
||||
Valid = true;
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ class MCStreamer;
|
||||
template <typename T> class SmallVectorImpl;
|
||||
class SourceMgr;
|
||||
class Target;
|
||||
class TargetMachine;
|
||||
class TargetRegisterInfo;
|
||||
|
||||
struct EDInstInfo;
|
||||
@ -127,6 +128,8 @@ struct EDDisassembler {
|
||||
CPUKey Key;
|
||||
/// The LLVM target corresponding to the disassembler
|
||||
const llvm::Target *Tgt;
|
||||
/// The target machien instance.
|
||||
llvm::OwningPtr<llvm::TargetMachine> TargetMachine;
|
||||
/// The assembly information for the target architecture
|
||||
llvm::OwningPtr<const llvm::MCAsmInfo> AsmInfo;
|
||||
/// The disassembler for the target architecture
|
||||
|
Loading…
Reference in New Issue
Block a user