Use unique_ptr.

llvm-svn: 340642
This commit is contained in:
Joel Galenson 2018-08-24 19:40:35 +00:00
parent 892fc6b7f2
commit 90f976a46b
1 changed files with 2 additions and 1 deletions

View File

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