Use unique_ptr to hold MCInstrInfo

llvm-svn: 340654
This commit is contained in:
Vitaly Buka 2018-08-24 21:03:35 +00:00
parent 3807217d02
commit 96cbeffa7b
1 changed files with 2 additions and 1 deletions

View File

@ -351,8 +351,9 @@ ELFObjectFileBase::getPltAddresses() const {
default: default:
return {}; return {};
} }
std::unique_ptr<const MCInstrInfo> MII(T->createMCInstrInfo());
std::unique_ptr<const MCInstrAnalysis> MIA( std::unique_ptr<const MCInstrAnalysis> MIA(
T->createMCInstrAnalysis(T->createMCInstrInfo())); T->createMCInstrAnalysis(MII.get()));
if (!MIA) if (!MIA)
return {}; return {};
Optional<SectionRef> Plt = None, RelaPlt = None, GotPlt = None; Optional<SectionRef> Plt = None, RelaPlt = None, GotPlt = None;