Skip to content

Revert host toolchain build change, merge master #1080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 97 commits into from
May 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
cfbcd85
Fix and reenable NewArray.swift.gyb
gribozavr May 19, 2020
f57a6cf
[silgen] Teach CleanupCloner how to handle OwnedValueWritebackCleanup…
gottesmm May 15, 2020
7789e2c
IRGen: Fix enumPayload value witness emission for huge types
aschwaighofer May 20, 2020
097e451
Test does not work on linux
aschwaighofer May 20, 2020
7d187d3
test: enable WebAssembly/WASI in lit.cfg
MaxDesiatov May 10, 2020
946796c
Serialization: Use checked substitution map deserialization for type …
AnthonyLatsis May 20, 2020
b25c466
GenericSignatureImpl, #31712: Plug remaining relevant methods with ty…
AnthonyLatsis May 18, 2020
518ce5c
test: repair SILOptimizer AutoDiff test on Windows
compnerd May 20, 2020
940a6d7
Try renabling test on all platforms
aschwaighofer May 20, 2020
2eb623e
[CodeCompletion] Handle variadic parameter in expr context analysis
rintaro May 21, 2020
f7aaf5b
[CodeCompletion] Stop suggesting static member on a protoco meta type
rintaro May 21, 2020
4f54c75
Use Clang's logic for adding the default IR attributes to a function.
rjmccall May 20, 2020
a85ac89
Merge pull request #31926 from AnthonyLatsis/deserial-safe-submap
AnthonyLatsis May 21, 2020
4841731
Merge pull request #31918 from aschwaighofer/irgen_enum_witness_huge_…
aschwaighofer May 21, 2020
bc618a9
[ClangImporter] Avoid calling into ObjCSelector lookup
hamishknight May 21, 2020
fb66658
[AutoDiff] NFC: shorten test name. (#31818)
dan-zheng May 21, 2020
d53cd53
[Typechecker] Emit a specialised diagnostic for redeclaration errors …
theblixguy May 21, 2020
6175c90
Merge pull request #31932 from rintaro/ide-completion-rdar62479469
rintaro May 21, 2020
f6c62be
Merge pull request #31933 from rintaro/ide-completion-rdar58886969
rintaro May 21, 2020
620b044
Merge pull request #31906 from rjmccall/clang-ir-attributes
rjmccall May 21, 2020
245bcc4
Merge pull request #31695 from swiftwasm/maxd/lit-wasi
compnerd May 21, 2020
6ec007a
Further reduce the number of parallel jobs when testiong LLDB under ASAN
adrian-prantl May 21, 2020
b8c74b4
Merge pull request #31898 from gottesmm/pr-40f1eb4aa2e642a971e6af0341…
gottesmm May 21, 2020
99edbf0
[SourceKit/CodeFormat] Don't column-align PatternBindingDecl entries …
May 21, 2020
24fa750
Merge pull request #31927 from AnthonyLatsis/assert-type-param-3
AnthonyLatsis May 21, 2020
417e173
Merge pull request #31890 from gribozavr/fix-new-array-swift-gyb
CodaFi May 21, 2020
50803b8
[CSBindings] Emit specific key path root arg if generic param type va…
LucianoPAlmeida May 21, 2020
f7234a3
[tests] Adjusting SR-12827 test cases
LucianoPAlmeida May 21, 2020
e155f03
IRGen: Always eliminate frame pointers of leaf functions
aschwaighofer May 20, 2020
109813f
Add option to disable leaf frame pointer elimination
aschwaighofer May 21, 2020
e59d9eb
[NFC] Correc 'placholder' typo
xwu May 21, 2020
bbd6d53
[ConstraintSystem] Move implementation of isRepresentativeFor to cpp …
LucianoPAlmeida May 21, 2020
1c8ad00
[Property Wrappers] Fix ParamDecl::getDefaultValueStringRepresentation
hborla May 21, 2020
fcc4bef
[Property Wrappers] For properties that are implicitly default initia…
hborla May 21, 2020
14cc7dd
PrintAsObjC: Fix crash when printing typedef that was imported inside…
slavapestov May 21, 2020
49fed42
NFC: Remove SILParserState from Subsystems
hamishknight May 21, 2020
941681f
build: hide symbols using CMake
compnerd May 21, 2020
6049ce6
[fso] Do not try to specialize pseudo-generic functions today.
gottesmm May 21, 2020
63e6636
[metadata prespecialization] Prespecialize canonically only in-module.
nate-chandler May 21, 2020
f57eb42
Merge pull request #31929 from compnerd/null-is-1
compnerd May 21, 2020
138e4bc
runtime: repair the android build
compnerd May 21, 2020
be0e3fb
[NFC] Fix 'Traling' typo
xwu May 21, 2020
4069030
Merge pull request #31950 from hamishknight/sub-subsystems
hamishknight May 22, 2020
28fa3ab
Merge pull request #31848 from LucianoPAlmeida/SR-12827-keypath-hole
xedin May 22, 2020
cae7a70
Merge pull request #31946 from xwu/he-plac
xwu May 22, 2020
defac25
Merge pull request #31941 from nathawes/pattern-binding-decl-indentation
May 22, 2020
a97bbf9
Merge pull request #31949 from hborla/property-wrapper-default-init
hborla May 22, 2020
9c08c24
Merge pull request #31947 from slavapestov/print-as-objc-generic-type…
slavapestov May 22, 2020
e58ba24
Merge pull request #31954 from nate-chandler/generic-metadata-prespec…
nate-chandler May 22, 2020
d5d3ff9
Fixup Tombstone Reference Kind
CodaFi May 22, 2020
3e76ea7
Add the "cascading" bit to Reference
CodaFi May 22, 2020
21e6bad
[Gardening] Add an alias for a commonly-used set type
CodaFi May 22, 2020
9a88bef
Start Keeping Track of Files With Dependencies in the DependencyColle…
CodaFi May 22, 2020
bf8d541
Put UsedDeclEnumerator Back
CodaFi May 22, 2020
537c386
Use the New Evaluator-Based Dependency Enumerator in the Dependency V…
CodaFi May 22, 2020
acbf927
[NFC] Delete ReferencedNameTracker
CodaFi May 22, 2020
d42ac62
Account for Deserialized VarDecls in Setter Mismatch Diagnostics
CodaFi May 22, 2020
11a6d2b
Merge pull request #31952 from gottesmm/pr-6e3317403aa8653e12171104f9…
gottesmm May 22, 2020
05d377d
Make ObjCSelector's lookupDirect return a TinyPtrVector
hamishknight May 22, 2020
5004159
[Sema] NFC: Inline removeValidObjCConflictingMethods
hamishknight May 22, 2020
b982693
[Sema] NFC: Simplify some filtering logic
hamishknight May 22, 2020
da78d93
Remove OrderDeclaration's SourceManager parameter
hamishknight May 22, 2020
e25fa23
[Sema] NFC: Cleanup lookupObjCMethodInClass
hamishknight May 22, 2020
7bb2749
[Sema] NFC: Misc formatting changes
hamishknight May 22, 2020
5cb1f30
[IDE][InterfaceGen] Always print the top-level decl in header file ge…
May 22, 2020
1f85c04
Merge pull request #31961 from CodaFi/setternalia
swift-ci May 22, 2020
4057e7e
[Test] Generalize a few attribute tests for iOS.
DougGregor May 22, 2020
f8e3c40
Merge pull request #31965 from DougGregor/generalize-attr-tests
swift-ci May 22, 2020
35dceab
Set clang code generation's frame pointer kind.
aschwaighofer May 22, 2020
e6f0cbc
Fix test case
aschwaighofer May 22, 2020
38c0452
DependenciesScanner: report command-line arguments for building pcm e…
nkcsgexi May 20, 2020
429da7c
test: split ModuleDependencyGraph into graph and action
nkcsgexi May 21, 2020
cb3f278
Test: add a script for building modules by using command line argumen…
nkcsgexi May 21, 2020
18d4f63
Merge pull request #31962 from hamishknight/a-selection-of-cleanups
hamishknight May 22, 2020
2d25850
Merge pull request #31956 from compnerd/android-logging
compnerd May 22, 2020
966ffbb
Propagate `-vfsoverlay` from driver to frontend.
allevato May 22, 2020
94a7b9c
Disable attr_originally_definedin_backward_compatibility.swift test u…
mikeash May 22, 2020
123f068
Merge pull request #31971 from mikeash/disable-attr_originally_define…
mikeash May 22, 2020
de366c4
Merge pull request #31957 from xwu/tralala
akyrtzi May 22, 2020
617f1c3
Only use omit the frame pointer on arm64, x86_64 darwin needs it for …
aschwaighofer May 22, 2020
2202398
[test] DependenciesScanner: running shell commands via a python scrip…
nkcsgexi May 22, 2020
2ac1eee
Merge pull request #31964 from nathawes/fix-header-interface-lone-get…
May 22, 2020
f026c61
[ConstraintSystem] Disallow use of enum case as a key path component …
theblixguy May 22, 2020
73e5fc3
Merge pull request #31939 from adrian-prantl/less-j
adrian-prantl May 22, 2020
30e14ee
Merge pull request #31937 from hamishknight/an-introspective-lookup
hamishknight May 22, 2020
a6d97ec
[ConstraintSystem][NFC] rename `keyword_arguments.swift` to ...
omochi May 22, 2020
a12e0b3
Fix test on linux
aschwaighofer May 22, 2020
339f179
[ConstraintSystem][NFC] Move test cases about argument matching ...
omochi May 22, 2020
dec5d06
Merge pull request #31970 from allevato/driver-vfsoverlay
CodaFi May 22, 2020
65962f1
Merge pull request #31953 from compnerd/invisibility
compnerd May 22, 2020
45810d0
Merge pull request #31921 from aschwaighofer/irgen_frame_pointer_non_…
aschwaighofer May 22, 2020
d77bae6
Merge pull request #31978 from omochi/argument-matching-testfile
omochi May 23, 2020
e2b554d
Merge pull request #31922 from nkcsgexi/report-pcm-command
nkcsgexi May 23, 2020
4eb5689
Merge pull request #31960 from CodaFi/your-references-are-off-the-chain
CodaFi May 23, 2020
9877f28
Revert "Merge pull request #1024 from swiftwasm/maxd/build-host-toolc…
MaxDesiatov May 23, 2020
d2cff61
Merge branch 'master' of github.com:apple/swift into maxd/revert-host…
MaxDesiatov May 23, 2020
2993732
Fix missing subst_target_sil_opt_mock_sdk in lit.cfg
MaxDesiatov May 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions include/swift/AST/ASTContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -748,11 +748,13 @@ class ASTContext final {
/// \param methods The list of @objc methods in this class that have this
/// selector and are instance/class methods as requested. This list will be
/// extended with any methods found in subsequent generations.
void loadObjCMethods(ClassDecl *classDecl,
ObjCSelector selector,
bool isInstanceMethod,
unsigned previousGeneration,
llvm::TinyPtrVector<AbstractFunctionDecl *> &methods);
///
/// \param swiftOnly If true, only loads methods from imported Swift modules,
/// skipping the Clang importer.
void loadObjCMethods(ClassDecl *classDecl, ObjCSelector selector,
bool isInstanceMethod, unsigned previousGeneration,
llvm::TinyPtrVector<AbstractFunctionDecl *> &methods,
bool swiftOnly = false);

/// Load derivative function configurations for the given
/// AbstractFunctionDecl.
Expand Down
10 changes: 8 additions & 2 deletions include/swift/AST/Decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -4117,8 +4117,8 @@ class ClassDecl final : public NominalTypeDecl {
///
/// \param isInstance Whether we are looking for an instance method
/// (vs. a class method).
MutableArrayRef<AbstractFunctionDecl *> lookupDirect(ObjCSelector selector,
bool isInstance);
TinyPtrVector<AbstractFunctionDecl *> lookupDirect(ObjCSelector selector,
bool isInstance);

/// Record the presence of an @objc method with the given selector.
void recordObjCMethod(AbstractFunctionDecl *method, ObjCSelector selector);
Expand Down Expand Up @@ -5232,6 +5232,12 @@ class VarDecl : public AbstractStorageDecl {
Optional<PropertyWrapperMutability>
getPropertyWrapperMutability() const;

/// Returns whether this property is the backing storage property or a storage
/// wrapper for wrapper instance's projectedValue. If this property is
/// neither, then it returns `None`.
Optional<PropertyWrapperSynthesizedPropertyKind>
getPropertyWrapperSynthesizedPropertyKind() const;

/// Retrieve the backing storage property for a property that has an
/// attached property wrapper.
///
Expand Down
11 changes: 11 additions & 0 deletions include/swift/AST/DiagnosticsSema.def
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,9 @@ ERROR(expr_keypath_mutating_getter,none,
ERROR(expr_keypath_static_member,none,
"%select{key path|dynamic key path member lookup}1 cannot refer to static member %0",
(DeclName, bool))
ERROR(expr_keypath_enum_case,none,
"%select{key path|dynamic key path member lookup}1 cannot refer to enum case %0",
(DeclName, bool))
ERROR(expr_keypath_empty,none,
"empty key path does not refer to a property", ())
ERROR(expr_unsupported_objc_key_path_component,none,
Expand Down Expand Up @@ -760,12 +763,20 @@ ERROR(invalid_redecl,none,"invalid redeclaration of %0", (DeclName))
ERROR(invalid_redecl_init,none,
"invalid redeclaration of synthesized %select{|memberwise }1%0",
(DeclName, bool))
ERROR(invalid_redecl_implicit,none,
"invalid redeclaration of synthesized "
"%select{%0|implementation for protocol requirement}1 %2",
(DescriptiveDeclKind, bool, DeclName))
WARNING(invalid_redecl_swift5_warning,none,
"redeclaration of %0 is deprecated and will be an error in Swift 5",
(DeclName))

NOTE(invalid_redecl_prev,none,
"%0 previously declared here", (DeclName))
NOTE(invalid_redecl_implicit_wrapper,none,
"%0 synthesized for property wrapper "
"%select{projected value|backing storage}1",
(DeclName, bool))

ERROR(ambiguous_type_base,none,
"%0 is ambiguous for type lookup in this context", (DeclNameRef))
Expand Down
6 changes: 6 additions & 0 deletions include/swift/AST/Evaluator.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,12 @@ class Evaluator {
void registerRequestFunctions(Zone zone,
ArrayRef<AbstractRequestFunction *> functions);

void enumerateReferencesInFile(
const SourceFile *SF,
evaluator::DependencyRecorder::ReferenceEnumerator f) const {
return recorder.enumerateReferencesInFile(SF, f);
}

/// Retrieve the result produced by evaluating a request that can
/// be cached.
template<typename Request,
Expand Down
81 changes: 39 additions & 42 deletions include/swift/AST/EvaluatorDependencies.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ using DependencySource = llvm::PointerIntPair<SourceFile *, 1, DependencyScope>;
struct DependencyRecorder;

struct DependencyCollector {
friend DependencyRecorder;

struct Reference {
public:
enum class Kind {
Expand All @@ -123,38 +125,41 @@ struct DependencyCollector {

NominalTypeDecl *subject;
DeclBaseName name;
bool cascades;

private:
Reference(Kind kind, NominalTypeDecl *subject, DeclBaseName name)
: kind(kind), subject(subject), name(name) {}
Reference(Kind kind, NominalTypeDecl *subject, DeclBaseName name,
bool cascades)
: kind(kind), subject(subject), name(name), cascades(cascades) {}

public:
static Reference empty() {
return {Kind::Empty, llvm::DenseMapInfo<NominalTypeDecl *>::getEmptyKey(),
llvm::DenseMapInfo<DeclBaseName>::getEmptyKey()};
llvm::DenseMapInfo<DeclBaseName>::getEmptyKey(), false};
}

static Reference tombstone() {
return {Kind::Empty,
return {Kind::Tombstone,
llvm::DenseMapInfo<NominalTypeDecl *>::getTombstoneKey(),
llvm::DenseMapInfo<DeclBaseName>::getTombstoneKey()};
llvm::DenseMapInfo<DeclBaseName>::getTombstoneKey(), false};
}

public:
static Reference usedMember(NominalTypeDecl *subject, DeclBaseName name) {
return {Kind::UsedMember, subject, name};
static Reference usedMember(NominalTypeDecl *subject, DeclBaseName name,
bool cascades) {
return {Kind::UsedMember, subject, name, cascades};
}

static Reference potentialMember(NominalTypeDecl *subject) {
return {Kind::PotentialMember, subject, DeclBaseName()};
static Reference potentialMember(NominalTypeDecl *subject, bool cascades) {
return {Kind::PotentialMember, subject, DeclBaseName(), cascades};
}

static Reference topLevel(DeclBaseName name) {
return {Kind::TopLevel, nullptr, name};
static Reference topLevel(DeclBaseName name, bool cascades) {
return {Kind::TopLevel, nullptr, name, cascades};
}

static Reference dynamic(DeclBaseName name) {
return {Kind::Dynamic, nullptr, name};
static Reference dynamic(DeclBaseName name, bool cascades) {
return {Kind::Dynamic, nullptr, name, cascades};
}

public:
Expand All @@ -174,8 +179,12 @@ struct DependencyCollector {
};
};

public:
using ReferenceSet = llvm::DenseSet<Reference, Reference::Info>;

private:
DependencyRecorder &parent;
llvm::DenseSet<Reference, Reference::Info> scratch;
ReferenceSet scratch;

public:
explicit DependencyCollector(DependencyRecorder &parent) : parent(parent) {}
Expand Down Expand Up @@ -226,11 +235,7 @@ struct DependencyCollector {
/// particular \c DependencyScope during the course of request evaluation.
struct DependencyRecorder {
friend DependencyCollector;
private:
/// A stack of dependency sources in the order they were evaluated.
llvm::SmallVector<evaluator::DependencySource, 8> dependencySources;

public:
enum class Mode {
// Enables the current "status quo" behavior of the dependency collector.
//
Expand All @@ -244,14 +249,19 @@ struct DependencyRecorder {
// the primary file being acted upon instead of to the destination file.
ExperimentalPrivateDependencies,
};
Mode mode;
llvm::DenseMap<AnyRequest, llvm::DenseSet<DependencyCollector::Reference,
DependencyCollector::Reference::Info>>

private:
/// A stack of dependency sources in the order they were evaluated.
llvm::SmallVector<evaluator::DependencySource, 8> dependencySources;
llvm::DenseMap<SourceFile *, DependencyCollector::ReferenceSet>
fileReferences;
llvm::DenseMap<AnyRequest, DependencyCollector::ReferenceSet>
requestReferences;
Mode mode;
bool isRecording;

explicit DependencyRecorder(Mode mode)
: mode{mode}, requestReferences{}, isRecording{false} {};
public:
explicit DependencyRecorder(Mode mode) : mode{mode}, isRecording{false} {};

private:
void realize(const DependencyCollector::Reference &ref);
Expand All @@ -261,6 +271,12 @@ struct DependencyRecorder {
void record(const llvm::SetVector<swift::ActiveRequest> &stack,
llvm::function_ref<void(DependencyCollector &)> rec);

public:
using ReferenceEnumerator =
llvm::function_ref<void(const DependencyCollector::Reference &)>;
void enumerateReferencesInFile(const SourceFile *SF,
ReferenceEnumerator f) const ;

public:
/// Returns the scope of the current active scope.
///
Expand Down Expand Up @@ -323,25 +339,6 @@ struct DependencyRecorder {
return dependencySources.front().getPointer();
}

/// If there is an active dependency source, returns its
/// \c ReferencedNameTracker. Else, returns \c nullptr.
ReferencedNameTracker *getActiveDependencyTracker() const {
SourceFile *source = nullptr;
switch (mode) {
case Mode::StatusQuo:
source = getActiveDependencySourceOrNull();
break;
case Mode::ExperimentalPrivateDependencies:
source = getFirstDependencySourceOrNull();
break;
}

if (!source)
return nullptr;

return source->getRequestBasedReferencedNameTracker();
}

/// Returns \c true if the scope of the current active source cascades.
///
/// If there is no active scope, the result always cascades.
Expand Down
4 changes: 2 additions & 2 deletions include/swift/AST/GenericSignature.h
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,12 @@ class alignas(1 << TypeAlignInBits) GenericSignatureImpl final
/// Determine whether the given dependent type is equal to a concrete type.
bool isConcreteType(Type type) const;

/// Return the concrete type that the given dependent type is constrained to,
/// Return the concrete type that the given type parameter is constrained to,
/// or the null Type if it is not the subject of a concrete same-type
/// constraint.
Type getConcreteType(Type type) const;

/// Return the layout constraint that the given dependent type is constrained
/// Return the layout constraint that the given type parameter is constrained
/// to, or the null LayoutConstraint if it is not the subject of layout
/// constraint.
LayoutConstraint getLayoutConstraint(Type type) const;
Expand Down
2 changes: 2 additions & 0 deletions include/swift/AST/IRGenOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ class IRGenOptions {
unsigned DisableLLVMSLPVectorizer : 1;

/// Disable frame pointer elimination?
unsigned DisableFPElimLeaf : 1;
unsigned DisableFPElim : 1;

/// Special codegen for playgrounds.
Expand Down Expand Up @@ -319,6 +320,7 @@ class IRGenOptions {
DisableClangModuleSkeletonCUs(false), UseJIT(false),
DisableLLVMOptzns(false),
DisableSwiftSpecificLLVMOptzns(false), DisableLLVMSLPVectorizer(false),
DisableFPElimLeaf(false),
DisableFPElim(true), Playground(false), EmitStackPromotionChecks(false),
FunctionSections(false), PrintInlineTree(false), EmbedMode(IRGenEmbedMode::None),
HasValueNamesSetting(false), ValueNames(false),
Expand Down
2 changes: 0 additions & 2 deletions include/swift/AST/Module.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "swift/AST/Identifier.h"
#include "swift/AST/LookupKinds.h"
#include "swift/AST/RawComment.h"
#include "swift/AST/ReferencedNameTracker.h"
#include "swift/AST/Type.h"
#include "swift/Basic/Compiler.h"
#include "swift/Basic/OptionSet.h"
Expand Down Expand Up @@ -69,7 +68,6 @@ namespace swift {
class ProtocolConformance;
class ProtocolDecl;
struct PrintOptions;
class ReferencedNameTracker;
class Token;
class TupleType;
class Type;
Expand Down
83 changes: 0 additions & 83 deletions include/swift/AST/ReferencedNameTracker.h

This file was deleted.

Loading