summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorNathan Huckleberry <nhuck@google.com>2019-08-23 17:25:21 +0000
committerNathan Huckleberry <nhuck@google.com>2019-08-23 17:25:21 +0000
commit5808077bc68b26be32d620e71776e2e9bfbe9caf (patch)
tree7c8d23b394be0d9c0dbb7701c44c6fe2c4e9fed7 /llvm/lib/Support
parent5dca5efc0b14c1512cbd8a2902322e1b5b6617cb (diff)
downloadbcm5719-llvm-5808077bc68b26be32d620e71776e2e9bfbe9caf.tar.gz
bcm5719-llvm-5808077bc68b26be32d620e71776e2e9bfbe9caf.zip
Allow Compiler.h to be included in C files and fix fallthrough warnings
Summary: Since clang does not support comment style fallthrough annotations these should be switched to macros defined in Compiler.h. This requires some fixing to Compiler.h. Original patch: https://reviews.llvm.org/D66487 Reviewers: nickdesaulniers, aaron.ballman, xbolva00, rsmith Reviewed By: nickdesaulniers, aaron.ballman, rsmith Subscribers: rsmith, sfertile, ormris, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66609 llvm-svn: 369782
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/regcomp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Support/regcomp.c b/llvm/lib/Support/regcomp.c
index ca283869be9..ee2a1d87a26 100644
--- a/llvm/lib/Support/regcomp.c
+++ b/llvm/lib/Support/regcomp.c
@@ -48,6 +48,7 @@
#include "regex2.h"
#include "llvm/Config/config.h"
+#include "llvm/Support/Compiler.h"
/* character-class table */
static struct cclass {
@@ -537,7 +538,7 @@ p_ere_exp(struct parse *p)
break;
case '{': /* okay as ordinary except if digit follows */
REQUIRE(!MORE() || !isdigit((uch)PEEK()), REG_BADRPT);
- /* fall through */
+ LLVM_FALLTHROUGH;
default:
ordinary(p, c);
break;
@@ -733,7 +734,7 @@ p_simp_re(struct parse *p,
break;
case '*':
REQUIRE(starordinary, REG_BADRPT);
- /* fall through */
+ LLVM_FALLTHROUGH;
default:
ordinary(p, (char)c);
break;
@@ -1635,7 +1636,7 @@ findmust(struct parse *p, struct re_guts *g)
return;
}
} while (OP(s) != O_QUEST && OP(s) != O_CH);
- /* fall through */
+ LLVM_FALLTHROUGH;
default: /* things that break a sequence */
if (newlen > g->mlen) { /* ends one */
start = newstart;
OpenPOWER on IntegriCloud