summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp
diff options
context:
space:
mode:
authorClement Courbet <courbet@google.com>2018-04-13 14:46:48 +0000
committerClement Courbet <courbet@google.com>2018-04-13 14:46:48 +0000
commit1924993b22898f12bc87789b1f14aa1f0025c43a (patch)
tree6cc4ed1a0be76d2c866d3c79ac6826f65e33f7cd /llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp
parent01637c473f7da106c0085899ab8e9004a7d19d23 (diff)
downloadbcm5719-llvm-1924993b22898f12bc87789b1f14aa1f0025c43a.tar.gz
bcm5719-llvm-1924993b22898f12bc87789b1f14aa1f0025c43a.zip
[llvm-exegesis] Fix use after free.
Reviewers: gchatelet Subscribers: tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D45625 llvm-svn: 330026
Diffstat (limited to 'llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp')
-rw-r--r--llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp b/llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp
index 7e1e58ff888..00b7ee74ca0 100644
--- a/llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp
+++ b/llvm/tools/llvm-exegesis/lib/InMemoryAssembler.cpp
@@ -215,7 +215,7 @@ JitFunction::JitFunction(JitFunctionContext &&Context,
// Adding the generated object file containing the assembled function.
// The ExecutionEngine makes sure the object file is copied into an
// executable page.
- ExecEngine->addObjectFile(ObjHolder.takeBinary().first);
+ ExecEngine->addObjectFile(std::move(ObjHolder));
// Setting function
FunctionBytes =
llvm::StringRef(reinterpret_cast<const char *>(
OpenPOWER on IntegriCloud