swift
5f65a37a - [AutoDiff] Fix `@noDerivative` attributes in non-primary-files. (#29647)

Commit
5 years ago
[AutoDiff] Fix `@noDerivative` attributes in non-primary-files. (#29647) Previously, `@noDerivative` attribute type-checking generated implicit `@_semantics("autodiff.nonvarying")` attributes. However, attributes in non-primary-files are not type-checked, so `@noDerivative` attributes in non-primary-files are not processed. Now, all `@noDerivative` attributes are lowered to `[_semantics "autodiff.nonvarying"]` SIL function attributes. Resolves TF-1145.
Author
Parents
  • lib
    • SIL
      • File
        SILFunctionBuilder.cpp
    • Sema
      • File
        TypeCheckAttr.cpp
  • test/AutoDiff/downstream
    • Inputs
      • File
        noderivative_attr_other_file.swift
    • File
      derived_differentiable.swift
    • File
      noderivative_attr.swift
    • File
      noderivative_attr_cross_file.swift