aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2018-08-24 21:03:35 +0000
committerStephen Hines <srhines@google.com>2018-09-09 23:33:03 -0700
commit5fe0d00d26b61b04e8b320f0a89773f912cb5c79 (patch)
treeba001e000ca0bba8fa4f756af611f26688c7b4f2
parent59f9f865303d483c502a6b10a7fcd842030cb577 (diff)
downloadllvm-5fe0d00d26b61b04e8b320f0a89773f912cb5c79.tar.gz
Use unique_ptr to hold MCInstrInfo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340654 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Object/ELFObjectFile.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Object/ELFObjectFile.cpp b/lib/Object/ELFObjectFile.cpp
index 3f8984800e9..9fb3a55ac7b 100644
--- a/lib/Object/ELFObjectFile.cpp
+++ b/lib/Object/ELFObjectFile.cpp
@@ -351,8 +351,9 @@ ELFObjectFileBase::getPltAddresses() const {
default:
return {};
}
+ std::unique_ptr<const MCInstrInfo> MII(T->createMCInstrInfo());
std::unique_ptr<const MCInstrAnalysis> MIA(
- T->createMCInstrAnalysis(T->createMCInstrInfo()));
+ T->createMCInstrAnalysis(MII.get()));
if (!MIA)
return {};
Optional<SectionRef> Plt = None, RelaPlt = None, GotPlt = None;