[LLVMbugs] [Bug 15806] Naked attribute still has return statement

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 22 05:20:30 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=15806

Duncan Sands <baldrick at free.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #4 from Duncan Sands <baldrick at free.fr> ---
Every LLVM IR function definition is required to contain at least one basic
block.  Every basic block is required to end with a terminator instruction. 
Thus every function contains at least one instruction.  There is no way to have
a "null function" at the IR level.  All kinds of places in LLVM (eg just about
every optimizer) depend on this invariant, so it isn't going to change.

Maybe you can have your inline asm take care of control flow itself, i.e. just
explicitly put the instructions that should be run at the end of the function
in the inline asm?  If there is an extraneous "ret" instruction following that
code, it should then be harmless.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130422/d6f62216/attachment.html>


More information about the llvm-bugs mailing list