[llvm-branch-commits] [llvm] [GOFF] Add writing of text records (PR #137235)

Kai Nacke via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue May 6 12:07:19 PDT 2025


================
@@ -688,28 +689,32 @@ MCSectionGOFF *MCContext::getGOFFSection(SectionKind Kind, StringRef Name,
     return Iter->second;
 
   StringRef CachedName = StringRef(Iter->first.c_str(), Name.size());
-  MCSectionGOFF *GOFFSection = new (GOFFAllocator.Allocate()) MCSectionGOFF(
-      CachedName, Kind, Attributes, static_cast<MCSectionGOFF *>(Parent));
+  MCSectionGOFF *GOFFSection = new (GOFFAllocator.Allocate())
+      MCSectionGOFF(CachedName, Kind, IsVirtual, Attributes,
+                    static_cast<MCSectionGOFF *>(Parent));
   Iter->second = GOFFSection;
   allocInitialFragment(*GOFFSection);
   return GOFFSection;
 }
 
 MCSectionGOFF *MCContext::getGOFFSection(SectionKind Kind, StringRef Name,
                                          GOFF::SDAttr SDAttributes) {
-  return getGOFFSection<GOFF::SDAttr>(Kind, Name, SDAttributes, nullptr);
+  return getGOFFSection<GOFF::SDAttr>(Kind, Name, SDAttributes, nullptr,
+                                      /*IsVirtual=*/true);
 }
 
 MCSectionGOFF *MCContext::getGOFFSection(SectionKind Kind, StringRef Name,
                                          GOFF::EDAttr EDAttributes,
-                                         MCSection *Parent) {
-  return getGOFFSection<GOFF::EDAttr>(Kind, Name, EDAttributes, Parent);
+                                         MCSection *Parent, bool IsVirtual) {
+  return getGOFFSection<GOFF::EDAttr>(Kind, Name, EDAttributes, Parent,
+                                      IsVirtual);
----------------
redstar wrote:

Good point, changed.

https://github.com/llvm/llvm-project/pull/137235


More information about the llvm-branch-commits mailing list