[lld] r194624 - Remove default label from fully covered switch.

Rui Ueyama ruiu at google.com
Wed Nov 13 21:41:21 PST 2013


On Wed, Nov 13, 2013 at 7:21 PM, Duncan Exon Smith <dexonsmith at apple.com>wrote:

> On Nov 13, 2013, at 3:33 PM, Rui Ueyama <ruiu at google.com> wrote:
>
> >   case NCR_Error:
> >     llvm::errs() << "SymbolTable: error while merging " << name << "\n";
> > -    // FALLTHRU
> > -  default:
> > -    llvm::report_fatal_error("SymbolTable::addByName(): unhandled
> switch clause");
> >   }
>
> Was the change in behavior intended, or should you add a new
> report_fatal_error() call?
>

This change is kind of intended. If something wrong in the input, we
sometimes terminate the linker immediately, and sometimes continue
processing after printing an error with llvm::err(). Previously the linker
is terminated with pretty vague error message ("unhandled switch clause").
With this patch it proceed after printing an error. I was OK in either way,
so I just removed default label. I should have made this point clear in the
commit log. Sorry about that.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131113/3af060b7/attachment.html>


More information about the llvm-commits mailing list