Skip to content

Commit

Permalink
[Clang Tablegen] Add llvm_unreachable() to getModifierName()
Browse files Browse the repository at this point in the history
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

llvm-svn: 332854
  • Loading branch information
searlmc1 committed May 21, 2018
1 parent cb1ed40 commit bcf611a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clang/utils/TableGen/ClangDiagnosticsEmitter.cpp
Expand Up @@ -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 {
Expand Down

0 comments on commit bcf611a

Please sign in to comment.