summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-09-03 19:48:09 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-09-03 19:48:09 +0000
commited9709d928ff3684bc1d646badcf068689ce232d (patch)
tree4a6986e0cf32abf2b6dde1b17c7be9a5f8e39465 /llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h
parent3205b5167399823eaa954233f6282de6a5603214 (diff)
downloadbcm5719-llvm-ed9709d928ff3684bc1d646badcf068689ce232d.tar.gz
bcm5719-llvm-ed9709d928ff3684bc1d646badcf068689ce232d.zip
unique_ptrify a bunch of stuff through RuntimeDyld::loadObject
llvm-svn: 217065
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h b/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h
index ddf0e89b408..9bbf6a0d809 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h
@@ -36,16 +36,13 @@ protected:
// This form of the constructor allows subclasses to use
// format-specific subclasses of ObjectFile directly
- ObjectImageCommon(ObjectBuffer *Input, std::unique_ptr<object::ObjectFile> Obj)
- : ObjectImage(Input), // saves Input as Buffer and takes ownership
- ObjFile(std::move(Obj))
- {
- }
+ ObjectImageCommon(std::unique_ptr<ObjectBuffer> Input,
+ std::unique_ptr<object::ObjectFile> Obj)
+ : ObjectImage(std::move(Input)), ObjFile(std::move(Obj)) {}
public:
- ObjectImageCommon(ObjectBuffer* Input)
- : ObjectImage(Input) // saves Input as Buffer and takes ownership
- {
+ ObjectImageCommon(std::unique_ptr<ObjectBuffer> Input)
+ : ObjectImage(std::move(Input)) {
// FIXME: error checking? createObjectFile returns an ErrorOr<ObjectFile*>
// and should probably be checked for failure.
MemoryBufferRef Buf = Buffer->getMemBuffer();
OpenPOWER on IntegriCloud