[llvm] [z/OS][GOFF] Implement support for writing ESD + TXT records by the GOFFObjectWriter (PR #85851)

via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 25 12:30:48 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 0081ec11d86f34982ac5b1df4f53943a92d5223f 7cfcd12891ae0a92120803801fa83fb1df6f8e2c -- llvm/include/llvm/BinaryFormat/GOFF.h llvm/include/llvm/CodeGen/AsmPrinter.h llvm/include/llvm/MC/MCAssembler.h llvm/include/llvm/MC/MCContext.h llvm/include/llvm/MC/MCGOFFStreamer.h llvm/include/llvm/MC/MCSymbolGOFF.h llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp llvm/lib/MC/GOFFObjectWriter.cpp llvm/lib/MC/MCGOFFStreamer.cpp llvm/lib/MC/MCObjectFileInfo.cpp llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCExpr.cpp llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCExpr.h llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp llvm/lib/Target/SystemZ/SystemZAsmPrinter.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/MC/GOFFObjectWriter.cpp b/llvm/lib/MC/GOFFObjectWriter.cpp
index f20d4f07d3..981ed12d4a 100644
--- a/llvm/lib/MC/GOFFObjectWriter.cpp
+++ b/llvm/lib/MC/GOFFObjectWriter.cpp
@@ -371,7 +371,9 @@ private:
   GOFFSymbol createGOFFSymbol(StringRef Name, GOFF::ESDSymbolType Type,
                               uint32_t ParentEsdId);
   GOFFSymbol createSDSymbol(StringRef Name);
-  GOFFSymbol createEDSymbol(StringRef Name, uint32_t ParentEsdId, GOFF::ESDAlignment Alignment = GOFF::ESD_ALIGN_Doubleword);
+  GOFFSymbol
+  createEDSymbol(StringRef Name, uint32_t ParentEsdId,
+                 GOFF::ESDAlignment Alignment = GOFF::ESD_ALIGN_Doubleword);
   GOFFSymbol createLDSymbol(StringRef Name, uint32_t ParentEsdId);
   GOFFSymbol createERSymbol(StringRef Name, uint32_t ParentEsdId,
                             const MCSymbolGOFF *Source = nullptr);
@@ -390,7 +392,6 @@ private:
                                   const MCAsmLayout &Layout);
   void writeSymbolDeclaredInModule(const MCSymbolGOFF &Symbol, MCAssembler &Asm,
                                    const MCAsmLayout &Layout);
-
 };
 } // end anonymous namespace
 
@@ -949,8 +950,7 @@ void GOFFObjectWriter::writeSectionSymbols(MCAssembler &Asm,
       GOFFSection GoffSec = GOFFSection(ED.EsdId, 0, 0);
       SectionMap.insert(std::make_pair(&Section, GoffSec));
     } else if (Section.getName().equals(".ada")) {
-      GOFFSection GoffSec = GOFFSection(
-          ADAPREsdId, ADAPREsdId, RootSD.EsdId);
+      GOFFSection GoffSec = GOFFSection(ADAPREsdId, ADAPREsdId, RootSD.EsdId);
       SectionMap.insert(std::make_pair(&Section, GoffSec));
     } else if (Kind.isBSS() || Kind.isData() || Kind.isThreadData()) {
       // We handle this with the symbol definition, so there is no need to do

``````````

</details>


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


More information about the llvm-commits mailing list