[llvm-commits] Proper FnEnd for JITEmitter::finishFunction

Argiris Kirtzidis akyrtzi at gmail.com
Thu Apr 30 08:36:00 PDT 2009


The FnEnd in JITEmitter::finishFunction includes not only the machine 
code of the emitted function but also the memory for any global 
variables that were allocated while the relocations were resolved.
Apart from not reporting the "actual" function code chunk (i.e. for 
AddFunctionToSymbolTable) it's also a bit annoying when the disassembler 
displays "junk" at the end of the function (trying to disassemble the 
memory that belongs to global variables).

The tiny attached patch fixes it.

-Argiris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fnend.patch
Type: text/x-diff
Size: 1073 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090430/a8ddf79c/attachment.patch>


More information about the llvm-commits mailing list