[llvm] r303454 - Added missing break.

Galina Kistanova via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 14:11:55 PDT 2017


This is an obvious case.
Here is the original code flow:

switch (Name[0]) {
...
  case 'n': {
    if (Name.startswith("nvvm.")) {
    ...
    }
  }
  case 'o':
    ...
    if (Name.startswith("objectsize.")) {
    ...
    }
    break;
...

If the Name starts with 'n' but falls through to the next case, the
expression in the second if is always false, so it always hit the second
break after it falls through.

There is no functional change.

Thanks

Galina


On Fri, May 19, 2017 at 1:50 PM, Davide Italiano <davide at freebsd.org> wrote:

> On Fri, May 19, 2017 at 1:31 PM, Galina Kistanova via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Author: gkistanova
> > Date: Fri May 19 15:31:51 2017
> > New Revision: 303454
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=303454&view=rev
> > Log:
> > Added missing break.
> >
>
> This seems like a functional change. I'm afraid it's going to be very
> hard to test this particular change in behaviour, but, can you please
> try?
> (Also, I assume this change is because you're trying to silence some
> warning of sort). It will be good to specify that in the commit
> (including the warning itself, maybe).
>
> Thanks,
>
> --
> Davide
>
> "There are no solved problems; there are only problems that are more
> or less solved" -- Henri Poincare
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170519/a7db718a/attachment.html>


More information about the llvm-commits mailing list