[llvm-commits] [llvm] r147861 - in /llvm/trunk: include/llvm/Bitcode/BitCodes.h include/llvm/Target/TargetLowering.h lib/AsmParser/LLParser.cpp lib/Bitcode/Writer/BitcodeWriter.cpp lib/CodeGen/GCMetadata.cpp lib/CodeGen/LLVMTargetMachine.cpp lib/
chandlerc at google.com
Wed Jan 11 04:33:17 CST 2012
On Wed, Jan 11, 2012 at 2:25 AM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Chandler,
> > Add 'llvm_unreachable' to passify GCC's understanding of the constraints
> > of several newly un-defaulted switches. This also helps optimizers
> > (including LLVM's) recognize that every case is covered, and we should
> > assume as much.
> previously if you added a new value to one of these enums then you would
> get a
> compiler warning from clang, while now you now longer get a compiler
Nope, I've not changed the switch. David Blaikie changed all of these
switches to no longer have the default case, thereby giving us the compiler
I've added the unreachable bit after the switch entirely, preserving the
switch compiler warning, but silencing the compiler warnings about falling
off the end of the *function*.
Richard had a patch that added a default case back, but I think he fixed it
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits