[libcxx-commits] [PATCH] D93922: Mangle `__alignof__` differently than `alignof`.

James Y Knight via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jan 14 09:17:57 PST 2021

jyknight added inline comments.

Comment at: clang/lib/AST/ItaniumMangle.cpp:4009
+    // mangling. Previously, it used a special-cased nonstandard extension.
+    if (Context.getASTContext().getLangOpts().getClangABICompat() >=
+        LangOptions::ClangABI::Ver11) {
ldionne wrote:
> Please forgive my ignorance, but when left unspecified, what does the Clang ABI compatibility flag default to? I'm sure you've thought about it already, but I'm trying to understand whether that is an ABI break for people compiling without specifying the Clang ABI compatibility version (which is most users).
It defaults to the latest version of clang (usually; some vendors pin it to an old version). Yes, it is theoretically an ABI break -- but one which is extremely unlikely to cause trouble in any real code.

This is in line with other similar C++ ABI breaks we make in Clang.

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list