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

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 19 13:05:10 PDT 2020


mstorsjo added inline comments.


================
Comment at: clang/lib/CodeGen/CGCall.cpp:238
+  if (D->hasAttr<DarwinABIAttr>())
+    return IsDarwin ? CC_C : CC_AArch64Darwin;
+
----------------
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.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89490



More information about the llvm-commits mailing list