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

           Summary: asmparser accepts {} as function body
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: LLVM assembly language parser
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


The asm parser accepts this code:

define void @def() {}

Running opt -S on it silently turns it into this:

declare void @def()

It would be better to issue an error for this case.

This came up because in some hand-written IR where an empty function body was
intended, but the "ret void" was forgotten. It's confusing for this to be
silently accepted and converted to a declaration.


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to