[PATCH] D89490: Introduce __attribute__((darwin_abi))

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 20 11:54:05 PDT 2020


aaron.ballman added inline comments.


================
Comment at: clang/lib/CodeGen/CGCall.cpp:238
+  if (D->hasAttr<DarwinABIAttr>())
+    return IsDarwin ? CC_C : CC_AArch64Darwin;
+
----------------
mstorsjo wrote:
> aaron.ballman wrote:
> > Can you help me understand this change a bit better? If the declaration uses the Darwin ABI and the platform is Darwin, you want to use the cdecl convention?
> This (here and in the other similar places) matches the existing logic for the `ms_abi` attribute; if you're on a platform where the attribute selects what already is the default (what `CC_C` implies on this platform), we just use that instead of the more explicit calling convention.
Ahhhh, thank you for the clarification, that makes sense now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89490/new/

https://reviews.llvm.org/D89490



More information about the cfe-commits mailing list