[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:31:00 PST 2025


================
@@ -5193,12 +5193,12 @@ bool Sema::CheckCallingConvAttr(const ParsedAttr &Attrs, CallingConv &CC,
     CC = CC_X86RegCall;
     break;
   case ParsedAttr::AT_MSABI:
-    CC = Context.getTargetInfo().getTriple().isOSWindows() ? CC_C :
-                                                             CC_Win64;
+    CC = Context.getTargetInfo().getTriple().isOSWindowsOrUEFI() ? CC_C
----------------
rnk wrote:

I'm not sure your comment makes sense in the context of the `__attribute__((msabi))` implementation. I would interpret your suggestion instead as something like `getTargetInfo().getCcForMsAbiAttribute()`, and the target would return the appropriate convention.

I think in general this will only matter on Win / non-Win x64 platforms where we have divergence between the Win/Posix worlds, while the are aligned in the ARM world.

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


More information about the cfe-commits mailing list