[llvm] [llvm][SystemZ] Recognize `@GOTENT` modifier in assembler. (PR #107038)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 2 18:47:41 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 0ba006daf5d9f10017ba15b4287c272912a34d73 5379a26fbf2bc5692687d9b6040da7dca87454c3 --extensions h,cpp -- llvm/include/llvm/MC/MCExpr.h llvm/lib/MC/MCExpr.cpp llvm/lib/Target/SystemZ/MCTargetDesc/SystemZELFObjectWriter.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/MC/MCExpr.cpp b/llvm/lib/MC/MCExpr.cpp
index f04f6e8533..c9d5f6580f 100644
--- a/llvm/lib/MC/MCExpr.cpp
+++ b/llvm/lib/MC/MCExpr.cpp
@@ -405,138 +405,138 @@ StringRef MCSymbolRefExpr::getVariantKindName(VariantKind Kind) {
MCSymbolRefExpr::VariantKind
MCSymbolRefExpr::getVariantKindForName(StringRef Name) {
return StringSwitch<VariantKind>(Name.lower())
- .Case("dtprel", VK_DTPREL)
- .Case("dtpoff", VK_DTPOFF)
- .Case("got", VK_GOT)
- .Case("gotent", VK_GOTENT)
- .Case("gotoff", VK_GOTOFF)
- .Case("gotrel", VK_GOTREL)
- .Case("pcrel", VK_PCREL)
- .Case("gotpcrel", VK_GOTPCREL)
- .Case("gotpcrel_norelax", VK_GOTPCREL_NORELAX)
- .Case("gottpoff", VK_GOTTPOFF)
- .Case("indntpoff", VK_INDNTPOFF)
- .Case("ntpoff", VK_NTPOFF)
- .Case("gotntpoff", VK_GOTNTPOFF)
- .Case("plt", VK_PLT)
- .Case("tlscall", VK_TLSCALL)
- .Case("tlsdesc", VK_TLSDESC)
- .Case("tlsgd", VK_TLSGD)
- .Case("tlsld", VK_TLSLD)
- .Case("tlsldm", VK_TLSLDM)
- .Case("tpoff", VK_TPOFF)
- .Case("tprel", VK_TPREL)
- .Case("tlvp", VK_TLVP)
- .Case("tlvppage", VK_TLVPPAGE)
- .Case("tlvppageoff", VK_TLVPPAGEOFF)
- .Case("page", VK_PAGE)
- .Case("pageoff", VK_PAGEOFF)
- .Case("gotpage", VK_GOTPAGE)
- .Case("gotpageoff", VK_GOTPAGEOFF)
- .Case("imgrel", VK_COFF_IMGREL32)
- .Case("secrel32", VK_SECREL)
- .Case("size", VK_SIZE)
- .Case("abs8", VK_X86_ABS8)
- .Case("pltoff", VK_X86_PLTOFF)
- .Case("l", VK_PPC_LO)
- .Case("h", VK_PPC_HI)
- .Case("ha", VK_PPC_HA)
- .Case("high", VK_PPC_HIGH)
- .Case("higha", VK_PPC_HIGHA)
- .Case("higher", VK_PPC_HIGHER)
- .Case("highera", VK_PPC_HIGHERA)
- .Case("highest", VK_PPC_HIGHEST)
- .Case("highesta", VK_PPC_HIGHESTA)
- .Case("got at l", VK_PPC_GOT_LO)
- .Case("got at h", VK_PPC_GOT_HI)
- .Case("got at ha", VK_PPC_GOT_HA)
- .Case("local", VK_PPC_LOCAL)
- .Case("tocbase", VK_PPC_TOCBASE)
- .Case("toc", VK_PPC_TOC)
- .Case("toc at l", VK_PPC_TOC_LO)
- .Case("toc at h", VK_PPC_TOC_HI)
- .Case("toc at ha", VK_PPC_TOC_HA)
- .Case("u", VK_PPC_U)
- .Case("l", VK_PPC_L)
- .Case("tls", VK_PPC_TLS)
- .Case("dtpmod", VK_PPC_DTPMOD)
- .Case("tprel at l", VK_PPC_TPREL_LO)
- .Case("tprel at h", VK_PPC_TPREL_HI)
- .Case("tprel at ha", VK_PPC_TPREL_HA)
- .Case("tprel at high", VK_PPC_TPREL_HIGH)
- .Case("tprel at higha", VK_PPC_TPREL_HIGHA)
- .Case("tprel at higher", VK_PPC_TPREL_HIGHER)
- .Case("tprel at highera", VK_PPC_TPREL_HIGHERA)
- .Case("tprel at highest", VK_PPC_TPREL_HIGHEST)
- .Case("tprel at highesta", VK_PPC_TPREL_HIGHESTA)
- .Case("dtprel at l", VK_PPC_DTPREL_LO)
- .Case("dtprel at h", VK_PPC_DTPREL_HI)
- .Case("dtprel at ha", VK_PPC_DTPREL_HA)
- .Case("dtprel at high", VK_PPC_DTPREL_HIGH)
- .Case("dtprel at higha", VK_PPC_DTPREL_HIGHA)
- .Case("dtprel at higher", VK_PPC_DTPREL_HIGHER)
- .Case("dtprel at highera", VK_PPC_DTPREL_HIGHERA)
- .Case("dtprel at highest", VK_PPC_DTPREL_HIGHEST)
- .Case("dtprel at highesta", VK_PPC_DTPREL_HIGHESTA)
- .Case("got at tprel", VK_PPC_GOT_TPREL)
- .Case("got at tprel@l", VK_PPC_GOT_TPREL_LO)
- .Case("got at tprel@h", VK_PPC_GOT_TPREL_HI)
- .Case("got at tprel@ha", VK_PPC_GOT_TPREL_HA)
- .Case("got at dtprel", VK_PPC_GOT_DTPREL)
- .Case("got at dtprel@l", VK_PPC_GOT_DTPREL_LO)
- .Case("got at dtprel@h", VK_PPC_GOT_DTPREL_HI)
- .Case("got at dtprel@ha", VK_PPC_GOT_DTPREL_HA)
- .Case("got at tlsgd", VK_PPC_GOT_TLSGD)
- .Case("got at tlsgd@l", VK_PPC_GOT_TLSGD_LO)
- .Case("got at tlsgd@h", VK_PPC_GOT_TLSGD_HI)
- .Case("got at tlsgd@ha", VK_PPC_GOT_TLSGD_HA)
- .Case("got at tlsld", VK_PPC_GOT_TLSLD)
- .Case("got at tlsld@l", VK_PPC_GOT_TLSLD_LO)
- .Case("got at tlsld@h", VK_PPC_GOT_TLSLD_HI)
- .Case("got at tlsld@ha", VK_PPC_GOT_TLSLD_HA)
- .Case("got at pcrel", VK_PPC_GOT_PCREL)
- .Case("got at tlsgd@pcrel", VK_PPC_GOT_TLSGD_PCREL)
- .Case("got at tlsld@pcrel", VK_PPC_GOT_TLSLD_PCREL)
- .Case("got at tprel@pcrel", VK_PPC_GOT_TPREL_PCREL)
- .Case("tls at pcrel", VK_PPC_TLS_PCREL)
- .Case("notoc", VK_PPC_NOTOC)
- .Case("gdgot", VK_Hexagon_GD_GOT)
- .Case("gdplt", VK_Hexagon_GD_PLT)
- .Case("iegot", VK_Hexagon_IE_GOT)
- .Case("ie", VK_Hexagon_IE)
- .Case("ldgot", VK_Hexagon_LD_GOT)
- .Case("ldplt", VK_Hexagon_LD_PLT)
- .Case("lo8", VK_AVR_LO8)
- .Case("hi8", VK_AVR_HI8)
- .Case("hlo8", VK_AVR_HLO8)
- .Case("typeindex", VK_WASM_TYPEINDEX)
- .Case("tbrel", VK_WASM_TBREL)
- .Case("mbrel", VK_WASM_MBREL)
- .Case("tlsrel", VK_WASM_TLSREL)
- .Case("got at tls", VK_WASM_GOT_TLS)
- .Case("funcindex", VK_WASM_FUNCINDEX)
- .Case("gotpcrel32 at lo", VK_AMDGPU_GOTPCREL32_LO)
- .Case("gotpcrel32 at hi", VK_AMDGPU_GOTPCREL32_HI)
- .Case("rel32 at lo", VK_AMDGPU_REL32_LO)
- .Case("rel32 at hi", VK_AMDGPU_REL32_HI)
- .Case("rel64", VK_AMDGPU_REL64)
- .Case("abs32 at lo", VK_AMDGPU_ABS32_LO)
- .Case("abs32 at hi", VK_AMDGPU_ABS32_HI)
- .Case("hi", VK_VE_HI32)
- .Case("lo", VK_VE_LO32)
- .Case("pc_hi", VK_VE_PC_HI32)
- .Case("pc_lo", VK_VE_PC_LO32)
- .Case("got_hi", VK_VE_GOT_HI32)
- .Case("got_lo", VK_VE_GOT_LO32)
- .Case("gotoff_hi", VK_VE_GOTOFF_HI32)
- .Case("gotoff_lo", VK_VE_GOTOFF_LO32)
- .Case("plt_hi", VK_VE_PLT_HI32)
- .Case("plt_lo", VK_VE_PLT_LO32)
- .Case("tls_gd_hi", VK_VE_TLS_GD_HI32)
- .Case("tls_gd_lo", VK_VE_TLS_GD_LO32)
- .Case("tpoff_hi", VK_VE_TPOFF_HI32)
- .Case("tpoff_lo", VK_VE_TPOFF_LO32)
- .Default(VK_Invalid);
+ .Case("dtprel", VK_DTPREL)
+ .Case("dtpoff", VK_DTPOFF)
+ .Case("got", VK_GOT)
+ .Case("gotent", VK_GOTENT)
+ .Case("gotoff", VK_GOTOFF)
+ .Case("gotrel", VK_GOTREL)
+ .Case("pcrel", VK_PCREL)
+ .Case("gotpcrel", VK_GOTPCREL)
+ .Case("gotpcrel_norelax", VK_GOTPCREL_NORELAX)
+ .Case("gottpoff", VK_GOTTPOFF)
+ .Case("indntpoff", VK_INDNTPOFF)
+ .Case("ntpoff", VK_NTPOFF)
+ .Case("gotntpoff", VK_GOTNTPOFF)
+ .Case("plt", VK_PLT)
+ .Case("tlscall", VK_TLSCALL)
+ .Case("tlsdesc", VK_TLSDESC)
+ .Case("tlsgd", VK_TLSGD)
+ .Case("tlsld", VK_TLSLD)
+ .Case("tlsldm", VK_TLSLDM)
+ .Case("tpoff", VK_TPOFF)
+ .Case("tprel", VK_TPREL)
+ .Case("tlvp", VK_TLVP)
+ .Case("tlvppage", VK_TLVPPAGE)
+ .Case("tlvppageoff", VK_TLVPPAGEOFF)
+ .Case("page", VK_PAGE)
+ .Case("pageoff", VK_PAGEOFF)
+ .Case("gotpage", VK_GOTPAGE)
+ .Case("gotpageoff", VK_GOTPAGEOFF)
+ .Case("imgrel", VK_COFF_IMGREL32)
+ .Case("secrel32", VK_SECREL)
+ .Case("size", VK_SIZE)
+ .Case("abs8", VK_X86_ABS8)
+ .Case("pltoff", VK_X86_PLTOFF)
+ .Case("l", VK_PPC_LO)
+ .Case("h", VK_PPC_HI)
+ .Case("ha", VK_PPC_HA)
+ .Case("high", VK_PPC_HIGH)
+ .Case("higha", VK_PPC_HIGHA)
+ .Case("higher", VK_PPC_HIGHER)
+ .Case("highera", VK_PPC_HIGHERA)
+ .Case("highest", VK_PPC_HIGHEST)
+ .Case("highesta", VK_PPC_HIGHESTA)
+ .Case("got at l", VK_PPC_GOT_LO)
+ .Case("got at h", VK_PPC_GOT_HI)
+ .Case("got at ha", VK_PPC_GOT_HA)
+ .Case("local", VK_PPC_LOCAL)
+ .Case("tocbase", VK_PPC_TOCBASE)
+ .Case("toc", VK_PPC_TOC)
+ .Case("toc at l", VK_PPC_TOC_LO)
+ .Case("toc at h", VK_PPC_TOC_HI)
+ .Case("toc at ha", VK_PPC_TOC_HA)
+ .Case("u", VK_PPC_U)
+ .Case("l", VK_PPC_L)
+ .Case("tls", VK_PPC_TLS)
+ .Case("dtpmod", VK_PPC_DTPMOD)
+ .Case("tprel at l", VK_PPC_TPREL_LO)
+ .Case("tprel at h", VK_PPC_TPREL_HI)
+ .Case("tprel at ha", VK_PPC_TPREL_HA)
+ .Case("tprel at high", VK_PPC_TPREL_HIGH)
+ .Case("tprel at higha", VK_PPC_TPREL_HIGHA)
+ .Case("tprel at higher", VK_PPC_TPREL_HIGHER)
+ .Case("tprel at highera", VK_PPC_TPREL_HIGHERA)
+ .Case("tprel at highest", VK_PPC_TPREL_HIGHEST)
+ .Case("tprel at highesta", VK_PPC_TPREL_HIGHESTA)
+ .Case("dtprel at l", VK_PPC_DTPREL_LO)
+ .Case("dtprel at h", VK_PPC_DTPREL_HI)
+ .Case("dtprel at ha", VK_PPC_DTPREL_HA)
+ .Case("dtprel at high", VK_PPC_DTPREL_HIGH)
+ .Case("dtprel at higha", VK_PPC_DTPREL_HIGHA)
+ .Case("dtprel at higher", VK_PPC_DTPREL_HIGHER)
+ .Case("dtprel at highera", VK_PPC_DTPREL_HIGHERA)
+ .Case("dtprel at highest", VK_PPC_DTPREL_HIGHEST)
+ .Case("dtprel at highesta", VK_PPC_DTPREL_HIGHESTA)
+ .Case("got at tprel", VK_PPC_GOT_TPREL)
+ .Case("got at tprel@l", VK_PPC_GOT_TPREL_LO)
+ .Case("got at tprel@h", VK_PPC_GOT_TPREL_HI)
+ .Case("got at tprel@ha", VK_PPC_GOT_TPREL_HA)
+ .Case("got at dtprel", VK_PPC_GOT_DTPREL)
+ .Case("got at dtprel@l", VK_PPC_GOT_DTPREL_LO)
+ .Case("got at dtprel@h", VK_PPC_GOT_DTPREL_HI)
+ .Case("got at dtprel@ha", VK_PPC_GOT_DTPREL_HA)
+ .Case("got at tlsgd", VK_PPC_GOT_TLSGD)
+ .Case("got at tlsgd@l", VK_PPC_GOT_TLSGD_LO)
+ .Case("got at tlsgd@h", VK_PPC_GOT_TLSGD_HI)
+ .Case("got at tlsgd@ha", VK_PPC_GOT_TLSGD_HA)
+ .Case("got at tlsld", VK_PPC_GOT_TLSLD)
+ .Case("got at tlsld@l", VK_PPC_GOT_TLSLD_LO)
+ .Case("got at tlsld@h", VK_PPC_GOT_TLSLD_HI)
+ .Case("got at tlsld@ha", VK_PPC_GOT_TLSLD_HA)
+ .Case("got at pcrel", VK_PPC_GOT_PCREL)
+ .Case("got at tlsgd@pcrel", VK_PPC_GOT_TLSGD_PCREL)
+ .Case("got at tlsld@pcrel", VK_PPC_GOT_TLSLD_PCREL)
+ .Case("got at tprel@pcrel", VK_PPC_GOT_TPREL_PCREL)
+ .Case("tls at pcrel", VK_PPC_TLS_PCREL)
+ .Case("notoc", VK_PPC_NOTOC)
+ .Case("gdgot", VK_Hexagon_GD_GOT)
+ .Case("gdplt", VK_Hexagon_GD_PLT)
+ .Case("iegot", VK_Hexagon_IE_GOT)
+ .Case("ie", VK_Hexagon_IE)
+ .Case("ldgot", VK_Hexagon_LD_GOT)
+ .Case("ldplt", VK_Hexagon_LD_PLT)
+ .Case("lo8", VK_AVR_LO8)
+ .Case("hi8", VK_AVR_HI8)
+ .Case("hlo8", VK_AVR_HLO8)
+ .Case("typeindex", VK_WASM_TYPEINDEX)
+ .Case("tbrel", VK_WASM_TBREL)
+ .Case("mbrel", VK_WASM_MBREL)
+ .Case("tlsrel", VK_WASM_TLSREL)
+ .Case("got at tls", VK_WASM_GOT_TLS)
+ .Case("funcindex", VK_WASM_FUNCINDEX)
+ .Case("gotpcrel32 at lo", VK_AMDGPU_GOTPCREL32_LO)
+ .Case("gotpcrel32 at hi", VK_AMDGPU_GOTPCREL32_HI)
+ .Case("rel32 at lo", VK_AMDGPU_REL32_LO)
+ .Case("rel32 at hi", VK_AMDGPU_REL32_HI)
+ .Case("rel64", VK_AMDGPU_REL64)
+ .Case("abs32 at lo", VK_AMDGPU_ABS32_LO)
+ .Case("abs32 at hi", VK_AMDGPU_ABS32_HI)
+ .Case("hi", VK_VE_HI32)
+ .Case("lo", VK_VE_LO32)
+ .Case("pc_hi", VK_VE_PC_HI32)
+ .Case("pc_lo", VK_VE_PC_LO32)
+ .Case("got_hi", VK_VE_GOT_HI32)
+ .Case("got_lo", VK_VE_GOT_LO32)
+ .Case("gotoff_hi", VK_VE_GOTOFF_HI32)
+ .Case("gotoff_lo", VK_VE_GOTOFF_LO32)
+ .Case("plt_hi", VK_VE_PLT_HI32)
+ .Case("plt_lo", VK_VE_PLT_LO32)
+ .Case("tls_gd_hi", VK_VE_TLS_GD_HI32)
+ .Case("tls_gd_lo", VK_VE_TLS_GD_LO32)
+ .Case("tpoff_hi", VK_VE_TPOFF_HI32)
+ .Case("tpoff_lo", VK_VE_TPOFF_LO32)
+ .Default(VK_Invalid);
}
/* *** */
``````````
</details>
https://github.com/llvm/llvm-project/pull/107038
More information about the llvm-commits
mailing list