[LLVMbugs] [Bug 5983] New: asmparser accepts {} as function body
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sat Jan 9 10:34:23 PST 2010
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: unassignedbugs at nondot.org
ReportedBy: gohman at apple.com
CC: llvmbugs at cs.uiuc.edu
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.
More information about the llvm-bugs
mailing list