swift
0510d820 - [Shims] Move `Visibility.h` under Swift include path

Commit
3 years ago
[Shims] Move `Visibility.h` under Swift include path I am trying to remove more of the SILBridging logic and switch SwiftCompilerSources/SIL to C++ interop. When importing the `SIL/SILInstruction.h` C++ header into Swift, we end up with duplicate module definition for SwiftShims: ``` /Volumes/Projects/swift/swift/include/swift/Demangling/../../../stdlib/public/SwiftShims/module.modulemap:1:8: error: redefinition of module 'SwiftShims' module SwiftShims { ^ /Users/egorzh/Builds.noindex/swift/swift/bootstrapping0/lib/swift/shims/module.modulemap:1:8: note: previously defined here module SwiftShims { ^ ``` One of the modules comes from the Swift project sources, and another one from the just-built shims. This happens because `SILInstruction.h` transitively includes `SwiftShims/Visibility.h`, adding another include path that points to SwiftShims from the Swift sources. To prevent that, let's move the header from SwiftShims to `include/swift/Basic` and introduce a trivial `SwiftShims/Visibility.h` header for compatibility.
Author
Committer
Parents
  • include/swift
    • Basic
      • File
        Visibility.h
    • Demangling
      • File
        Errors.h
    • Runtime
      • File
        Config.h
      • File
        Heap.h
      • File
        HeapObject.h
      • File
        Metadata.h
  • lib/Demangling
    • File
      CrashReporter.h
  • stdlib/public
    • BackDeployConcurrency
      • File
        Error.h
    • CommandLineSupport
      • File
        CommandLine.cpp
    • Concurrency
      • File
        Error.h
    • SwiftShims
      • File
        Visibility.h
    • runtime
      • File
        AnyHashableSupport.cpp
      • File
        Exclusivity.cpp
      • File
        MetadataCache.h
      • File
        Private.h
      • File
        WeakReference.h