[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)
Ulrich Weigand via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Apr 7 12:06:36 PDT 2025
================
@@ -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
More information about the llvm-branch-commits
mailing list