[Hexagon] Removing static variable holding MCInstrInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229872 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Colin LeMahieu 2015-02-19 17:38:39 +00:00
parent c69bd70cd1
commit 5a71687970
4 changed files with 7 additions and 8 deletions

View File

@ -17,10 +17,9 @@
using namespace llvm;
std::unique_ptr <MCInstrInfo const> HexagonMCInst::MCII;
HexagonMCInst::HexagonMCInst() : MCInst() {}
HexagonMCInst::HexagonMCInst(MCInstrDesc const &mcid) : MCInst() {}
HexagonMCInst::HexagonMCInst() : MCII (createHexagonMCInstrInfo ()) {}
HexagonMCInst::HexagonMCInst(MCInstrDesc const &mcid) :
MCII (createHexagonMCInstrInfo ()){}
void HexagonMCInst::AppendImplicitOperands(MCInst &MCI) {
MCI.addOperand(MCOperand::CreateImm(0));

View File

@ -23,9 +23,8 @@ namespace llvm {
class MCOperand;
class HexagonMCInst : public MCInst {
friend void ::LLVMInitializeHexagonTargetMC();
// Used to access TSFlags
static std::unique_ptr <MCInstrInfo const> MCII;
std::unique_ptr <MCInstrInfo const> MCII;
public:
explicit HexagonMCInst();

View File

@ -36,7 +36,7 @@ using namespace llvm;
#define GET_REGINFO_MC_DESC
#include "HexagonGenRegisterInfo.inc"
static MCInstrInfo *createHexagonMCInstrInfo() {
MCInstrInfo *llvm::createHexagonMCInstrInfo() {
MCInstrInfo *X = new MCInstrInfo();
InitHexagonMCInstrInfo(X);
return X;
@ -116,7 +116,6 @@ extern "C" void LLVMInitializeHexagonTargetMC() {
// Register the MC instruction info.
TargetRegistry::RegisterMCInstrInfo(TheHexagonTarget,
createHexagonMCInstrInfo);
HexagonMCInst::MCII.reset (createHexagonMCInstrInfo());
// Register the MC register info.
TargetRegistry::RegisterMCRegInfo(TheHexagonTarget,

View File

@ -30,6 +30,8 @@ class raw_ostream;
extern Target TheHexagonTarget;
MCInstrInfo *createHexagonMCInstrInfo();
MCCodeEmitter *createHexagonMCCodeEmitter(MCInstrInfo const &MCII,
MCRegisterInfo const &MRI,
MCSubtargetInfo const &MST,