[llvm-branch-commits] [ARM, MC] Support FDPIC relocations (PR #82187)

Fangrui Song via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Feb 20 10:41:10 PST 2024


================
@@ -11358,6 +11361,37 @@ bool ARMAsmParser::parseDirectiveARM(SMLoc L) {
   return false;
 }
 
+MCSymbolRefExpr::VariantKind
+ARMAsmParser::getVariantKindForName(StringRef Name) const {
----------------
MaskRay wrote:

> Ideally we could refactor so that MCSymbolRefExpr::getVariantKindForName contains only generic and no target specific variant kinds.

I agree with this. I believe that binutils doesn't have a generic operand modifier, so ideally `MCSymbolRefExpr::getVariantKindForName` should be a pure virtual function. Unfortunately, many architectures add arch-specific modifiers in this list. We should eventually move them to respective lib/Target/XXX files.

In this patch I am only focusing on the ARM specific operand modifiers.

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


More information about the llvm-branch-commits mailing list