[Shims] Include SwiftShims headers without ../

This replaces a number of `#include`-s like this:
```
#include "../../../stdlib/public/SwiftShims/Visibility.h"
```
with this:
```
#include "swift/shims/Visibility.h"
```

This is needed to allow SwiftCompilerSources to use C++ headers which include SwiftShims headers. Currently trying to do that results in errors:
```
swift/swift/include/swift/Demangling/../../../stdlib/public/SwiftShims/module.modulemap:1:8: error: redefinition of module 'SwiftShims'
module SwiftShims {
       ^
Builds.noindex/swift/swift/bootstrapping0/lib/swift/shims/module.modulemap:1:8: note: previously defined here
module SwiftShims {
       ^
```
This happens because the headers in both the source dir and the build dir refer to SwiftShims headers by relative path, and both the source root and the build root contain SwiftShims headers (which are equivalent, but since they are located in different dirs, Clang treats them as different modules).
This commit is contained in:
Egor Zhdan
2022-07-24 20:15:00 +01:00
parent 435af14e8e
commit 84a1ffcb33
99 changed files with 84 additions and 82 deletions

View File

@@ -22,7 +22,7 @@
#include "swift/Runtime/Debug.h"
#endif
#include "SwiftShims/UnicodeData.h"
#include "swift/shims/UnicodeData.h"
#include <limits>
SWIFT_RUNTIME_STDLIB_INTERNAL