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

Peter Smith via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Feb 20 09:15:31 PST 2024


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

I can see a design trade-off here. By implementing only the expressions that are supported on Arm we find some problems earlier, however we may miss out on generic expressions added to the `MCSymbolRefExpr::getVariantKindForName` but not for Arm. I can see these getting out of sync.

Would it be worth calling the MCSymbolRefExpr::getVariantKindForName if the Name isn't found? Ideally we could refactor so that MCSymbolRefExpr::getVariantKindForName contains only generic and no target specific variant kinds.



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


More information about the llvm-branch-commits mailing list