summaryrefslogtreecommitdiff
path: root/tools/lli/ChildTarget
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-10-05 11:53:20 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-10-05 11:53:20 +0000
commit5ccfef6a1d9a5d3fcea56d8900dd35931c793484 (patch)
tree21e410c5905a7cc012946c76d54cede5bbaa2027 /tools/lli/ChildTarget
parentbeb6afa84397a27e48a9d72ac1d588bc6fcaf564 (diff)
downloadllvm-5ccfef6a1d9a5d3fcea56d8900dd35931c793484.tar.gz
llvm-5ccfef6a1d9a5d3fcea56d8900dd35931c793484.tar.bz2
llvm-5ccfef6a1d9a5d3fcea56d8900dd35931c793484.tar.xz
lli: Plug leaks in the remote target external implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192031 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lli/ChildTarget')
-rw-r--r--tools/lli/ChildTarget/ChildTarget.cpp1
-rw-r--r--tools/lli/ChildTarget/Unix/ChildTarget.inc4
-rw-r--r--tools/lli/ChildTarget/Windows/ChildTarget.inc3
3 files changed, 8 insertions, 0 deletions
diff --git a/tools/lli/ChildTarget/ChildTarget.cpp b/tools/lli/ChildTarget/ChildTarget.cpp
index a59209a160..55fcae9def 100644
--- a/tools/lli/ChildTarget/ChildTarget.cpp
+++ b/tools/lli/ChildTarget/ChildTarget.cpp
@@ -11,6 +11,7 @@ using namespace llvm;
class LLIChildTarget {
public:
+ ~LLIChildTarget(); // OS-specific destructor
void initialize();
LLIMessageType waitForIncomingMessage();
void handleMessage(LLIMessageType messageType);
diff --git a/tools/lli/ChildTarget/Unix/ChildTarget.inc b/tools/lli/ChildTarget/Unix/ChildTarget.inc
index cd42f34edd..cc95810dc8 100644
--- a/tools/lli/ChildTarget/Unix/ChildTarget.inc
+++ b/tools/lli/ChildTarget/Unix/ChildTarget.inc
@@ -49,6 +49,10 @@ struct ConnectionData_t {
} // namespace
+LLIChildTarget::~LLIChildTarget() {
+ delete static_cast<ConnectionData_t *>(ConnectionData);
+}
+
// OS-specific methods
void LLIChildTarget::initializeConnection() {
// Store the parent ends of the pipes
diff --git a/tools/lli/ChildTarget/Windows/ChildTarget.inc b/tools/lli/ChildTarget/Windows/ChildTarget.inc
index bb95aff000..45db2b0a80 100644
--- a/tools/lli/ChildTarget/Windows/ChildTarget.inc
+++ b/tools/lli/ChildTarget/Windows/ChildTarget.inc
@@ -12,6 +12,9 @@
//
//===----------------------------------------------------------------------===//
+LLIChildTarget::~LLIChildTarget() {
+}
+
// The RemoteTargetExternal implementation should prevent us from ever getting
// here on Windows, but nothing prevents a user from running this directly.
void LLIChildTarget::initializeConnection() {