summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp')
-rw-r--r--lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp b/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
index 49de7f551cf..b2295f87d66 100644
--- a/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
+++ b/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
@@ -71,7 +71,9 @@ public:
if (!atom->name().empty())
buildDuplicateNameMap(*atom);
- if (atom->contentType() == DefinedAtom::typeGroupComdat) {
+ if (atom->contentType() == DefinedAtom::typeGroupComdat ||
+ atom->contentType() == DefinedAtom::typeGnuLinkOnce) {
+
for (const lld::Reference *ref : *atom) {
if (ref->kindNamespace() != lld::Reference::KindNamespace::all)
continue;
@@ -229,7 +231,8 @@ private:
}
if (const lld::DefinedAtom *da = dyn_cast<DefinedAtom>(atom)) {
- if (da->contentType() == DefinedAtom::typeGroupComdat) {
+ if (da->contentType() == DefinedAtom::typeGroupComdat ||
+ da->contentType() == DefinedAtom::typeGnuLinkOnce) {
if (_groupMap.count(name)) {
_io.setError(Twine("duplicate group name: ") + name);
} else {
@@ -476,7 +479,8 @@ template <> struct ScalarEnumerationTraits<lld::DefinedAtom::ContentType> {
io.enumCase(value, "ro-note", DefinedAtom::typeRONote);
io.enumCase(value, "rw-note", DefinedAtom::typeRWNote);
io.enumCase(value, "no-alloc", DefinedAtom::typeNoAlloc);
- io.enumCase(value, "group-comdat", DefinedAtom::typeGroupComdat);
+ io.enumCase(value, "group-comdat", DefinedAtom::typeGroupComdat);
+ io.enumCase(value, "gnu-linkonce", DefinedAtom::typeGnuLinkOnce);
}
};
OpenPOWER on IntegriCloud