summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/LLVMContextImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/VMCore/LLVMContextImpl.cpp')
-rw-r--r--llvm/lib/VMCore/LLVMContextImpl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/LLVMContextImpl.cpp b/llvm/lib/VMCore/LLVMContextImpl.cpp
index 8e6c7778b95..edd76fc031b 100644
--- a/llvm/lib/VMCore/LLVMContextImpl.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud