X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FADT%2FTrie.h;h=845af015b052d7a4919cb30463ffa1c3eba41bc9;hb=e82fafe9e22c7f0bb35ec4cb7d5428bf9e930807;hp=cf92862c20d995ce26106eaab4ae21949f6e2912;hpb=275872e79950dafc6699f6502cee52f74b84a22a;p=oota-llvm.git diff --git a/include/llvm/ADT/Trie.h b/include/llvm/ADT/Trie.h index cf92862c20d..845af015b05 100644 --- a/include/llvm/ADT/Trie.h +++ b/include/llvm/ADT/Trie.h @@ -18,6 +18,7 @@ #include "llvm/ADT/GraphTraits.h" #include "llvm/Support/DOTGraphTraits.h" +#include #include namespace llvm { @@ -219,8 +220,7 @@ bool Trie::addString(const std::string& s, const Payload& data) { assert(0 && "FIXME!"); return false; case Node::DontMatch: - assert(0 && "Impossible!"); - return false; + llvm_unreachable("Impossible!"); case Node::LabelIsPrefix: s1 = s1.substr(nNode->label().length()); cNode = nNode; @@ -257,8 +257,7 @@ const Payload& Trie::lookup(const std::string& s) const { case Node::StringIsPrefix: return Empty; case Node::DontMatch: - assert(0 && "Impossible!"); - return Empty; + llvm_unreachable("Impossible!"); case Node::LabelIsPrefix: s1 = s1.substr(nNode->label().length()); cNode = nNode; @@ -308,8 +307,7 @@ struct DOTGraphTraits > : public DefaultDOTGraphTraits { return "Trie"; } - static std::string getNodeLabel(NodeType* Node, const Trie& T, - bool ShortNames) { + static std::string getNodeLabel(NodeType* Node, const Trie& T) { if (T.getRoot() == Node) return ""; else