Skip to content

Commit 5a824de

Browse files
authored
Merge pull request #1426 from swiftwasm/master
[pull] swiftwasm from master
2 parents d495229 + bfc63de commit 5a824de

File tree

110 files changed

+3710
-3440
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+3710
-3440
lines changed

include/swift/ABI/MetadataValues.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,6 +1118,9 @@ namespace SpecialPointerAuthDiscriminators {
11181118
/// Runtime function variables exported by the runtime.
11191119
const uint16_t RuntimeFunctionEntry = 0x625b;
11201120

1121+
/// Protocol conformance descriptors.
1122+
const uint16_t ProtocolConformanceDescriptor = 0xc6eb;
1123+
11211124
/// Value witness functions.
11221125
const uint16_t InitializeBufferWithCopyOfBuffer = 0xda4a;
11231126
const uint16_t Destroy = 0x04f8;

include/swift/AST/ASTTypeIDZone.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ SWIFT_TYPEID_NAMED(ConstructorDecl *, ConstructorDecl)
4040
SWIFT_TYPEID_NAMED(CustomAttr *, CustomAttr)
4141
SWIFT_TYPEID_NAMED(Decl *, Decl)
4242
SWIFT_TYPEID_NAMED(EnumDecl *, EnumDecl)
43+
SWIFT_TYPEID_NAMED(FuncDecl *, FuncDecl)
4344
SWIFT_TYPEID_NAMED(GenericParamList *, GenericParamList)
4445
SWIFT_TYPEID_NAMED(GenericTypeParamType *, GenericTypeParamType)
4546
SWIFT_TYPEID_NAMED(InfixOperatorDecl *, InfixOperatorDecl)

include/swift/AST/ASTTypeIDs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class ConstructorDecl;
3030
class CustomAttr;
3131
class Decl;
3232
class EnumDecl;
33+
class FuncDecl;
3334
enum class FunctionBuilderBodyPreCheck : uint8_t;
3435
class GenericParamList;
3536
class GenericSignature;

include/swift/AST/DiagnosticsDriver.def

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,10 @@ ERROR(cannot_find_migration_script, none,
186186
ERROR(error_darwin_static_stdlib_not_supported, none,
187187
"-static-stdlib is no longer supported on Apple platforms", ())
188188

189+
ERROR(error_darwin_only_supports_libcxx, none,
190+
"The only C++ standard library supported on Apple platforms is libc++",
191+
())
192+
189193
WARNING(warn_drv_darwin_sdk_invalid_settings, none,
190194
"SDK settings were ignored because 'SDKSettings.json' could not be parsed",
191195
())

include/swift/AST/IRGenOptions.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ struct PointerAuthOptions : clang::PointerAuthOptions {
123123
/// Type descriptor data pointers when passed as arguments.
124124
PointerAuthSchema TypeDescriptorsAsArguments;
125125

126+
/// Protocol conformance descriptors.
127+
PointerAuthSchema ProtocolConformanceDescriptors;
128+
129+
/// Protocol conformance descriptors when passed as arguments.
130+
PointerAuthSchema ProtocolConformanceDescriptorsAsArguments;
131+
126132
/// Resumption functions from yield-once coroutines.
127133
PointerAuthSchema YieldOnceResumeFunctions;
128134

include/swift/AST/PlatformKinds.def

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
AVAILABILITY_PLATFORM(iOS, "iOS")
2626
AVAILABILITY_PLATFORM(tvOS, "tvOS")
2727
AVAILABILITY_PLATFORM(watchOS, "watchOS")
28-
AVAILABILITY_PLATFORM(OSX, "macOS")
28+
AVAILABILITY_PLATFORM(macOS, "macOS")
2929
AVAILABILITY_PLATFORM(iOSApplicationExtension, "application extensions for iOS")
3030
AVAILABILITY_PLATFORM(tvOSApplicationExtension, "application extensions for tvOS")
3131
AVAILABILITY_PLATFORM(watchOSApplicationExtension, "application extensions for watchOS")
32-
AVAILABILITY_PLATFORM(OSXApplicationExtension, "application extensions for macOS")
32+
AVAILABILITY_PLATFORM(macOSApplicationExtension, "application extensions for macOS")
3333
AVAILABILITY_PLATFORM(macCatalyst, "Mac Catalyst")
3434
AVAILABILITY_PLATFORM(macCatalystApplicationExtension, "application extensions for Mac Catalyst")
3535

include/swift/AST/TypeCheckRequests.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2564,6 +2564,23 @@ class CustomAttrTypeRequest
25642564
void cacheResult(Type value) const;
25652565
};
25662566

2567+
class SynthesizeMainFunctionRequest
2568+
: public SimpleRequest<SynthesizeMainFunctionRequest,
2569+
FuncDecl *(Decl *),
2570+
RequestFlags::Cached> {
2571+
public:
2572+
using SimpleRequest::SimpleRequest;
2573+
2574+
private:
2575+
friend SimpleRequest;
2576+
2577+
// Evaluation.
2578+
FuncDecl *evaluate(Evaluator &evaluator, Decl *) const;
2579+
2580+
public:
2581+
bool isCached() const { return true; }
2582+
};
2583+
25672584
// Allow AnyValue to compare two Type values, even though Type doesn't
25682585
// support ==.
25692586
template<>

include/swift/AST/TypeCheckerTypeIDZone.def

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,3 +274,5 @@ SWIFT_REQUEST(TypeChecker, LookupAllConformancesInContextRequest,
274274
Uncached, NoLocationInfo)
275275
SWIFT_REQUEST(TypeChecker, SimpleDidSetRequest,
276276
bool(AccessorDecl *), Cached, NoLocationInfo)
277+
SWIFT_REQUEST(TypeChecker, SynthesizeMainFunctionRequest,
278+
FuncDecl *(Decl *), Cached, NoLocationInfo)

include/swift/Driver/Compilation.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ namespace driver {
5656
enum class OutputLevel {
5757
/// Indicates that normal output should be produced.
5858
Normal,
59-
59+
6060
/// Indicates that only jobs should be printed and not run. (-###)
6161
PrintJobs,
6262

@@ -83,7 +83,7 @@ class Compilation {
8383
const bool &EnableIncrementalBuild;
8484
const bool EnableSourceRangeDependencies;
8585

86-
/// If not empty, the path to use to log the comparision.
86+
/// If not empty, the path to use to log the comparison.
8787
const StringRef CompareIncrementalSchemesPath;
8888

8989
const unsigned SwiftInputCount;

include/swift/Driver/ToolChain.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ class ToolChain {
294294
void getClangLibraryPath(const llvm::opt::ArgList &Args,
295295
SmallString<128> &LibPath) const;
296296

297+
// Returns the Clang driver executable to use for linking.
298+
const char *getClangLinkerDriver(const llvm::opt::ArgList &Args) const;
299+
297300
/// Returns the name the clang library for a given sanitizer would have on
298301
/// the current toolchain.
299302
///

0 commit comments

Comments
 (0)