diff options
author | Linus Torvalds <torvalds@home.transmeta.com> | 2003-06-22 19:16:36 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:00:53 -0700 |
commit | f40c00a25222b3716f70be9865475ddca4ffb61f (patch) | |
tree | 92ce6022107a9b5d48e65a8ed55ee93c3819daf1 /inline.c | |
parent | Flesh out inlining some more. (diff) | |
download | sparse-f40c00a25222b3716f70be9865475ddca4ffb61f.tar.gz sparse-f40c00a25222b3716f70be9865475ddca4ffb61f.tar.bz2 sparse-f40c00a25222b3716f70be9865475ddca4ffb61f.zip |
Fix case statement inlining. At least partly.
Diffstat (limited to 'inline.c')
-rw-r--r-- | inline.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -248,15 +248,11 @@ static struct statement *copy_one_statement(struct statement *stmt) break; } case STMT_CASE: { - struct symbol *sym = copy_symbol(stmt->case_label); - struct expression *from = copy_expression(stmt->case_expression); - struct expression *to = copy_expression(stmt->case_to); - struct statement *stmt = copy_one_statement(stmt->case_statement); stmt = dup_statement(stmt); - stmt->case_expression = from; - stmt->case_to = to; - stmt->case_statement = stmt; - stmt->case_label = sym; + stmt->case_label = copy_symbol(stmt->case_label); + stmt->case_expression = copy_expression(stmt->case_expression); + stmt->case_to = copy_expression(stmt->case_to); + stmt->case_statement = copy_one_statement(stmt->case_statement); break; } case STMT_SWITCH: { |