[PATCH] D79525: [Sema] require -fcf-runtime-abi= for __NSConstantString

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 6 16:30:31 PDT 2020


nickdesaulniers created this revision.
nickdesaulniers added a reviewer: compnerd.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

commit 81a650ee87eb ("Driver,CodeGen: introduce support for Swift CFString layout")
r345222

added support for implicit typedefs for __NSConstantString, used for
the runtime ABI for CoreFoundation, which can be set via -fcf-runtime-abi=.

This implicit typdef pollutes the global namespace for code that's not
targeting CoreFoundation platforms. As such, require -fcf-runtime-abi=
to be used, and disallow the creation of the typedef for C code that
does not specify.

This is most visable dumping ASTs when debugging.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79525

Files:
  clang/lib/Sema/Sema.cpp
  clang/test/AST/ast-dump-file-line-json.c
  clang/test/AST/ast-dump-record-definition-data-json.cpp
  clang/test/AST/ast-dump-records-json.cpp
  clang/test/AST/ast-dump-template-decls-json.cpp
  clang/test/CodeGen/cf-runtime-abi.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79525.262495.patch
Type: text/x-patch
Size: 5643 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200506/e828709e/attachment-0001.bin>


More information about the cfe-commits mailing list