summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/YAMLTraits.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2013-08-07 05:51:27 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2013-08-07 05:51:27 +0000
commitdf73c300bc6bbae4685d83cd5a7e2b1c0c7f6ef7 (patch)
tree1a4c5f4446a3ea98209e03854fdca47813db1fa4 /llvm/lib/Support/YAMLTraits.cpp
parentd6877f05617f24a3778fa0462c1f9317057db1b2 (diff)
downloadbcm5719-llvm-df73c300bc6bbae4685d83cd5a7e2b1c0c7f6ef7.tar.gz
bcm5719-llvm-df73c300bc6bbae4685d83cd5a7e2b1c0c7f6ef7.zip
YAMLTraits.h: replace DenseMap that used a bad implementation of DenseMapInfo
for StringRef with a StringMap The bug is that the empty key compares equal to the tombstone key. Also added an assertion to DenseMap to catch similar bugs in future. llvm-svn: 187866
Diffstat (limited to 'llvm/lib/Support/YAMLTraits.cpp')
-rw-r--r--llvm/lib/Support/YAMLTraits.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/YAMLTraits.cpp b/llvm/lib/Support/YAMLTraits.cpp
index 1e42b63e8d5..b0cd4151863 100644
--- a/llvm/lib/Support/YAMLTraits.cpp
+++ b/llvm/lib/Support/YAMLTraits.cpp
@@ -127,8 +127,8 @@ void Input::endMapping() {
return;
for (MapHNode::NameToNode::iterator i = MN->Mapping.begin(),
End = MN->Mapping.end(); i != End; ++i) {
- if (!MN->isValidKey(i->first)) {
- setError(i->second, Twine("unknown key '") + i->first + "'");
+ if (!MN->isValidKey(i->first())) {
+ setError(i->second, Twine("unknown key '") + i->first() + "'");
break;
}
}
OpenPOWER on IntegriCloud