X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FSupport%2FStringPool.cpp;h=76faabc92bb5c74feb4039bfa6e043600d58c262;hb=3cf9f3731222d5c86173c83b6dec9783f40b305c;hp=6b34d2c4a01c9bdb2296ec6cb05822c65b855f2c;hpb=985cb6223424c6c97c4b9a47ae74c2eedb5cd7c2;p=oota-llvm.git diff --git a/lib/Support/StringPool.cpp b/lib/Support/StringPool.cpp index 6b34d2c4a01..76faabc92bb 100644 --- a/lib/Support/StringPool.cpp +++ b/lib/Support/StringPool.cpp @@ -2,8 +2,8 @@ // // The LLVM Compiler Infrastructure // -// This file was developed by Gordon Henriksen and is distributed under the -// University of Illinois Open Source License. See LICENSE.TXT for details. +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // @@ -12,7 +12,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Support/StringPool.h" -#include "llvm/Support/Streams.h" +#include "llvm/ADT/StringRef.h" using namespace llvm; @@ -22,12 +22,12 @@ StringPool::~StringPool() { assert(InternTable.empty() && "PooledStringPtr leaked!"); } -PooledStringPtr StringPool::intern(const char *Begin, const char *End) { - table_t::iterator I = InternTable.find(Begin, End); +PooledStringPtr StringPool::intern(StringRef Key) { + table_t::iterator I = InternTable.find(Key); if (I != InternTable.end()) return PooledStringPtr(&*I); - entry_t *S = entry_t::Create(Begin, End); + entry_t *S = entry_t::Create(Key); S->getValue().Pool = this; InternTable.insert(S);