[PATCH] D120382: [Mangler] Mangle aliases to fastcall/vectorcall functions correctly
Amanieu d'Antras via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 25 14:11:12 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG54b909de682b: [Mangler] Mangle aliases to fastcall/vectorcall functions correctly (authored by Amanieu).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120382/new/
https://reviews.llvm.org/D120382
Files:
llvm/lib/IR/Mangler.cpp
llvm/test/CodeGen/X86/fastcall-correct-mangling.ll
Index: llvm/test/CodeGen/X86/fastcall-correct-mangling.ll
===================================================================
--- llvm/test/CodeGen/X86/fastcall-correct-mangling.ll
+++ llvm/test/CodeGen/X86/fastcall-correct-mangling.ll
@@ -31,3 +31,7 @@
; CHECK64-LABEL: {{^}}.LdontCrash:
ret void
}
+
+ at alias = alias void(i64, i8, i8, i16), void(i64, i8, i8, i16)* @func
+; CHECK32-LABEL: {{^}}.set @alias at 20, @func at 20
+; CHECK64-LABEL: {{^}}.set alias, func
Index: llvm/lib/IR/Mangler.cpp
===================================================================
--- llvm/lib/IR/Mangler.cpp
+++ llvm/lib/IR/Mangler.cpp
@@ -144,7 +144,7 @@
// Mangle functions with Microsoft calling conventions specially. Only do
// this mangling for x86_64 vectorcall and 32-bit x86.
- const Function *MSFunc = dyn_cast<Function>(GV);
+ const Function *MSFunc = dyn_cast_or_null<Function>(GV->getAliaseeObject());
// Don't add byte count suffixes when '\01' or '?' are in the first
// character.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120382.411523.patch
Type: text/x-patch
Size: 1000 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220225/bf75ce38/attachment.bin>
More information about the llvm-commits
mailing list