Convert assert(0) to llvm_unreachable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149849 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2012-02-05 22:14:15 +00:00
parent 2cb395eae7
commit 50bee42b54
35 changed files with 144 additions and 188 deletions

View File

@@ -337,7 +337,7 @@ struct OptionValueBase : public GenericOptionValue {
bool hasValue() const { return false; }
const DataType &getValue() const { assert(false && "no default value"); }
const DataType &getValue() const { llvm_unreachable("no default value"); }
// Some options may take their value from a different data type.
template<class DT>

View File

@@ -17,6 +17,7 @@
#include "llvm/ADT/ilist.h"
#include "llvm/Support/AlignOf.h"
#include "llvm/Support/ErrorHandling.h"
#include <cassert>
namespace llvm {
@@ -52,7 +53,7 @@ struct ilist_traits<RecyclerStruct> :
static void noteHead(RecyclerStruct*, RecyclerStruct*) {}
static void deleteNode(RecyclerStruct *) {
assert(0 && "Recycler's ilist_traits shouldn't see a deleteNode call!");
llvm_unreachable("Recycler's ilist_traits shouldn't see a deleteNode call!");
}
};