[llvm] Move X86-specific MCSymbolRefExpr::VariantKind to X86MCExpr::Specifier (PR #132149)

Shengchen Kan via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 20 04:27:31 PDT 2025


================
@@ -31,6 +31,38 @@ class X86MCExpr : public MCTargetExpr {
   explicit X86MCExpr(MCRegister R) : Reg(R) {}
 
 public:
+  // Relocation specifier. Named VK_ for legacy reasons.
+  enum Specifier {
+    VK_None,
+
+    VK_ABS8 = MCSymbolRefExpr::FirstTargetSpecifier,
+    VK_DTPOFF,
+    VK_DTPREL,
+    VK_GOT,
+    VK_GOTENT,
+    VK_GOTNTPOFF,
+    VK_GOTOFF,
+    VK_GOTPCREL,
----------------
KanRobert wrote:

These are only for X86? I thought the specifier w/o "X86" is target-independent.

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


More information about the llvm-commits mailing list