[all-commits] [llvm/llvm-project] 9bb5ec: Sema: introduce `__attribute__((__swift_name__))`

Saleem Abdulrasool via All-commits all-commits at lists.llvm.org
Tue Sep 22 08:41:10 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9bb5ecf1f760e1b1fe4697189e4db99100baffad
      https://github.com/llvm/llvm-project/commit/9bb5ecf1f760e1b1fe4697189e4db99100baffad
  Author: Saleem Abdulrasool <compnerd at compnerd.org>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M clang/include/clang/Basic/Attr.td
    M clang/include/clang/Basic/AttrDocs.td
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaDeclAttr.cpp
    A clang/test/SemaObjC/attr-swift_name.m

  Log Message:
  -----------
  Sema: introduce `__attribute__((__swift_name__))`

This introduces the new `swift_name` attribute that allows annotating
APIs with an alternate spelling for Swift.  This is used as part of the
importing mechanism to allow interfaces to be imported with a new name
into Swift.  It takes a parameter which is the Swift function name.
This parameter is validated to check if it matches the possible
transformed signature in Swift.

This is based on the work of the original changes in
https://github.com/llvm/llvm-project-staging/commit/8afaf3aad2af43cfedca7a24cd817848c4e95c0c

Differential Revision: https://reviews.llvm.org/D87534
Reviewed By: Aaron Ballman, Dmitri Gribenko




More information about the All-commits mailing list