Merge pull request #16697 from aschwaighofer/yet_more_codesigning
diff --git a/lib/AST/GenericSignatureBuilder.cpp b/lib/AST/GenericSignatureBuilder.cpp
index 89a9baf..8b69e36 100644
--- a/lib/AST/GenericSignatureBuilder.cpp
+++ b/lib/AST/GenericSignatureBuilder.cpp
@@ -1775,7 +1775,7 @@
bool FloatingRequirementSource::isRecursive(
Type rootType,
GenericSignatureBuilder &builder) const {
- llvm::SmallSet<std::pair<CanType, ProtocolDecl *>, 4> visitedAssocReqs;
+ llvm::SmallSet<std::pair<CanType, ProtocolDecl *>, 32> visitedAssocReqs;
for (auto storedSource = storage.dyn_cast<const RequirementSource *>();
storedSource; storedSource = storedSource->parent) {
// FIXME: isRecursive() is completely misnamed
diff --git a/lib/Basic/Statistic.cpp b/lib/Basic/Statistic.cpp
index 35fceb3..78bcdeb 100644
--- a/lib/Basic/Statistic.cpp
+++ b/lib/Basic/Statistic.cpp
@@ -621,7 +621,7 @@
raw_fd_ostream ostream(StatsFilename, EC, fs::F_Append | fs::F_Text);
if (EC) {
llvm::errs() << "Error opening -stats-output-dir file '"
- << TraceFilename << "' for writing\n";
+ << StatsFilename << "' for writing\n";
return;
}
diff --git a/lib/Sema/MiscDiagnostics.cpp b/lib/Sema/MiscDiagnostics.cpp
index 50f485c..1163dd6 100644
--- a/lib/Sema/MiscDiagnostics.cpp
+++ b/lib/Sema/MiscDiagnostics.cpp
@@ -86,14 +86,15 @@
// Selector for the partial_application_of_function_invalid diagnostic
// message.
struct PartialApplication {
- unsigned level : 29;
enum : unsigned {
Function,
MutatingMethod,
SuperInit,
SelfInit,
};
+ // 'kind' before 'level' is better for code gen.
unsigned kind : 3;
+ unsigned level : 29;
};
// Partial applications of functions that are not permitted. This is
@@ -121,7 +122,7 @@
// Partial applications of delegated initializers aren't allowed, and
// don't really make sense to begin with.
- InvalidPartialApplications.insert({ expr, {1, kind} });
+ InvalidPartialApplications.insert({ expr, {kind, 1} });
return;
}
@@ -141,7 +142,7 @@
if (!expr->getArg()->getType()->isMaterializable()) {
// We need to apply all argument clauses.
InvalidPartialApplications.insert({
- fnExpr, {fn->getNumParameterLists(), kind}
+ fnExpr, {kind, fn->getNumParameterLists()}
});
}
}
@@ -172,7 +173,7 @@
InvalidPartialApplications.erase(foundApplication);
if (level > 1) {
// We have remaining argument clauses.
- InvalidPartialApplications.insert({ AE, {level - 1, kind} });
+ InvalidPartialApplications.insert({ AE, {kind, level - 1} });
}
return;
}
diff --git a/stdlib/public/core/SmallString.swift b/stdlib/public/core/SmallString.swift
index a8e200c..8828164 100644
--- a/stdlib/public/core/SmallString.swift
+++ b/stdlib/public/core/SmallString.swift
@@ -464,10 +464,7 @@
// NOTE: This exists to facilitate _fromCodeUnits, which is awful for this use
// case. Please don't call this from anywhere else.
- @usableFromInline
- @inline(never) // @outlined
- // @_specialize(where Encoding == UTF16)
- // @_specialize(where Encoding == UTF8)
+ @inlinable
init?<S: Sequence, Encoding: Unicode.Encoding>(
_fromCodeUnits codeUnits: S,
utf16Length: Int,
diff --git a/validation-test/stdlib/MicroStdlib/MicroStdlib.swift b/validation-test/stdlib/MicroStdlib/MicroStdlib.swift
index 9bd948c..53788c5 100644
--- a/validation-test/stdlib/MicroStdlib/MicroStdlib.swift
+++ b/validation-test/stdlib/MicroStdlib/MicroStdlib.swift
@@ -5,6 +5,7 @@
// RUN: ls %t/Swift.o
// RUN: %target-clang -x c -c %S/Inputs/RuntimeStubs.c -o %t/RuntimeStubs.o
// RUN: %target-build-swift -I %t -module-name main -o %t/hello %S/Inputs/main.swift %t/Swift.o %t/RuntimeStubs.o
+// RUN: %target-codesign %t/hello
// RUN: %target-run %t/hello | %FileCheck %s
// REQUIRES: executable_test
// CHECK: Hello