X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FSupport%2FStringPool.cpp;h=76faabc92bb5c74feb4039bfa6e043600d58c262;hb=3cf9f3731222d5c86173c83b6dec9783f40b305c;hp=1ee917f119f7e446538cfa395715043f9bf93877;hpb=cfa6ec92e61a1ab040c2b79db5de3a39df732ff6;p=oota-llvm.git diff --git a/lib/Support/StringPool.cpp b/lib/Support/StringPool.cpp index 1ee917f119f..76faabc92bb 100644 --- a/lib/Support/StringPool.cpp +++ b/lib/Support/StringPool.cpp @@ -22,12 +22,12 @@ StringPool::~StringPool() { assert(InternTable.empty() && "PooledStringPtr leaked!"); } -PooledStringPtr StringPool::intern(const StringRef &Key) { +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(Key.begin(), Key.end()); + entry_t *S = entry_t::Create(Key); S->getValue().Pool = this; InternTable.insert(S);