[llvm] [AArch64] Transition from MCSymbolRefExpr::VariantKind constants (PR #133214)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 3 09:06:35 PDT 2025


================
@@ -117,13 +117,9 @@ unsigned AArch64ELFObjectWriter::getRelocType(MCContext &Ctx,
   bool IsNC = AArch64MCExpr::isNotChecked(RefKind);
 
   assert((!Target.getSymA() ||
-          Target.getSymA()->getKind() == MCSymbolRefExpr::VK_None ||
-          Target.getSymA()->getKind() == MCSymbolRefExpr::VK_PLT ||
-          Target.getSymA()->getKind() == MCSymbolRefExpr::VK_GOTPCREL) &&
-         "Should only be expression-level modifiers here");
-
-  assert((!Target.getSymB() ||
----------------
smithp35 wrote:

This assert has been removed. I would expect it to be writeable using getSpecifier like this
```
assert((!Target.getSymB() || getSpecifier(Target.getSymB()) == AArch64MCExpr::None &&
"Should only be expression-level modifiers here");
```

Is there another reason why this isn't necessary that I'm missing.

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


More information about the llvm-commits mailing list