1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00

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 c9994c1345
commit 52de92c98c

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;