[llvm] r223188 - ExceptionDemo: Let setMCJITMemoryManager() take unique_ptr, since r223183.
David Blaikie
dblaikie at gmail.com
Tue Dec 2 19:29:09 PST 2014
On Tue, Dec 2, 2014 at 6:05 PM, NAKAMURA Takumi <geek4civic at gmail.com>
wrote:
> Author: chapuni
> Date: Tue Dec 2 20:05:51 2014
> New Revision: 223188
>
> URL: http://llvm.org/viewvc/llvm-project?rev=223188&view=rev
> Log:
> ExceptionDemo: Let setMCJITMemoryManager() take unique_ptr, since r223183.
>
> Modified:
> llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp
>
> Modified: llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp?rev=223188&r1=223187&r2=223188&view=diff
>
> ==============================================================================
> --- llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp (original)
> +++ llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp Tue Dec 2
> 20:05:51 2014
> @@ -1961,13 +1961,13 @@ int main(int argc, char *argv[]) {
> llvm::make_unique<llvm::Module>("my cool jit", context);
> llvm::Module *module = Owner.get();
>
> - llvm::RTDyldMemoryManager *MemMgr = new llvm::SectionMemoryManager();
> + std::unique_ptr<llvm::RTDyldMemoryManager> MemMgr(new
> llvm::SectionMemoryManager());
>
This would usually be written as:
auto MemMgr = llvm::make_unique<SectionMemoryManager>();
>
> // Build engine with JIT
> llvm::EngineBuilder factory(std::move(Owner));
> factory.setEngineKind(llvm::EngineKind::JIT);
> factory.setTargetOptions(Opts);
> - factory.setMCJITMemoryManager(MemMgr);
> + factory.setMCJITMemoryManager(std::move(MemMgr));
> llvm::ExecutionEngine *executionEngine = factory.create();
>
> {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141202/6705b764/attachment.html>
More information about the llvm-commits
mailing list