aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/LLVMContextImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/LLVMContextImpl.cpp')
-rw-r--r--lib/VMCore/LLVMContextImpl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/VMCore/LLVMContextImpl.cpp b/lib/VMCore/LLVMContextImpl.cpp
index 8e6c7778b9..edd76fc031 100644
--- a/lib/VMCore/LLVMContextImpl.cpp
+++ b/lib/VMCore/LLVMContextImpl.cpp
@@ -188,8 +188,7 @@ Constant *LLVMContextImpl::getConstantVector(const VectorType *Ty,
void LLVMContextImpl::erase(MDString *M) {
sys::SmartScopedWriter<true> Writer(ConstantsLock);
- MDStringCache.erase(MDStringCache.find(StringRef(M->StrBegin,
- M->length())));
+ MDStringCache.erase(MDStringCache.find(M->getString()));
}
void LLVMContextImpl::erase(MDNode *M) {