summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Target.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-02-11 21:18:01 +0000
committerRui Ueyama <ruiu@google.com>2016-02-11 21:18:01 +0000
commitc1c282a04ed307381b58f898b2bb502adf3b3ab7 (patch)
tree121ad0d832bb46411ecfed754769eba88435dbc3 /lld/ELF/Target.cpp
parent717677af35b2a6a69242f337880923734ab4c67f (diff)
downloadbcm5719-llvm-c1c282a04ed307381b58f898b2bb502adf3b3ab7.tar.gz
bcm5719-llvm-c1c282a04ed307381b58f898b2bb502adf3b3ab7.zip
ELF: Release Target at end of link().
Previously, Target held a value until a new value is assigned to the variable. That was a benign leak -- that was not an unbounded leak and didn't grab any resources except a small amount of memory. But it is better to fix than leaving as is. llvm-svn: 260592
Diffstat (limited to 'lld/ELF/Target.cpp')
-rw-r--r--lld/ELF/Target.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp
index ff30b8a1724..444cbb3cbb1 100644
--- a/lld/ELF/Target.cpp
+++ b/lld/ELF/Target.cpp
@@ -33,7 +33,7 @@ using namespace llvm::ELF;
namespace lld {
namespace elf2 {
-std::unique_ptr<TargetInfo> Target;
+TargetInfo *Target;
template <endianness E> static void add32(void *P, int32_t V) {
write32<E>(P, read32<E>(P) + V);
OpenPOWER on IntegriCloud