[llvm-commits] [llvm] r108663 - in /llvm/trunk/tools/edis: EDDisassembler.cpp EDDisassembler.h
Daniel Dunbar
daniel at zuster.org
Sun Jul 18 17:33:43 PDT 2010
Author: ddunbar
Date: Sun Jul 18 19:33:43 2010
New Revision: 108663
URL: http://llvm.org/viewvc/llvm-project?rev=108663&view=rev
Log:
edis: Save the TargetMachine in the EDDisassembler object.
Modified:
llvm/trunk/tools/edis/EDDisassembler.cpp
llvm/trunk/tools/edis/EDDisassembler.h
Modified: llvm/trunk/tools/edis/EDDisassembler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDDisassembler.cpp?rev=108663&r1=108662&r2=108663&view=diff
==============================================================================
--- llvm/trunk/tools/edis/EDDisassembler.cpp (original)
+++ llvm/trunk/tools/edis/EDDisassembler.cpp Sun Jul 18 19:33:43 2010
@@ -175,11 +175,10 @@
std::string featureString;
- OwningPtr<const TargetMachine>
- targetMachine(Tgt->createTargetMachine(tripleString,
- featureString));
+ TargetMachine.reset(Tgt->createTargetMachine(tripleString,
+ featureString));
- const TargetRegisterInfo *registerInfo = targetMachine->getRegisterInfo();
+ const TargetRegisterInfo *registerInfo = TargetMachine->getRegisterInfo();
if (!registerInfo)
return;
@@ -209,7 +208,7 @@
SpecificAsmLexer.reset(Tgt->createAsmLexer(*AsmInfo));
SpecificAsmLexer->InstallLexer(*GenericAsmLexer);
- initMaps(*targetMachine->getRegisterInfo());
+ initMaps(*TargetMachine->getRegisterInfo());
Valid = true;
}
Modified: llvm/trunk/tools/edis/EDDisassembler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/edis/EDDisassembler.h?rev=108663&r1=108662&r2=108663&view=diff
==============================================================================
--- llvm/trunk/tools/edis/EDDisassembler.h (original)
+++ llvm/trunk/tools/edis/EDDisassembler.h Sun Jul 18 19:33:43 2010
@@ -47,6 +47,7 @@
template <typename T> class SmallVectorImpl;
class SourceMgr;
class Target;
+class TargetMachine;
class TargetRegisterInfo;
struct EDInstInfo;
@@ -127,6 +128,8 @@
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
More information about the llvm-commits
mailing list