<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - lp_bld_misc.cpp:503:40: error: no matching function for call to ‘llvm::EngineBuilder::setMCJITMemoryManager(ShaderMemoryManager*&)’"
href="https://bugs.freedesktop.org/show_bug.cgi?id=86958#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - lp_bld_misc.cpp:503:40: error: no matching function for call to ‘llvm::EngineBuilder::setMCJITMemoryManager(ShaderMemoryManager*&)’"
href="https://bugs.freedesktop.org/show_bug.cgi?id=86958">bug 86958</a>
from <span class="vcard"><a class="email" href="mailto:chris@cvine.freeserve.co.uk" title="Chris Vine <chris@cvine.freeserve.co.uk>"> <span class="fn">Chris Vine</span></a>
</span></b>
<pre>Emil,
OK about your first point, and thanks.
On your second, as the name suggests the whole purpose of std::unique_ptr is to
take unique ownership. a unique_ptr will delete any object it still owns, in
its destructor. Ownership is transferred from one unique_ptr to another by
passing the unique_ptr as an rvalue. This will release ownership in the movant
and pass it to the movee. You must never call delete manually on an object
owned by a unique_ptr or you will get a double delete, so this code is
definitely wrong.
Of course this begs the question of what
EngineBuilder::setMCJITMemoryManager(ShaderMemoryManager*) does in llvm < 3.6.
If that method also tries to delete its argument when finished with, you would
get a double delete in the error case (ie where EngineBuilder::create() fails)
for earlier versions of llvm. In other words, the delete call may be wrong in
all cases.
Do you want me to open a separate bug to say so?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>