[llvm] r310623 - Fixup for r310621: Hint the compilers about unreachable code.
Marek Sokolowski via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 10 09:46:52 PDT 2017
Author: mnbvmar
Date: Thu Aug 10 09:46:52 2017
New Revision: 310623
URL: http://llvm.org/viewvc/llvm-project?rev=310623&view=rev
Log:
Fixup for r310621: Hint the compilers about unreachable code.
Modified:
llvm/trunk/tools/llvm-rc/ResourceScriptToken.cpp
Modified: llvm/trunk/tools/llvm-rc/ResourceScriptToken.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-rc/ResourceScriptToken.cpp?rev=310623&r1=310622&r2=310623&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-rc/ResourceScriptToken.cpp (original)
+++ llvm/trunk/tools/llvm-rc/ResourceScriptToken.cpp Thu Aug 10 09:46:52 2017
@@ -214,6 +214,10 @@ Error Tokenizer::consumeToken(const Kind
case Kind::Invalid:
assert(false && "Cannot consume an invalid token.");
}
+
+ // This silences the compilers which cannot notice that the execution
+ // never reaches here.
+ assert(false);
}
bool Tokenizer::willNowRead(StringRef FollowingChars) const {
More information about the llvm-commits
mailing list