mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 04:33:05 +00:00
Use a OwningPtr instead of a manual delete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185673 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
25746ddd66
commit
8be527901a
@ -38,7 +38,7 @@ typedef MCDisassembler::DecodeStatus DecodeStatus;
|
||||
namespace {
|
||||
/// AArch64 disassembler for all AArch64 platforms.
|
||||
class AArch64Disassembler : public MCDisassembler {
|
||||
const MCRegisterInfo *RegInfo;
|
||||
OwningPtr<const MCRegisterInfo> RegInfo;
|
||||
public:
|
||||
/// Initializes the disassembler.
|
||||
///
|
||||
@ -46,9 +46,7 @@ public:
|
||||
: MCDisassembler(STI), RegInfo(Info) {
|
||||
}
|
||||
|
||||
~AArch64Disassembler() {
|
||||
delete RegInfo;
|
||||
}
|
||||
~AArch64Disassembler() {}
|
||||
|
||||
/// See MCDisassembler.
|
||||
DecodeStatus getInstruction(MCInst &instr,
|
||||
@ -58,7 +56,7 @@ public:
|
||||
raw_ostream &vStream,
|
||||
raw_ostream &cStream) const;
|
||||
|
||||
const MCRegisterInfo *getRegInfo() const { return RegInfo; }
|
||||
const MCRegisterInfo *getRegInfo() const { return RegInfo.get(); }
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user