================
@@ -671,24 +672,48 @@ MCContext::getELFUniqueIDForEntsize(StringRef 
SectionName, unsigned Flags,
                                       : std::nullopt;
 }
 
-MCSectionGOFF *MCContext::getGOFFSection(StringRef Section, SectionKind Kind,
-                                         MCSection *Parent,
-                                         uint32_t Subsection) {
+MCSectionGOFF *
+MCContext::getGOFFSection(SectionKind Kind, GOFF::ESDSymbolType SymbolType,
+                          StringRef Name, GOFF::SDAttr SDAttributes,
+                          GOFF::EDAttr EDAttributes, GOFF::PRAttr PRAttributes,
+                          MCSection *Parent) {
+  GOFFSectionKey T{Name, SymbolType};
   // Do the lookup. If we don't have a hit, return a new section.
-  auto IterBool =
-      GOFFUniquingMap.insert(std::make_pair(Section.str(), nullptr));
+  auto IterBool = GOFFUniquingMap.insert(std::make_pair(T, nullptr));
----------------
uweigand wrote:

The way the key is defined means that we there can only be a single instance of 
a section with the same name and type.  For example, there can only be a single 
ED with name C_WSA64.   This doesn't look correct to me.

https://github.com/llvm/llvm-project/pull/133799
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to