[llvm] [CodeGen][ARM64EC] Mangle EH personality handler names (PR #121652)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 8 15:35:36 PST 2025


================
@@ -807,6 +807,17 @@ bool AArch64Arm64ECCallLowering::runOnModule(Module &Mod) {
   SetVector<GlobalAlias *> PatchableFns;
 
   for (Function &F : Mod) {
+    if (F.hasPersonalityFn()) {
+      GlobalValue *PersFn =
+          cast<GlobalValue>(F.getPersonalityFn()->stripPointerCasts());
+      if (PersFn->getValueType() && PersFn->getValueType()->isFunctionTy()) {
+        if (std::optional<std::string> MangledName =
+                getArm64ECMangledFunctionName(PersFn->getName().str())) {
+          PersFn->setName(MangledName.value());
----------------
efriedma-quic wrote:

Do we need to do something here to emit the relevant weak_anti_dep directives?

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


More information about the llvm-commits mailing list