aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Metadata.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2009-11-27 19:57:53 +0000
committerNick Lewycky <nicholas@mxc.ca>2009-11-27 19:57:53 +0000
commit807d2fa1ebf7dd62df3f8cf33f14683205661cc4 (patch)
tree1c162be150c53d8b3167e026915b41c3f5730d06 /lib/VMCore/Metadata.cpp
parent253be4ddb21915303c45fd0d49bfee0e1ff6375d (diff)
downloadexternal_llvm-807d2fa1ebf7dd62df3f8cf33f14683205661cc4.zip
external_llvm-807d2fa1ebf7dd62df3f8cf33f14683205661cc4.tar.gz
external_llvm-807d2fa1ebf7dd62df3f8cf33f14683205661cc4.tar.bz2
Oops! Fix bug introduced in my recent cleanup change. Thanks to Tobias Grosser
for pointing this out. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90015 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Metadata.cpp')
-rw-r--r--lib/VMCore/Metadata.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/Metadata.cpp b/lib/VMCore/Metadata.cpp
index 854f86c..b80b6bf 100644
--- a/lib/VMCore/Metadata.cpp
+++ b/lib/VMCore/Metadata.cpp
@@ -42,7 +42,7 @@ MDString *MDString::get(LLVMContext &Context, const char *Str) {
StringMapEntry<MDString *> &Entry =
pImpl->MDStringCache.GetOrCreateValue(Str ? StringRef(Str) : StringRef());
MDString *&S = Entry.getValue();
- if (!S) new MDString(Context, Entry.getKey());
+ if (!S) S = new MDString(Context, Entry.getKey());
return S;
}