Stop leaking register infos in the disassemblers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187695 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2013-08-03 22:16:16 +00:00
parent 5cad12d12a
commit bc2160f7c9
2 changed files with 4 additions and 4 deletions

View File

@ -39,10 +39,10 @@ public:
virtual ~MipsDisassemblerBase() {}
const MCRegisterInfo *getRegInfo() const { return RegInfo; }
const MCRegisterInfo *getRegInfo() const { return RegInfo.get(); }
private:
const MCRegisterInfo *RegInfo;
OwningPtr<const MCRegisterInfo> RegInfo;
protected:
bool isBigEndian;
};

View File

@ -29,7 +29,7 @@ namespace {
/// \brief A disassembler class for XCore.
class XCoreDisassembler : public MCDisassembler {
const MCRegisterInfo *RegInfo;
OwningPtr<const MCRegisterInfo> RegInfo;
public:
XCoreDisassembler(const MCSubtargetInfo &STI, const MCRegisterInfo *Info) :
MCDisassembler(STI), RegInfo(Info) {}
@ -42,7 +42,7 @@ public:
raw_ostream &vStream,
raw_ostream &cStream) const;
const MCRegisterInfo *getRegInfo() const { return RegInfo; }
const MCRegisterInfo *getRegInfo() const { return RegInfo.get(); }
};
}