Skip to content

Commit 7a0a4ab

Browse files
committed
---
yaml --- r: 344189 b: refs/heads/master-rebranch c: ae60618 h: refs/heads/master i: 344187: e41df66
1 parent e0a8143 commit 7a0a4ab

File tree

143 files changed

+7217
-898
lines changed

Some content is hidden

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

143 files changed

+7217
-898
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-02-a: ddd2b2976aa9bfde5f20fe37f6bd2
14551455
refs/tags/swift-DEVELOPMENT-SNAPSHOT-2019-08-03-a: 171cc166f2abeb5ca2a4003700a8a78a108bd300
14561456
refs/heads/benlangmuir-patch-1: baaebaf39d52f3bf36710d4fe40cf212e996b212
14571457
refs/heads/i-do-redeclare: 8c4e6d5de5c1e3f0a2cedccf319df713ea22c48e
1458-
refs/heads/master-rebranch: 7fd3cd647ed3c48b8f8e29f310fe716c115d88b3
1458+
refs/heads/master-rebranch: ae60618f3b879b5a4f6c35af706964a7572ef6d2
14591459
refs/heads/rdar-53901732: 9bd06af3284e18a109cdbf9aa59d833b24eeca7b
14601460
refs/heads/revert-26776-subst-always-returns-a-type: 1b8e18fdd391903a348970a4c848995d4cdd789c
14611461
refs/heads/tensorflow-merge: 8b854f62f80d4476cb383d43c4aac2001dde3cec

