[clang] [clang] UEFI ABI fixes for X86_64 (PR #124992)
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 4 11:28:02 PST 2025
================
@@ -74,7 +74,7 @@ static CCMangling getCallingConvMangling(const ASTContext &Context,
if (FD->isMain() && FD->getNumParams() == 2)
return CCM_WasmMainArgcArgv;
- if (!Triple.isOSWindows() || !Triple.isX86())
+ if (!Triple.isOSWindowsOrUEFI() || !Triple.isX86())
----------------
rnk wrote:
To make things more complicated, consider mingw. I am totally unfamiliar to UEFI, but it seems like folks want it to inherit lots of MSVC ABI features: the mangling scheme, the vftable ABI rules, the struct layout, etc. These rules are usually conditional on `isWindowsMSVCEnvironment()`, so you'd need to audit those conditions.
While explicit triple checks are convenient and necessary in many cases, we generally try to abstract these details with the various CXXABI interfaces, and if you can find a way to do that, it may help with readability.
https://github.com/llvm/llvm-project/pull/124992
More information about the cfe-commits
mailing list