[llvm] [CodeGen][ARM64EC] Mangle EH personality handler names (PR #121652)
    Jacek Caban via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Feb  4 03:22:02 PST 2025
    
    
  
================
@@ -25,7 +26,14 @@ EHPersonality llvm::classifyEHPersonality(const Value *Pers) {
       Pers ? dyn_cast<GlobalValue>(Pers->stripPointerCasts()) : nullptr;
   if (!F || !F->getValueType() || !F->getValueType()->isFunctionTy())
     return EHPersonality::Unknown;
-  return StringSwitch<EHPersonality>(F->getName())
+
+  StringRef Name = F->getName();
+  if (Triple(F->getParent()->getTargetTriple()).isWindowsArm64EC()) {
+    // Demangle the personality name.
----------------
cjacek wrote:
This is a common code, so I think it would be nice to have a short description of ARM64EC mangling for readers unfamiliar with it. I would suggest something like:
```
// ARM64EC function symbols are mangled by prefixing them with "#".  
// Demangle them by skipping this prefix.  
```
https://github.com/llvm/llvm-project/pull/121652
    
    
More information about the llvm-commits
mailing list