branches/master-rebranch/include/swift/AST/ASTNode.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ namespace swift {
3636
enum class DeclKind : uint8_t;
3737
enum class StmtKind;
3838

39-
struct ASTNode : public llvm::PointerUnion<Expr*, Stmt*, Decl*> {
39+
struct ASTNode : public llvm::PointerUnion3<Expr*, Stmt*, Decl*> {
4040
// Inherit the constructors from PointerUnion.
41-
using PointerUnion::PointerUnion;
42-
41+
using PointerUnion3::PointerUnion3;
42+
4343
SourceRange getSourceRange() const;
4444

4545
/// Return the location of the start of the statement.

branches/master-rebranch/include/swift/AST/Builtins.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,7 @@ class IntrinsicInfo {
131131

132132
/// Turn a string like "release" into the LLVM enum.
133133
llvm::AtomicOrdering decodeLLVMAtomicOrdering(StringRef O);
134-
135-
/// Returns true if the builtin with ID \p ID has a defined static overload for
136-
/// the type \p Ty.
137-
bool canBuiltinBeOverloadedForType(BuiltinValueKind ID, Type Ty);
134+
138135
}
139136

140137
#endif

branches/master-rebranch/include/swift/AST/Decl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4801,7 +4801,7 @@ class VarDecl : public AbstractStorageDecl {
48014801
};
48024802

48034803
protected:
4804-
PointerUnion<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
4804+
PointerUnion3<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
48054805

48064806
VarDecl(DeclKind kind, bool isStatic, Introducer introducer,
48074807
bool issCaptureList, SourceLoc nameLoc, Identifier name,

branches/master-rebranch/include/swift/AST/DiagnosticsClangImporter.def

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ WARNING(implicit_bridging_header_imported_from_module,none,
9191
"is deprecated and will be removed in a later version of Swift",
9292
(StringRef, Identifier))
9393

94+
WARNING(clang_vfs_overlay_is_ignored,none,
95+
"ignoring '-ivfsoverlay' options provided to '-Xcc' in favor of "
96+
"'-vfsoverlay'", ())
97+
9498
#ifndef DIAG_NO_UNDEF
9599
# if defined(DIAG)
96100
# undef DIAG

branches/master-rebranch/include/swift/AST/DiagnosticsSIL.def

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -522,16 +522,6 @@ ERROR(oslog_property_not_constant, none, "'OSLogInterpolation.%0' is not a "
522522
ERROR(global_string_pointer_on_non_constant, none, "globalStringTablePointer "
523523
"builtin must used only on string literals", ())
524524

525-
ERROR(polymorphic_builtin_passed_non_trivial_non_builtin_type, none, "Argument "
526-
"of type %0 can not be passed as an argument to a Polymorphic "
527-
"builtin. Polymorphic builtins can only be passed arguments that are "
528-
"trivial builtin typed", (Type))
529-
530-
ERROR(polymorphic_builtin_passed_type_without_static_overload, none, "Static"
531-
" overload %0 does not exist for polymorphic builtin '%1'. Static "
532-
"overload implied by passing argument of type %2",
533-
(Identifier, StringRef, Type))
534-
535525
#ifndef DIAG_NO_UNDEF
536526
# if defined(DIAG)
537527
# undef DIAG

branches/master-rebranch/include/swift/AST/GenericSignatureBuilder.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ class GenericSignatureBuilder {
9292
class ResolvedType;
9393

9494
using UnresolvedRequirementRHS =
95-
llvm::PointerUnion<Type, PotentialArchetype *, LayoutConstraint>;
95+
llvm::PointerUnion3<Type, PotentialArchetype *, LayoutConstraint>;
9696

9797
using RequirementRHS =
98-
llvm::PointerUnion<Type, PotentialArchetype *, LayoutConstraint>;
98+
llvm::PointerUnion3<Type, PotentialArchetype *, LayoutConstraint>;
9999

100100
/// The location of a requirement as written somewhere in the source.
101101
typedef llvm::PointerUnion<const TypeRepr *, const RequirementRepr *>
@@ -1373,8 +1373,8 @@ class GenericSignatureBuilder::FloatingRequirementSource {
13731373
} kind;
13741374

13751375
using Storage =
1376-
llvm::PointerUnion<const RequirementSource *, const TypeRepr *,
1377-
const RequirementRepr *>;
1376+
llvm::PointerUnion3<const RequirementSource *, const TypeRepr *,
1377+
const RequirementRepr *>;
13781378

13791379
Storage storage;
13801380

branches/master-rebranch/include/swift/AST/LazyResolver.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,6 @@ class LazyResolver {
6060
/// consistency and provides the value a type.
6161
virtual void resolveDeclSignature(ValueDecl *VD) = 0;
6262

63-
/// Resolve the type of an extension.
64-
///
65-
/// This can be called to ensure that the members of an extension can be
66-
/// considered to be members of the extended type.
67-
virtual void resolveExtension(ExtensionDecl *ext) = 0;
68-
6963
/// Resolve any implicitly-declared constructors within the given nominal.
7064
virtual void resolveImplicitConstructors(NominalTypeDecl *nominal) = 0;
7165

branches/master-rebranch/include/swift/AST/ModuleLoader.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
#include "llvm/ADT/SmallSet.h"
2525
#include "llvm/ADT/TinyPtrVector.h"
2626

27-
namespace llvm {
28-
class FileCollector;
29-
}
30-
3127
namespace clang {
3228
class DependencyCollector;
3329
}
@@ -58,9 +54,8 @@ enum class Bridgeability : unsigned {
5854
class DependencyTracker {
5955
std::shared_ptr<clang::DependencyCollector> clangCollector;
6056
public:
61-
explicit DependencyTracker(
62-
bool TrackSystemDeps,
63-
std::shared_ptr<llvm::FileCollector> FileCollector = {});
57+
58+
explicit DependencyTracker(bool TrackSystemDeps);
6459

6560
/// Adds a file as a dependency.
6661
///

branches/master-rebranch/include/swift/AST/TypeCheckRequests.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ struct WhereClauseOwner {
365365

366366
/// The source of the where clause, which can be a generic parameter list
367367
/// or a declaration that can have a where clause.
368-
llvm::PointerUnion<GenericParamList *, Decl *, SpecializeAttr *> source;
368+
llvm::PointerUnion3<GenericParamList *, Decl *, SpecializeAttr *> source;
369369

370370
WhereClauseOwner(Decl *decl);
371371

branches/master-rebranch/include/swift/Basic/LLVM.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ namespace llvm {
4242
template<typename T> class MutableArrayRef;
4343
template<typename T> class TinyPtrVector;
4444
template<typename T> class Optional;
45-
template <typename ...PTs> class PointerUnion;
45+
template <typename PT1, typename PT2> class PointerUnion;
46+
template <typename PT1, typename PT2, typename PT3> class PointerUnion3;
4647
class SmallBitVector;
4748

4849
// Other common classes.
@@ -67,6 +68,7 @@ namespace swift {
6768
using llvm::None;
6869
using llvm::Optional;
6970
using llvm::PointerUnion;
71+
using llvm::PointerUnion3;
7072
using llvm::SmallBitVector;
7173
using llvm::SmallPtrSet;
7274
using llvm::SmallPtrSetImpl;

branches/master-rebranch/include/swift/ClangImporter/ClangImporter.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
namespace llvm {
2525
class Triple;
26-
class FileCollector;
2726
template<typename Fn> class function_ref;
2827
}
2928

@@ -150,8 +149,7 @@ class ClangImporter final : public ClangModuleLoader {
150149
/// Create a new clang::DependencyCollector customized to
151150
/// ClangImporter's specific uses.
152151
static std::shared_ptr<clang::DependencyCollector>
153-
createDependencyCollector(bool TrackSystemDeps,
154-
std::shared_ptr<llvm::FileCollector> FileCollector);
152+
createDependencyCollector(bool TrackSystemDeps);
155153

156154
/// Append visible module names to \p names. Note that names are possibly
157155
/// duplicated, and not guaranteed to be ordered in any way.

branches/master-rebranch/include/swift/ClangImporter/ClangImporterOptions.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ class ClangImporterOptions {
9696
/// When set, don't enforce warnings with -Werror.
9797
bool DebuggerSupport = false;
9898

99+
/// When set, clobber the Clang instance's virtual file system with the Swift
100+
/// virtual file system.
101+
bool ForceUseSwiftVirtualFileSystem = false;
102+
99103
/// Return a hash code of any components from these options that should
100104
/// contribute to a Swift Bridging PCH hash.
101105
llvm::hash_code getPCHHashComponents() const {

branches/master-rebranch/include/swift/LLVMPasses/Passes.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,8 @@ namespace swift {
3030
const llvm::PreservedAnalyses &) { return false; }
3131

3232
using AAResultBase::getModRefInfo;
33-
llvm::ModRefInfo getModRefInfo(const llvm::CallBase *Call,
34-
const llvm::MemoryLocation &Loc) {
35-
llvm::AAQueryInfo AAQI;
36-
return getModRefInfo(Call, Loc, AAQI);
37-
}
38-
llvm::ModRefInfo getModRefInfo(const llvm::CallBase *Call,
39-
const llvm::MemoryLocation &Loc,
40-
llvm::AAQueryInfo &AAQI);
33+
llvm::ModRefInfo getModRefInfo(llvm::ImmutableCallSite CS,
34+
const llvm::MemoryLocation &Loc);
4135
};
4236

4337
class SwiftAAWrapperPass : public llvm::ImmutablePass {

branches/master-rebranch/include/swift/Option/Options.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,9 +508,6 @@ def no_static_stdlib: Flag<["-"], "no-static-stdlib">,
508508
def toolchain_stdlib_rpath: Flag<["-"], "toolchain-stdlib-rpath">,
509509
Flags<[HelpHidden,DoesNotAffectIncrementalBuild]>,
510510
HelpText<"Add an rpath entry for the toolchain's standard library, rather than the OS's">;
511-
def no_toolchain_stdlib_rpath: Flag<["-"], "no-toolchain-stdlib-rpath">,
512-
Flags<[HelpHidden,DoesNotAffectIncrementalBuild]>,
513-
HelpText<"Do not add an rpath entry for the toolchain's standard library (default)">;
514511
def no_stdlib_rpath: Flag<["-"], "no-stdlib-rpath">,
515512
Flags<[HelpHidden,DoesNotAffectIncrementalBuild]>,
516513
HelpText<"Don't add any rpath entries.">;

branches/master-rebranch/include/swift/Parse/Parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include "llvm/ADT/SetVector.h"
4141

4242
namespace llvm {
43-
template <typename... PTs> class PointerUnion;
43+
template <typename PT1, typename PT2, typename PT3> class PointerUnion3;
4444
}
4545

4646
namespace swift {

branches/master-rebranch/include/swift/SIL/InstructionUtils.h

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -149,37 +149,23 @@ void findClosuresForFunctionValue(SILValue V,
149149
/// NOTE: If we perform this transformation, our builtin will no longer have any
150150
/// substitutions since we only substitute to concrete static overloads.
151151
struct PolymorphicBuiltinSpecializedOverloadInfo {
152-
const BuiltinInfo *builtinInfo;
153152
Identifier staticOverloadIdentifier;
154153
SmallVector<SILType, 8> argTypes;
155154
SILType resultType;
156-
bool hasOutParam;
155+
bool hasOutParam = false;
157156

158157
#ifndef NDEBUG
159158
private:
160-
bool isInitialized;
161-
162-
public:
159+
bool isInitialized = false;
163160
#endif
164161

165-
PolymorphicBuiltinSpecializedOverloadInfo()
166-
: builtinInfo(nullptr), staticOverloadIdentifier(), argTypes(),
167-
resultType(), hasOutParam(false), isInitialized(false) {}
168-
169-
/// Returns true if we were able to map the polymorphic builtin to a static
170-
/// overload. False otherwise.
171-
///
172-
/// NOTE: This does not mean that the static overload actually exists.
173-
bool init(BuiltinInst *bi);
174-
175-
bool doesOverloadExist() const {
176-
CanBuiltinType builtinType = argTypes.front().getAs<BuiltinType>();
177-
return canBuiltinBeOverloadedForType(builtinInfo->ID, builtinType);
178-
}
162+
public:
163+
PolymorphicBuiltinSpecializedOverloadInfo() = default;
179164

180-
private:
181165
bool init(SILFunction *fn, BuiltinValueKind builtinKind,
182166
ArrayRef<SILType> oldOperandTypes, SILType oldResultType);
167+
168+
bool init(BuiltinInst *bi);
183169
};
184170

185171
/// Given a polymorphic builtin \p bi, analyze its types and create a builtin

branches/master-rebranch/include/swift/SILOptimizer/Analysis/LoopRegionAnalysis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ class LoopRegion {
384384
private:
385385
/// A pointer to one of a Loop, Basic Block, or Function represented by this
386386
/// region.
387-
llvm::PointerUnion<FunctionTy *, LoopTy *, BlockTy *> Ptr;
387+
llvm::PointerUnion3<FunctionTy *, LoopTy *, BlockTy *> Ptr;
388388

389389
/// The ID of this region.
390390
unsigned ID;

branches/master-rebranch/lib/AST/Builtins.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1256,13 +1256,6 @@ inline bool isBuiltinTypeOverloaded(Type T, OverloadedBuiltinKind OK) {
12561256
llvm_unreachable("bad overloaded builtin kind");
12571257
}
12581258

1259-
bool swift::canBuiltinBeOverloadedForType(BuiltinValueKind ID, Type Ty) {
1260-
if (ID == BuiltinValueKind::None)
1261-
return false;
1262-
1263-
return isBuiltinTypeOverloaded(Ty, OverloadedBuiltinKinds[unsigned(ID)]);
1264-
}
1265-
12661259
/// Table of string intrinsic names indexed by enum value.
12671260
static const char *const IntrinsicNameTable[] = {
12681261
"not_intrinsic",
@@ -1380,7 +1373,6 @@ Type IntrinsicTypeDecoder::decodeImmediate() {
13801373
case IITDescriptor::HalfVecArgument:
13811374
case IITDescriptor::VarArg:
13821375
case IITDescriptor::Token:
1383-
case IITDescriptor::VecElementArgument:
13841376
case IITDescriptor::VecOfAnyPtrsToElt:
13851377
// These types cannot be expressed in swift yet.
13861378
return Type();

branches/master-rebranch/lib/AST/ConformanceLookupTable.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,8 +798,8 @@ ConformanceLookupTable::getConformance(NominalTypeDecl *nominal,
798798
// Everything about this conformance is nailed down, so we can now ensure that
799799
// the extension is fully resolved.
800800
if (auto resolver = nominal->getASTContext().getLazyResolver()) {
801-
if (auto ED = dyn_cast<ExtensionDecl>(conformingDC)) {
802-
resolver->resolveExtension(ED);
801+
if (auto ext = dyn_cast<ExtensionDecl>(conformingDC)) {
802+
resolver->resolveDeclSignature(ext->getExtendedNominal());
803803
} else {
804804
resolver->resolveDeclSignature(cast<NominalTypeDecl>(conformingDC));
805805
}

branches/master-rebranch/lib/AST/ModuleLoader.cpp

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,17 @@
1818
#include "clang/Frontend/Utils.h"
1919
#include "swift/ClangImporter/ClangImporter.h"
2020

21-
namespace llvm {
22-
class FileCollector;
23-
}
24-
2521
namespace swift {
2622

27-
DependencyTracker::DependencyTracker(
28-
bool TrackSystemDeps, std::shared_ptr<llvm::FileCollector> FileCollector)
29-
// NB: The ClangImporter believes it's responsible for the construction of
30-
// this instance, and it static_cast<>s the instance pointer to its own
31-
// subclass based on that belief. If you change this to be some other
32-
// instance, you will need to change ClangImporter's code to handle the
33-
// difference.
34-
: clangCollector(ClangImporter::createDependencyCollector(TrackSystemDeps,
35-
FileCollector)) {}
23+
DependencyTracker::DependencyTracker(bool TrackSystemDeps)
24+
// NB: The ClangImporter believes it's responsible for the construction of
25+
// this instance, and it static_cast<>s the instance pointer to its own
26+
// subclass based on that belief. If you change this to be some other
27+
// instance, you will need to change ClangImporter's code to handle the
28+
// difference.
29+
: clangCollector(ClangImporter::createDependencyCollector(TrackSystemDeps))
30+
{
31+
}
3632

3733
void
3834
DependencyTracker::addDependency(StringRef File, bool IsSystem) {

branches/master-rebranch/lib/AST/Type.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,8 +1098,8 @@ CanType TypeBase::computeCanonicalType() {
10981098
assert(resolver && "Need to resolve generic parameter depth");
10991099
if (auto decl =
11001100
gpDecl->getDeclContext()->getInnermostDeclarationDeclContext())
1101-
if (auto valueDecl = dyn_cast<ValueDecl>(decl))
1102-
resolver->resolveDeclSignature(valueDecl);
1101+
if (auto valueDecl = decl->getAsGenericContext())
1102+
(void)valueDecl->getGenericSignature();
11031103
}
11041104

11051105
assert(gpDecl->getDepth() != GenericTypeParamDecl::InvalidDepth &&

branches/master-rebranch/lib/Basic/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ macro(find_first_existing_vc_file out_var path)
3030
)
3131
endmacro()
3232

33-
set(generate_vcs_version_script "${LLVM_MAIN_SRC_DIR}/cmake/modules/GenerateVersionFromVCS.cmake")
33+
set(get_svn_script "${LLVM_MAIN_SRC_DIR}/cmake/modules/GetSVN.cmake")
3434

3535
function(generate_revision_inc revision_inc_var name dir)
3636
find_first_existing_vc_file(dep_file "${dir}")
@@ -39,12 +39,12 @@ function(generate_revision_inc revision_inc_var name dir)
3939
string(TOUPPER ${name} upper_name)
4040
if(DEFINED dep_file)
4141
add_custom_command(OUTPUT "${revision_inc}"
42-
DEPENDS "${dep_file}" "${generate_vcs_version_script}"
42+
DEPENDS "${dep_file}" "${get_svn_script}"
4343
COMMAND
44-
${CMAKE_COMMAND} "-DNAMES=${upper_name}"
45-
"-D${upper_name}_SOURCE_DIR=${dir}"
44+
${CMAKE_COMMAND} "-DFIRST_SOURCE_DIR=${dir}"
45+
"-DFIRST_NAME=${upper_name}"
4646
"-DHEADER_FILE=${revision_inc}"
47-
-P "${generate_vcs_version_script}")
47+
-P "${get_svn_script}")
4848
else()
4949
# Generate an empty Revision.inc file if we are not using git or SVN.
5050
file(WRITE "${revision_inc}" "")

branches/master-rebranch/lib/Basic/Platform.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ StringRef swift::getPlatformNameForTriple(const llvm::Triple &triple) {
141141
case llvm::Triple::Ananas:
142142
case llvm::Triple::CloudABI:
143143
case llvm::Triple::DragonFly:
144-
case llvm::Triple::Emscripten:
145144
case llvm::Triple::Fuchsia:
146145
case llvm::Triple::KFreeBSD:
147146
case llvm::Triple::Lv2:
@@ -162,7 +161,6 @@ StringRef swift::getPlatformNameForTriple(const llvm::Triple &triple) {
162161
case llvm::Triple::AMDPAL:
163162
case llvm::Triple::HermitCore:
164163
case llvm::Triple::Hurd:
165-
case llvm::Triple::WASI:
166164
return "";
167165
case llvm::Triple::Darwin:
168166
case llvm::Triple::MacOSX:

0 commit comments

Comments
 (0)