From 487e38f4cd2210ccbbff4e553891c148e07ef02a Mon Sep 17 00:00:00 2001 From: Mark Searles Date: Mon, 21 May 2018 17:29:08 +0000 Subject: [Clang Tablegen] Add llvm_unreachable() to getModifierName() Fix internal build failure: ../../../ClangDiagnosticsEmitter.cpp -o ClangDiagnosticsEmitter.o ../../../ClangDiagnosticsEmitter.cpp: In function 'llvm::StringRef {anonymous}::getModifierName({anonymous}::ModifierType)': ../../../ClangDiagnosticsEmitter.cpp:495:1: error: control reaches end of non-void function [-Werror=return-type] } ^ Build failure triggered by git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332799 91177308-0d34-0410-b5e6-96231b3b80d8 Differential Revision: https://reviews.llvm.org/D47150 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332854 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/ClangDiagnosticsEmitter.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'utils') diff --git a/utils/TableGen/ClangDiagnosticsEmitter.cpp b/utils/TableGen/ClangDiagnosticsEmitter.cpp index 823e680498..fd9efd3558 100644 --- a/utils/TableGen/ClangDiagnosticsEmitter.cpp +++ b/utils/TableGen/ClangDiagnosticsEmitter.cpp @@ -492,6 +492,8 @@ static StringRef getModifierName(ModifierType MT) { case MT_Unknown: llvm_unreachable("invalid modifier type"); } + // Unhandled case + llvm_unreachable("invalid modifier type"); } struct Piece { -- cgit v1.2.1