Index: include/llvm/Support/Compiler.h
===================================================================
--- include/llvm/Support/Compiler.h	(revision 157508)
+++ include/llvm/Support/Compiler.h	(working copy)
@@ -168,4 +168,43 @@
 # define LLVM_BUILTIN_UNREACHABLE __builtin_unreachable()
 #endif
 
+// The LLVM_FALLTHROUGH macro can be used to annotate implicit fall-through
+// between switch labels:
+//  switch (x) {
+//  case 41:
+//    if (truth_is_out_there) {
+//      ++x;
+//      LLVM_FALLTHROUGH;  // Use instead of/along with annotations in comments.
+//    } else {
+//      return x;
+//    }
+//  case 42:
+//    ...
+//
+//  As shown in the example above, the LLVM_FALLTHROUGH macro should be followed
+//  by semicolon. It is designed to mimic control-flow statements like 'break;',
+//  so it can be placed in most places where 'break;' can, but only if there are
+//  no statements on the execution path between it and the next switch label.
+//
+//  When compiled with clang in C++11 mode, the LLVM_FALLTHROUGH macro is
+//  expanded to [[clang::fallthrough]] attribute, which is analysed when
+//  performing switch labels fall-through diagnostic ('-Wimplicit-fallthrough').
+//  See clang documentation on language extensions for details:
+//  http://clang.llvm.org/docs/LanguageExtensions.html#clang__fallthrough
+//
+//  When used with unsupported compilers, the LLVM_FALLTHROUGH macro has no
+//  effect on diagnostics.
+//
+//  In either case this macro has no effect on runtime behavior and performance
+//  of code.
+#ifdef __clang__
+#if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough")
+#define LLVM_FALLTHROUGH [[clang::fallthrough]]
 #endif
+#endif
+
+#ifndef LLVM_FALLTHROUGH
+#define LLVM_FALLTHROUGH do { } while (0)
+#endif
+
+#endif
