http://llvm.org/bugs/show_bug.cgi?id=9796
Summary: no lines for empty case statement
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Consider this small C program:
#include <stdlib.h>
int main(int argc, char**argv) {
int x = atoi(argv[1]);
switch(x) {
case 1:
break;
}
return 0;
}
When you build this and step through it with a debugger (pass "1" in argv[1]),
you'll find that you go straight from "switch(x) {" to "return 0;".
Fixing this is complicated because clang doesn't generate a distinct block in
LLVM IR for this, it's actually creating a switch with default block ->
%sw.epilog and i32 1 -> %sw.epilog.
(As a related issue, "case X:" and "default:" lines never get any debug info
associated with them either. I'm not sure whether that's intentional or not.)
--
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