mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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:
@@ -735,6 +735,7 @@ get_filename_component(SWIFT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} REALPATH)
|
||||
set(SWIFT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
set(SWIFT_CMAKE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
|
||||
set(SWIFT_MAIN_INCLUDE_DIR "${SWIFT_SOURCE_DIR}/include")
|
||||
set(SWIFT_SHIMS_INCLUDE_DIR "${SWIFT_SOURCE_DIR}/stdlib/public/SwiftShims")
|
||||
set(SWIFT_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/include")
|
||||
|
||||
set(SWIFT_RUNTIME_OUTPUT_INTDIR "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin")
|
||||
@@ -785,6 +786,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
include_directories(BEFORE
|
||||
${SWIFT_MAIN_INCLUDE_DIR}
|
||||
${SWIFT_INCLUDE_DIR}
|
||||
${SWIFT_SHIMS_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
# Configuration flags passed to all of our invocations of gyb. Try to
|
||||
|
||||
@@ -10,7 +10,7 @@ set(SWIFT_CONFIG_EXPORTS ${SWIFT_EXPORTS} ${SWIFT_BUILDTREE_EXPORTS})
|
||||
export(TARGETS ${SWIFT_CONFIG_EXPORTS} FILE ${SWIFT_EXPORTS_FILE})
|
||||
|
||||
|
||||
set(SWIFT_INCLUDE_DIRS ${SWIFT_INCLUDE_DIR} ${SWIFT_MAIN_INCLUDE_DIR})
|
||||
set(SWIFT_INCLUDE_DIRS ${SWIFT_INCLUDE_DIR} ${SWIFT_MAIN_INCLUDE_DIR} ${SWIFT_SHIMS_INCLUDE_DIR})
|
||||
set(SWIFT_LIBRARY_DIRS ${SWIFT_LIBRARY_OUTPUT_INTDIR})
|
||||
|
||||
configure_file(
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
#ifndef SWIFT_ABI_HEAPOBJECT_H
|
||||
#define SWIFT_ABI_HEAPOBJECT_H
|
||||
|
||||
#include "../../../stdlib/public/SwiftShims/HeapObject.h"
|
||||
#include "swift/shims/HeapObject.h"
|
||||
|
||||
#endif // SWIFT_ABI_HEAPOBJECT_H
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <cassert>
|
||||
#include "../../../stdlib/public/SwiftShims/KeyPath.h"
|
||||
#include "swift/shims/KeyPath.h"
|
||||
|
||||
namespace swift {
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "swift/Demangling/Demangle.h"
|
||||
#include "swift/Demangling/ManglingMacros.h"
|
||||
#include "swift/Basic/Unreachable.h"
|
||||
#include "../../../stdlib/public/SwiftShims/HeapObject.h"
|
||||
#include "swift/shims/HeapObject.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/Support/Casting.h"
|
||||
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
#ifndef SWIFT_ABI_SYSTEM_H
|
||||
#define SWIFT_ABI_SYSTEM_H
|
||||
|
||||
#include "../../../stdlib/public/SwiftShims/System.h"
|
||||
#include "swift/shims/System.h"
|
||||
|
||||
#endif // SWIFT_ABI_SYSTEM_H
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
#ifndef SWIFT_DEMANGLING_ERRORS_H
|
||||
#define SWIFT_DEMANGLING_ERRORS_H
|
||||
|
||||
#include "../../../stdlib/public/SwiftShims/Visibility.h"
|
||||
#include "swift/Demangling/NamespaceMacros.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
#include <inttypes.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ extern uintptr_t __COMPATIBILITY_LIBRARIES_CANNOT_CHECK_THE_IS_SWIFT_BIT_DIRECTL
|
||||
#endif
|
||||
|
||||
// Bring in visibility attribute macros
|
||||
#include "../../../stdlib/public/SwiftShims/Visibility.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
|
||||
// Define mappings for calling conventions.
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "swift/Runtime/Config.h"
|
||||
#include "../../../stdlib/public/SwiftShims/Visibility.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
|
||||
namespace swift {
|
||||
// Allocate plain old memory. This is the generalized entry point
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
#endif // SWIFT_OBJC_INTEROP
|
||||
|
||||
// Bring in the definition of HeapObject
|
||||
#include "../../../stdlib/public/SwiftShims/HeapObject.h"
|
||||
#include "../../../stdlib/public/SwiftShims/Visibility.h"
|
||||
#include "swift/shims/HeapObject.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
|
||||
namespace swift {
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "swift/ABI/Metadata.h"
|
||||
#include "swift/Reflection/Records.h"
|
||||
#include "swift/Runtime/Once.h"
|
||||
#include "../../../stdlib/public/SwiftShims/Visibility.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
|
||||
namespace swift {
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#if SWIFT_HAVE_CRASHREPORTERCLIENT
|
||||
|
||||
// For SWIFT_LIBRARY_VISIBILITY
|
||||
#include "../../stdlib/public/SwiftShims/Visibility.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#include <Availability.h>
|
||||
#include <TargetConditionals.h>
|
||||
#include "../public/SwiftShims/Visibility.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
|
||||
#define RPATH_INSTALL_NAME_DIRECTIVE_IMPL2(name, major, minor) \
|
||||
SWIFT_RUNTIME_EXPORT const char install_name_ ## major ## _ ## minor \
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "swift/Basic/Compiler.h"
|
||||
|
||||
#include "../SwiftShims/Visibility.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
#include <cstdarg>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
|
||||
@@ -62,7 +62,7 @@ if(CXX_SUPPORTS_EXIT_TIME_DESTRUCTORS_WARNING)
|
||||
"-Werror=exit-time-destructors")
|
||||
endif()
|
||||
|
||||
add_subdirectory(SwiftShims)
|
||||
add_subdirectory(SwiftShims/swift/shims)
|
||||
add_subdirectory(CommandLineSupport)
|
||||
add_subdirectory(Threading)
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
|
||||
#include "swift/Runtime/Debug.h"
|
||||
|
||||
#include "../SwiftShims/GlobalObjects.h"
|
||||
#include "../SwiftShims/RuntimeStubs.h"
|
||||
#include "../SwiftShims/Visibility.h"
|
||||
#include "swift/shims/GlobalObjects.h"
|
||||
#include "swift/shims/RuntimeStubs.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "swift/Basic/Compiler.h"
|
||||
|
||||
#include "../SwiftShims/Visibility.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
#include <cstdarg>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include <Availability.h>
|
||||
#include <TargetConditionals.h>
|
||||
#include "../../SwiftShims/Visibility.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
|
||||
#define RPATH_INSTALL_NAME_DIRECTIVE_IMPL2(name, major, minor) \
|
||||
SWIFT_RUNTIME_EXPORT const char install_name_ ## major ## _ ## minor \
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "../SwiftShims/Visibility.h"
|
||||
#include "Private.h"
|
||||
#include "SwiftHashableSupport.h"
|
||||
#include "SwiftValue.h"
|
||||
@@ -20,6 +19,7 @@
|
||||
#include "swift/Runtime/Config.h"
|
||||
#include "swift/Runtime/Debug.h"
|
||||
#include "swift/Runtime/HeapObject.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
|
||||
#include <new>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "swift/Runtime/Debug.h"
|
||||
#include "swift/Runtime/EnvironmentVariables.h"
|
||||
#include "swift/Threading/Once.h"
|
||||
#include "../SwiftShims/RuntimeShims.h"
|
||||
#include "swift/shims/RuntimeShims.h"
|
||||
#include <stdint.h>
|
||||
|
||||
// If this is an Apple OS, use the Apple binary compatibility rules
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
|
||||
#include "swift/Runtime/Casting.h"
|
||||
#include "../CompatibilityOverride/CompatibilityOverride.h"
|
||||
#include "../SwiftShims/GlobalObjects.h"
|
||||
#include "../SwiftShims/RuntimeShims.h"
|
||||
#include "ErrorObject.h"
|
||||
#include "ExistentialMetadataImpl.h"
|
||||
#include "Private.h"
|
||||
@@ -32,6 +30,8 @@
|
||||
#include "swift/Runtime/ExistentialContainer.h"
|
||||
#include "swift/Runtime/HeapObject.h"
|
||||
#include "swift/Runtime/Metadata.h"
|
||||
#include "swift/shims/GlobalObjects.h"
|
||||
#include "swift/shims/RuntimeShims.h"
|
||||
#include "swift/Threading/Mutex.h"
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/ADT/PointerIntPair.h"
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#endif
|
||||
|
||||
#include "swift/Runtime/Exclusivity.h"
|
||||
#include "../SwiftShims/Visibility.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
#include "SwiftTLSContext.h"
|
||||
#include "swift/Basic/Lazy.h"
|
||||
#include "swift/Runtime/Config.h"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#if (defined(__ANDROID__) && defined(__ARM_ARCH_7A__) && defined(__ARM_EABI__)) || \
|
||||
((defined(__i386__) || defined(__i686__) || defined(__x86_64__)) && !defined(__APPLE__))
|
||||
|
||||
#include "../SwiftShims/Visibility.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
|
||||
static unsigned toEncoding(float f) {
|
||||
unsigned e;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "swift/Runtime/Heap.h"
|
||||
#include "Private.h"
|
||||
#include "swift/Runtime/Debug.h"
|
||||
#include "../SwiftShims/RuntimeShims.h"
|
||||
#include "swift/shims/RuntimeShims.h"
|
||||
#include <algorithm>
|
||||
#include <stdlib.h>
|
||||
#if defined(__APPLE__) && SWIFT_STDLIB_HAS_DARWIN_LIBMALLOC
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#include "WeakReference.h"
|
||||
#include "swift/Runtime/Debug.h"
|
||||
#include "swift/Runtime/InstrumentsSupport.h"
|
||||
#include "swift/shims/GlobalObjects.h"
|
||||
#include "swift/shims/RuntimeShims.h"
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
@@ -33,8 +35,6 @@
|
||||
#include <cstdlib>
|
||||
#include <new>
|
||||
#include <thread>
|
||||
#include "../SwiftShims/GlobalObjects.h"
|
||||
#include "../SwiftShims/RuntimeShims.h"
|
||||
#if SWIFT_OBJC_INTEROP
|
||||
# include <objc/NSObject.h>
|
||||
# include <objc/runtime.h>
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
#if !defined(__MACH__)
|
||||
|
||||
#include "../SwiftShims/Visibility.h"
|
||||
#include "../SwiftShims/MetadataSections.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
#include "swift/shims/MetadataSections.h"
|
||||
#include "ImageInspection.h"
|
||||
#include "swift/Basic/Lazy.h"
|
||||
#include "swift/Runtime/Concurrent.h"
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#define SWIFT_REFLECTION_METADATA_ELF_NOTE_MAGIC_STRING "swift_reflection_metadata_magic_string"
|
||||
#endif // defined(__ELF__)
|
||||
|
||||
#include "../SwiftShims/Visibility.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#if defined(__ELF__)
|
||||
|
||||
#include "../SwiftShims/MetadataSections.h"
|
||||
#include "swift/shims/MetadataSections.h"
|
||||
#include "ImageInspection.h"
|
||||
#include <dlfcn.h>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#if defined(__wasm__)
|
||||
|
||||
#include "../SwiftShims/MetadataSections.h"
|
||||
#include "swift/shims/MetadataSections.h"
|
||||
#include "ImageInspection.h"
|
||||
|
||||
using namespace swift;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
#if SWIFT_RUNTIME_ENABLE_LEAK_CHECKER
|
||||
|
||||
#include "../SwiftShims/Visibility.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
|
||||
#include "swift/Runtime/Config.h"
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "swift/Runtime/Metadata.h"
|
||||
#include "swift/Threading/Mutex.h"
|
||||
|
||||
#include "../SwiftShims/Visibility.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
|
||||
#include "llvm/ADT/Hashing.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "swift/Demangling/TypeLookupError.h"
|
||||
#include "swift/Runtime/Config.h"
|
||||
#include "swift/Runtime/Metadata.h"
|
||||
#include "../SwiftShims/Visibility.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
|
||||
#if defined(__APPLE__) && __has_include(<TargetConditionals.h>)
|
||||
#include <TargetConditionals.h>
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
#ifdef SWIFT_ENABLE_REFLECTION
|
||||
|
||||
#include "../SwiftShims/Reflection.h"
|
||||
#include "ImageInspection.h"
|
||||
#include "Private.h"
|
||||
#include "WeakReference.h"
|
||||
@@ -27,6 +26,7 @@
|
||||
#include "swift/Runtime/Metadata.h"
|
||||
#include "swift/Runtime/Portability.h"
|
||||
#include "swift/Runtime/Reflection.h"
|
||||
#include "swift/shims/Reflection.h"
|
||||
#include <cassert>
|
||||
#include <cinttypes>
|
||||
#include <cstdio>
|
||||
|
||||
@@ -34,8 +34,8 @@
|
||||
#include "swift/Runtime/ObjCBridge.h"
|
||||
#include "swift/Runtime/Portability.h"
|
||||
#include "swift/Strings.h"
|
||||
#include "../SwiftShims/RuntimeShims.h"
|
||||
#include "../SwiftShims/AssertionReporting.h"
|
||||
#include "swift/shims/RuntimeShims.h"
|
||||
#include "swift/shims/AssertionReporting.h"
|
||||
#include "../CompatibilityOverride/CompatibilityOverride.h"
|
||||
#include "ErrorObject.h"
|
||||
#include "Private.h"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "ImageInspectionCommon.h"
|
||||
#include "../SwiftShims/MetadataSections.h"
|
||||
#include "swift/shims/MetadataSections.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <new>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "ImageInspectionCommon.h"
|
||||
#include "../SwiftShims/MetadataSections.h"
|
||||
#include "swift/shims/MetadataSections.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <new>
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
#ifndef SWIFT_RUNTIME_WEAKREFERENCE_H
|
||||
#define SWIFT_RUNTIME_WEAKREFERENCE_H
|
||||
|
||||
#include "../../../stdlib/public/SwiftShims/Target.h"
|
||||
#include "../SwiftShims/Visibility.h"
|
||||
#include "swift/shims/Target.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
#include "swift/Runtime/Config.h"
|
||||
#include "swift/Runtime/HeapObject.h"
|
||||
#include "swift/Runtime/Metadata.h"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "swift/Runtime/Config.h"
|
||||
#include "swift/Runtime/Debug.h"
|
||||
#include "swift/Runtime/Portability.h"
|
||||
#include "SwiftShims/AssertionReporting.h"
|
||||
#include "swift/shims/AssertionReporting.h"
|
||||
#include <cstdarg>
|
||||
#include <cstdint>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
#if SWIFT_OBJC_INTEROP && defined(SWIFT_RUNTIME_OS_VERSIONING)
|
||||
#include "swift/Basic/Lazy.h"
|
||||
#include "swift/Runtime/Debug.h"
|
||||
#include "swift/shims/FoundationShims.h"
|
||||
#include <TargetConditionals.h>
|
||||
#include "SwiftShims/FoundationShims.h"
|
||||
|
||||
struct os_system_version_s {
|
||||
unsigned int major;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#if SWIFT_OBJC_INTEROP
|
||||
#import <CoreFoundation/CoreFoundation.h>
|
||||
#include "SwiftShims/CoreFoundationShims.h"
|
||||
#include "swift/shims/CoreFoundationShims.h"
|
||||
#import <objc/runtime.h>
|
||||
#include "swift/Runtime/Once.h"
|
||||
#include <dlfcn.h>
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "SwiftShims/GlobalObjects.h"
|
||||
#include "SwiftShims/Random.h"
|
||||
#include "swift/shims/GlobalObjects.h"
|
||||
#include "swift/shims/Random.h"
|
||||
#include "swift/Runtime/Metadata.h"
|
||||
#include "swift/Runtime/Debug.h"
|
||||
#include "swift/Runtime/EnvironmentVariables.h"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "SwiftShims/LibcShims.h"
|
||||
#include "swift/shims/LibcShims.h"
|
||||
|
||||
#if defined(_WIN32)
|
||||
static void __attribute__((__constructor__))
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "SwiftShims/Visibility.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
|
||||
#include <climits>
|
||||
#include <cstdlib>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "SwiftShims/Random.h"
|
||||
#include "swift/shims/Random.h"
|
||||
#include "swift/Runtime/Debug.h"
|
||||
#include "swift/Threading/Mutex.h"
|
||||
|
||||
|
||||
@@ -70,9 +70,9 @@
|
||||
|
||||
#include "swift/Threading/Thread.h"
|
||||
|
||||
#include "SwiftShims/LibcShims.h"
|
||||
#include "SwiftShims/RuntimeShims.h"
|
||||
#include "SwiftShims/RuntimeStubs.h"
|
||||
#include "swift/shims/LibcShims.h"
|
||||
#include "swift/shims/RuntimeShims.h"
|
||||
#include "swift/shims/RuntimeStubs.h"
|
||||
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "SwiftShims/ThreadLocalStorage.h"
|
||||
#include "swift/shims/ThreadLocalStorage.h"
|
||||
#include "swift/Runtime/Debug.h"
|
||||
#include "swift/Threading/ThreadLocalStorage.h"
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifndef NORMALIZATION_DATA_H
|
||||
#define NORMALIZATION_DATA_H
|
||||
|
||||
#include "SwiftShims/SwiftStdint.h"
|
||||
#include "swift/shims/SwiftStdint.h"
|
||||
|
||||
static const __swift_uint16_t _swift_stdlib_normData_data[66] = {
|
||||
0x4, 0x358, 0xA0, 0x50, 0x6C0, 0x44, 0x80, 0x48, 0x720, 0x3, 0x733, 0x88, 0xC8, 0x3C, 0xD0, 0xF0,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifndef SCALAR_PROP_DATA_H
|
||||
#define SCALAR_PROP_DATA_H
|
||||
|
||||
#include "SwiftShims/SwiftStdint.h"
|
||||
#include "swift/shims/SwiftStdint.h"
|
||||
|
||||
#define BIN_PROPS_COUNT 4874
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifndef CASE_DATA_H
|
||||
#define CASE_DATA_H
|
||||
|
||||
#include "SwiftShims/SwiftStdint.h"
|
||||
#include "swift/shims/SwiftStdint.h"
|
||||
|
||||
#define CASE_FOLD_LEVEL_COUNT 11
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifndef GRAPHEME_DATA_H
|
||||
#define GRAPHEME_DATA_H
|
||||
|
||||
#include "SwiftShims/SwiftStdint.h"
|
||||
#include "swift/shims/SwiftStdint.h"
|
||||
|
||||
#define GRAPHEME_BREAK_DATA_COUNT 621
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifndef NORMALIZATION_DATA_H
|
||||
#define NORMALIZATION_DATA_H
|
||||
|
||||
#include "SwiftShims/SwiftStdint.h"
|
||||
#include "swift/shims/SwiftStdint.h"
|
||||
|
||||
static const __swift_uint16_t _swift_stdlib_normData_data[66] = {
|
||||
0x110, 0x70, 0x3B0, 0x8, 0x750, 0x78, 0x6C4, 0x410, 0x6E0, 0x60, 0x734, 0x784,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifndef SCALAR_PROP_DATA_H
|
||||
#define SCALAR_PROP_DATA_H
|
||||
|
||||
#include "SwiftShims/SwiftStdint.h"
|
||||
#include "swift/shims/SwiftStdint.h"
|
||||
|
||||
#define BIN_PROPS_COUNT 4855
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifndef SCRIPT_DATA_H
|
||||
#define SCRIPT_DATA_H
|
||||
|
||||
#include "SwiftShims/SwiftStdint.h"
|
||||
#include "swift/shims/SwiftStdint.h"
|
||||
|
||||
#define SCRIPTS_COUNT 1639
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#ifndef WORD_DATA_H
|
||||
#define WORD_DATA_H
|
||||
|
||||
#include "SwiftShims/SwiftStdint.h"
|
||||
#include "swift/shims/SwiftStdint.h"
|
||||
|
||||
static const __swift_uint32_t _swift_stdlib_words[1100] = {
|
||||
0x200020, 0x20002C, 0x20002E, 0x1400030, 0x20003A, 0x20003B, 0x3400041, 0x20005F, 0x3400061,
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "SwiftShims/UnicodeData.h"
|
||||
#include "swift/shims/UnicodeData.h"
|
||||
#include <limits>
|
||||
|
||||
// Every 4 byte chunks of data that we need to hash (in this case only ever
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#else
|
||||
#include "swift/Runtime/Debug.h"
|
||||
#endif
|
||||
#include "SwiftShims/UnicodeData.h"
|
||||
#include "swift/shims/UnicodeData.h"
|
||||
#include <limits>
|
||||
|
||||
SWIFT_RUNTIME_STDLIB_INTERNAL
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "swift/Runtime/Debug.h"
|
||||
#endif
|
||||
|
||||
#include "SwiftShims/UnicodeData.h"
|
||||
#include "swift/shims/UnicodeData.h"
|
||||
#include <limits>
|
||||
|
||||
SWIFT_RUNTIME_STDLIB_INTERNAL
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#else
|
||||
#include "swift/Runtime/Debug.h"
|
||||
#endif
|
||||
#include "SwiftShims/UnicodeData.h"
|
||||
#include "swift/shims/UnicodeData.h"
|
||||
#include <limits>
|
||||
|
||||
SWIFT_RUNTIME_STDLIB_INTERNAL
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#ifndef SWIFT_CONCURRENCY_ERROR_BACKDEPLOY56_H
|
||||
#define SWIFT_CONCURRENCY_ERROR_BACKDEPLOY56_H
|
||||
|
||||
#include "public/SwiftShims/Visibility.h"
|
||||
#include "swift/shims/Visibility.h"
|
||||
#include <cstdint>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %clang -c -v %target-cc-options %target-threading-opt -g -O0 -isysroot %sdk %S/Inputs/isPrespecialized.cpp -o %t/isPrespecialized.o -I %clang-include-dir -I %swift_src_root/include/ -I %llvm_src_root/include -I %llvm_obj_root/include -L %clang-include-dir/../lib/swift/macosx
|
||||
// RUN: %clang -c -v %target-cc-options %target-threading-opt -g -O0 -isysroot %sdk %S/Inputs/isPrespecialized.cpp -o %t/isPrespecialized.o -I %clang-include-dir -I %swift_src_root/include/ -I %swift_src_root/stdlib/public/SwiftShims/ -I %llvm_src_root/include -I %llvm_obj_root/include -L %clang-include-dir/../lib/swift/macosx
|
||||
|
||||
// RUN: %target-build-swift -v %mcp_opt %s %t/isPrespecialized.o -import-objc-header %S/Inputs/isPrespecialized.h -Xfrontend -prespecialize-generic-metadata -target %module-target-future -lc++ -L %clang-include-dir/../lib/swift/macosx -sdk %sdk -o %t/main
|
||||
// RUN: %target-codesign %t/main
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %clang -c -v %target-cc-options %target-threading-opt -g -O0 -isysroot %sdk %S/Inputs/extraDataFields.cpp -o %t/extraDataFields.o -I %clang-include-dir -I %swift_src_root/include/ -I %llvm_src_root/include -I %llvm_obj_root/include -L %clang-include-dir/../lib/swift/macosx
|
||||
// RUN: %clang -c -v %target-cc-options %target-threading-opt -g -O0 -isysroot %sdk %S/Inputs/extraDataFields.cpp -o %t/extraDataFields.o -I %clang-include-dir -I %swift_src_root/include/ -I %swift_src_root/stdlib/public/SwiftShims/ -I %llvm_src_root/include -I %llvm_obj_root/include -L %clang-include-dir/../lib/swift/macosx
|
||||
|
||||
// RUN: %target-build-swift -c %S/Inputs/enum-extra-data-fields.swift -emit-library -emit-module -enable-library-evolution -module-name ExtraDataFieldsNoTrailingFlags -target %module-target-future -Xfrontend -disable-generic-metadata-prespecialization -emit-module-path %t/ExtraDataFieldsNoTrailingFlags.swiftmodule -o %t/%target-library-name(ExtraDataFieldsNoTrailingFlags)
|
||||
// RUN: %target-build-swift -c %S/Inputs/enum-extra-data-fields.swift -emit-library -emit-module -enable-library-evolution -module-name ExtraDataFieldsTrailingFlags -target %module-target-future -Xfrontend -prespecialize-generic-metadata -emit-module-path %t/ExtraDataFieldsTrailingFlags.swiftmodule -o %t/%target-library-name(ExtraDataFieldsTrailingFlags)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %clang -c -v %target-cc-options %target-threading-opt -g -O0 -isysroot %sdk %S/Inputs/isPrespecialized.cpp -o %t/isPrespecialized.o -I %clang-include-dir -I %swift_src_root/include/ -I %llvm_src_root/include -I %llvm_obj_root/include -L %clang-include-dir/../lib/swift/macosx
|
||||
// RUN: %clang -c -v %target-cc-options %target-threading-opt -g -O0 -isysroot %sdk %S/Inputs/isPrespecialized.cpp -o %t/isPrespecialized.o -I %clang-include-dir -I %swift_src_root/include/ -I %swift_src_root/stdlib/public/SwiftShims/ -I %llvm_src_root/include -I %llvm_obj_root/include -L %clang-include-dir/../lib/swift/macosx
|
||||
|
||||
// RUN: %target-build-swift -v %mcp_opt %s %t/isPrespecialized.o -import-objc-header %S/Inputs/isPrespecialized.h -Xfrontend -prespecialize-generic-metadata -target %module-target-future -lc++ -L %clang-include-dir/../lib/swift/macosx -sdk %sdk -o %t/main
|
||||
// RUN: %target-codesign %t/main
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %clang -c -v %target-cc-options %target-threading-opt -g -O0 -isysroot %sdk %S/Inputs/extraDataFields.cpp -o %t/extraDataFields.o -I %clang-include-dir -I %swift_src_root/include/ -I %llvm_src_root/include -I %llvm_obj_root/include -L %clang-include-dir/../lib/swift/macosx -I %swift_obj_root/include
|
||||
// RUN: %clang -c -v %target-cc-options %target-threading-opt -g -O0 -isysroot %sdk %S/Inputs/extraDataFields.cpp -o %t/extraDataFields.o -I %clang-include-dir -I %swift_src_root/include/ -I %swift_src_root/stdlib/public/SwiftShims/ -I %llvm_src_root/include -I %llvm_obj_root/include -L %clang-include-dir/../lib/swift/macosx -I %swift_obj_root/include
|
||||
|
||||
// RUN: %target-build-swift -c %S/Inputs/struct-extra-data-fields.swift -emit-library -emit-module -module-name ExtraDataFieldsNoTrailingFlags -target %module-target-future -Xfrontend -disable-generic-metadata-prespecialization -emit-module-path %t/ExtraDataFieldsNoTrailingFlags.swiftmodule -o %t/%target-library-name(ExtraDataFieldsNoTrailingFlags)
|
||||
// RUN: %target-build-swift -c %S/Inputs/struct-extra-data-fields.swift -emit-library -emit-module -module-name ExtraDataFieldsTrailingFlags -target %module-target-future -Xfrontend -prespecialize-generic-metadata -emit-module-path %t/ExtraDataFieldsTrailingFlags.swiftmodule -o %t/%target-library-name(ExtraDataFieldsTrailingFlags)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
// RUN: %target-build-swift -c %s -DCONFORMANCE_2 -emit-library -emit-module -module-name Conformance2 -target %module-target-future -Xfrontend -prespecialize-generic-metadata -emit-module-path %t/Conformance2.swiftmodule -o %t/%target-library-name(Conformance2) -lBase -I %t -L %t
|
||||
// RUN: %target-build-swift -c %s -DGENERIC -emit-library -emit-module -module-name Generic -target %module-target-future -Xfrontend -prespecialize-generic-metadata -emit-module-path %t/Generic.swiftmodule -o %t/%target-library-name(Generic) -lBase -lConformance1 -I %t -L %t
|
||||
// RUN: %target-build-swift -c %s -DERASE -emit-library -emit-module -module-name Erase -target %module-target-future -Xfrontend -prespecialize-generic-metadata -emit-module-path %t/Erase.swiftmodule -o %t/%target-library-name(Erase) -lBase -lConformance2 -I %t -L %t
|
||||
// RUN: %clang -c -v %target-cc-options %target-threading-opt -g -O0 -isysroot %sdk %S/Inputs/isPrespecialized.cpp -o %t/isPrespecialized.o -I %clang-include-dir -I %swift_src_root/include/ -I %llvm_src_root/include -I %llvm_obj_root/include -L %clang-include-dir/../lib/swift/macosx
|
||||
// RUN: %clang -c -v %target-cc-options %target-threading-opt -g -O0 -isysroot %sdk %S/Inputs/isPrespecialized.cpp -o %t/isPrespecialized.o -I %clang-include-dir -I %swift_src_root/include/ -I %swift_src_root/stdlib/public/SwiftShims/ -I %llvm_src_root/include -I %llvm_obj_root/include -L %clang-include-dir/../lib/swift/macosx
|
||||
// RUN: %target-build-swift %s %S/Inputs/main.swift %S/Inputs/consume-logging-metadata-value.swift %t/isPrespecialized.o -import-objc-header %S/Inputs/isPrespecialized.h -DMAIN -target %module-target-future -Xfrontend -prespecialize-generic-metadata -lBase -lConformance1 -lConformance2 -lGeneric -lErase -lc++ -I %t -L %t -L %clang-include-dir/../lib/swift/macosx -o %t/main
|
||||
|
||||
// RUN: %target-codesign %t/main
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %clang -c -v %target-cc-options %target-threading-opt -g -O0 -isysroot %sdk %S/Inputs/isPrespecialized.cpp -o %t/isPrespecialized.o -I %clang-include-dir -I %swift_src_root/include/ -I %llvm_src_root/include -I %llvm_obj_root/include -L %clang-include-dir/../lib/swift/macosx
|
||||
// RUN: %clang -c -v %target-cc-options %target-threading-opt -g -O0 -isysroot %sdk %S/Inputs/isPrespecialized.cpp -o %t/isPrespecialized.o -I %clang-include-dir -I %swift_src_root/include/ -I %swift_src_root/stdlib/public/SwiftShims/ -I %llvm_src_root/include -I %llvm_obj_root/include -L %clang-include-dir/../lib/swift/macosx
|
||||
|
||||
// RUN: %target-build-swift %S/Inputs/struct-public-nonfrozen-1argument.swift -emit-module -emit-library -module-name Module -Xfrontend -prespecialize-generic-metadata -target %module-target-future -emit-module-path %t/Module.swiftmodule -o %t/%target-library-name(Module)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %clang -c -v %target-cc-options %target-threading-opt -g -O0 -isysroot %sdk %S/Inputs/isPrespecialized.cpp -o %t/isPrespecialized.o -I %clang-include-dir -I %swift_src_root/include/ -I %llvm_src_root/include -I %llvm_obj_root/include -L %clang-include-dir/../lib/swift/macosx
|
||||
// RUN: %clang -c -v %target-cc-options %target-threading-opt -g -O0 -isysroot %sdk %S/Inputs/isPrespecialized.cpp -o %t/isPrespecialized.o -I %clang-include-dir -I %swift_src_root/include/ -I %swift_src_root/stdlib/public/SwiftShims/ -I %llvm_src_root/include -I %llvm_obj_root/include -L %clang-include-dir/../lib/swift/macosx
|
||||
|
||||
// RUN: %target-build-swift -v %mcp_opt %s %t/isPrespecialized.o -import-objc-header %S/Inputs/isPrespecialized.h -Xfrontend -prespecialize-generic-metadata -target %module-target-future -lc++ -L %clang-include-dir/../lib/swift/macosx -sdk %sdk -o %t/main
|
||||
// RUN: %target-codesign %t/main
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: %target-clang -std=c++14 %target-threading-opt %target-rtti-opt %target-pic-opt %target-msvc-runtime-opt -DSWIFT_INLINE_NAMESPACE=__runtime -g -c %S/Inputs/RoundTrip/RoundTrip.cpp -I%swift_obj_root/include -I%swift_src_root/include -I%swift_src_root/stdlib/include -I%swift_src_root/stdlib/public/runtime -I%llvm_src_root/include -I%llvm_obj_root/include -o %t/RoundTrip.o
|
||||
// RUN: %target-clang -std=c++14 %target-threading-opt %target-rtti-opt %target-pic-opt %target-msvc-runtime-opt -DSWIFT_INLINE_NAMESPACE=__runtime -g -c %S/Inputs/RoundTrip/RoundTrip.cpp -I%swift_obj_root/include -I%swift_src_root/include -I%swift_src_root/stdlib/include -I%swift_src_root/stdlib/public/runtime -I %swift_src_root/stdlib/public/SwiftShims/ -I%llvm_src_root/include -I%llvm_obj_root/include -o %t/RoundTrip.o
|
||||
// RUN: %target-build-swift -g -static -emit-module-path %t/RoundTrip.swiftmodule -emit-module -emit-library -module-name RoundTrip -o %t/%target-static-library-name(RoundTrip) %S/Inputs/RoundTrip/RoundTrip.swift %t/RoundTrip.o
|
||||
// RUN: echo "// AUTOGENERATED" > %t/all-tests.swift
|
||||
// RUN: for module in %S/Inputs/testcases/*.swift; do modname=$(basename $module .swift); echo "import $modname" >> %t/all-tests.swift; done
|
||||
|
||||
@@ -16,5 +16,5 @@
|
||||
#ifndef GRAPHEME_DATA_H
|
||||
#define GRAPHEME_DATA_H
|
||||
|
||||
#include "../SwiftShims/SwiftStdint.h"
|
||||
#include "swift/shims/SwiftStdint.h"
|
||||
|
||||
|
||||
@@ -16,5 +16,5 @@
|
||||
#ifndef NORMALIZATION_DATA_H
|
||||
#define NORMALIZATION_DATA_H
|
||||
|
||||
#include "../SwiftShims/SwiftStdint.h"
|
||||
#include "swift/shims/SwiftStdint.h"
|
||||
|
||||
|
||||
@@ -16,5 +16,5 @@
|
||||
#ifndef SCALAR_PROP_DATA_H
|
||||
#define SCALAR_PROP_DATA_H
|
||||
|
||||
#include "../SwiftShims/SwiftStdint.h"
|
||||
#include "swift/shims/SwiftStdint.h"
|
||||
|
||||
|
||||
@@ -243,7 +243,7 @@ func emitLargestNameCount(_ names: [(UInt32, String)], into result: inout String
|
||||
}
|
||||
|
||||
print("""
|
||||
Please copy and paste the following into 'stdlib/public/SwiftShims/UnicodeData.h':
|
||||
Please copy and paste the following into 'stdlib/public/SwiftShims/swift/shims/UnicodeData.h':
|
||||
|
||||
#define SWIFT_STDLIB_LARGEST_NAME_COUNT \(largestCount)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user