[llvm] [RISCV] Omit "@plt" in assembler output "call foo at plt" (PR #72467)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 15 20:58:28 PST 2023


================
@@ -2042,9 +2042,8 @@ ParseStatus RISCVAsmParser::parseCallSymbol(OperandVector &Operands) {
 
   SMLoc E = SMLoc::getFromPointer(S.getPointer() + Identifier.size());
 
-  RISCVMCExpr::VariantKind Kind = RISCVMCExpr::VK_RISCV_CALL;
-  if (Identifier.consume_back("@plt"))
-    Kind = RISCVMCExpr::VK_RISCV_CALL_PLT;
+  RISCVMCExpr::VariantKind Kind = RISCVMCExpr::VK_RISCV_CALL_PLT;
----------------
MaskRay wrote:

> We should be able to ditch VK_RISCV_CALL_PLT and only have a VK_RISCV_CALL that means @plt

This patch will make this possible. I am happy to remove either one as a follow-up (which will update very few tests).

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


More information about the llvm-commits mailing list