[llvm] [BOLT][AArch64] Support for pointer authentication (PR #117578)

Paschalis Mpeis via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 28 05:11:22 PST 2024


================
@@ -546,6 +548,27 @@ class MCPlusBuilder {
     return Analysis->isCall(Inst) || isTailCall(Inst);
   }
 
+  virtual std::optional<StringRef> getCalleeName(const MCInst &Inst) const {
+    assert(isCall(Inst));
+    if (MCPlus::getNumPrimeOperands(Inst) != 1 || !Inst.getOperand(0).isExpr())
+      return {};
+
+    const MCSymbol *CalleeSymbol = getTargetSymbol(Inst);
+    assert(CalleeSymbol != nullptr);
+    return CalleeSymbol->getName();
+  }
+
+  virtual bool isNoReturnCall(const MCInst &Inst) const {
+    if (!isCall(Inst))
+      return false;
+    auto calleeName = getCalleeName(Inst);
----------------
paschalis-mpeis wrote:

nit: start with uppercase

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


More information about the llvm-commits mailing list