Avoid generation of dead code in a few more situations.
authorDaniel Dunbar <daniel@zuster.org>
Sun, 19 Jul 2009 06:58:07 +0000 (06:58 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sun, 19 Jul 2009 06:58:07 +0000 (06:58 +0000)
commitb6adc43f6ec4d2c1eef7b00d3f6460fe2d7be381
treedaeb510d033b1056dea4926228383466d8dd8f12
parent567daf3ce8ee278893b4065cfb13feae8d2c82a4
Avoid generation of dead code in a few more situations.
 - Emit variable declarations as "simple", we want to avoid forcing the creation
   of a dummy basic block, but still need to make the variable available for
   later use.

 - With that, we can now skip IRgen for other unreachable statements (which
   don't define a label).

 - Anders, I added two fixmes on calls to EmitVLASize, can you check them?

llvm-svn: 76361
clang/lib/CodeGen/CGDecl.cpp
clang/lib/CodeGen/CGStmt.cpp
clang/lib/CodeGen/CodeGenFunction.cpp
clang/lib/CodeGen/CodeGenFunction.h
clang/test/CodeGen/unreachable.c [new file with mode: 0644]