]> granicus.if.org Git - llvm/commitdiff
Fixup for r310621: Hint the compilers about unreachable code.
authorMarek Sokolowski <mnbvmar@gmail.com>
Thu, 10 Aug 2017 16:46:52 +0000 (16:46 +0000)
committerMarek Sokolowski <mnbvmar@gmail.com>
Thu, 10 Aug 2017 16:46:52 +0000 (16:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310623 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-rc/ResourceScriptToken.cpp

index 95ff113c70cc668ed17dbee24e2d72f041103c66..557a343b435869e2b60b9350594f3fad18a03940 100644 (file)
@@ -214,6 +214,10 @@ Error Tokenizer::consumeToken(const Kind TokenKind) {
   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 {