mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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).
127 lines
4.8 KiB
C
127 lines
4.8 KiB
C
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2021 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef SWIFT_STDLIB_SHIMS_UNICODEDATA_H
|
|
#define SWIFT_STDLIB_SHIMS_UNICODEDATA_H
|
|
|
|
#include "SwiftStdbool.h"
|
|
#include "SwiftStdint.h"
|
|
#include "Visibility.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define SWIFT_STDLIB_LARGEST_NAME_COUNT 88
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// Utilities
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
__swift_intptr_t _swift_stdlib_getMphIdx(__swift_uint32_t scalar,
|
|
__swift_intptr_t levels,
|
|
const __swift_uint64_t * const *keys,
|
|
const __swift_uint16_t * const *ranks,
|
|
const __swift_uint16_t * const sizes);
|
|
|
|
__swift_intptr_t _swift_stdlib_getScalarBitArrayIdx(__swift_uint32_t scalar,
|
|
const __swift_uint64_t *bitArrays,
|
|
const __swift_uint16_t *ranks);
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// Normalization
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
__swift_uint16_t _swift_stdlib_getNormData(__swift_uint32_t scalar);
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
const __swift_uint8_t * const _swift_stdlib_nfd_decompositions;
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
__swift_uint32_t _swift_stdlib_getDecompositionEntry(__swift_uint32_t scalar);
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
__swift_uint32_t _swift_stdlib_getComposition(__swift_uint32_t x,
|
|
__swift_uint32_t y);
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// Grapheme Breaking
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
__swift_uint8_t _swift_stdlib_getGraphemeBreakProperty(__swift_uint32_t scalar);
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
__swift_bool _swift_stdlib_isLinkingConsonant(__swift_uint32_t scalar);
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// Word Breaking
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
__swift_uint8_t _swift_stdlib_getWordBreakProperty(__swift_uint32_t scalar);
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// Unicode.Scalar.Properties
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
__swift_uint64_t _swift_stdlib_getBinaryProperties(__swift_uint32_t scalar);
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
__swift_uint8_t _swift_stdlib_getNumericType(__swift_uint32_t scalar);
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
double _swift_stdlib_getNumericValue(__swift_uint32_t scalar);
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
const char *_swift_stdlib_getNameAlias(__swift_uint32_t scalar);
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
__swift_int32_t _swift_stdlib_getMapping(__swift_uint32_t scalar,
|
|
__swift_uint8_t mapping);
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
const __swift_uint8_t *_swift_stdlib_getSpecialMapping(__swift_uint32_t scalar,
|
|
__swift_uint8_t mapping,
|
|
__swift_intptr_t *length);
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
__swift_intptr_t _swift_stdlib_getScalarName(__swift_uint32_t scalar,
|
|
__swift_uint8_t *buffer,
|
|
__swift_intptr_t capacity);
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
__swift_uint16_t _swift_stdlib_getAge(__swift_uint32_t scalar);
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
__swift_uint8_t _swift_stdlib_getGeneralCategory(__swift_uint32_t scalar);
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
__swift_uint8_t _swift_stdlib_getScript(__swift_uint32_t scalar);
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
const __swift_uint8_t *_swift_stdlib_getScriptExtensions(
|
|
__swift_uint32_t scalar,
|
|
__swift_uint8_t *count);
|
|
|
|
SWIFT_RUNTIME_STDLIB_INTERNAL
|
|
void _swift_stdlib_getCaseMapping(__swift_uint32_t scalar,
|
|
__swift_uint32_t *buffer);
|
|
|
|
#ifdef __cplusplus
|
|
} // extern "C"
|
|
#endif
|
|
|
|
#endif // SWIFT_STDLIB_SHIMS_UNICODEDATA_H
|