Skip to content

Commit d2c870f

Browse files
committed
---
yaml --- r: 343887 b: refs/heads/master-rebranch c: d74a24b h: refs/heads/master i: 343885: e49c393 343883: 86b6871 343879: ae238bf 343871: 5bc2e8e
1 parent 53d6d02 commit d2c870f

File tree

321 files changed

+2536
-2661
lines changed

Some content is hidden

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

321 files changed

+2536
-2661
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: b57a304fd9f82d1d2b0cdc6ba3ce0bacc203e7c3
1458+
refs/heads/master-rebranch: d74a24be37fda08eb3e3892f701b025c54f91bfe
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/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ set(SWIFT_NATIVE_CLANG_TOOLS_PATH "" CACHE STRING
219219
set(SWIFT_NATIVE_SWIFT_TOOLS_PATH "" CACHE STRING
220220
"Path to the directory that contains Swift tools that are executable on the build machine")
221221

222-
option(SWIFT_ENABLE_MODULE_INTERFACES
222+
option(SWIFT_ENABLE_PARSEABLE_MODULE_INTERFACES
223223
"Generate .swiftinterface files alongside .swiftmodule files"
224224
TRUE)
225225

branches/master-rebranch/cmake/modules/StandaloneOverlay.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ set(SWIFT_NATIVE_CLANG_TOOLS_PATH "${TOOLCHAIN_DIR}/usr/bin" CACHE STRING
5858
set(SWIFT_NATIVE_SWIFT_TOOLS_PATH "${TOOLCHAIN_DIR}/usr/bin" CACHE STRING
5959
"Path to Swift tools that are executable on the build machine.")
6060

61-
option(SWIFT_ENABLE_MODULE_INTERFACES
61+
option(SWIFT_ENABLE_PARSEABLE_MODULE_INTERFACES
6262
"Generate .swiftinterface files alongside .swiftmodule files."
6363
TRUE)
6464

branches/master-rebranch/cmake/modules/SwiftSource.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,10 @@ function(_compile_swift_files
323323
set(sibopt_file "${module_base}.O.sib")
324324
set(sibgen_file "${module_base}.sibgen")
325325

326-
if(SWIFT_ENABLE_MODULE_INTERFACES)
326+
if(SWIFT_ENABLE_PARSEABLE_MODULE_INTERFACES)
327327
set(interface_file "${module_base}.swiftinterface")
328328
list(APPEND swift_module_flags
329-
"-emit-module-interface-path" "${interface_file}")
329+
"-emit-parseable-module-interface-path" "${interface_file}")
330330
endif()
331331

332332
# If we have extra regexp flags, check if we match any of the regexps. If so

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/Decl.h

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

47904790
protected:
4791-
PointerUnion<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
4791+
PointerUnion3<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
47924792

47934793
VarDecl(DeclKind kind, bool isStatic, Introducer introducer,
47944794
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/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/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/PrintOptions.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -490,17 +490,14 @@ struct PrintOptions {
490490
return result;
491491
}
492492

493-
/// Retrieve the set of options suitable for module interfaces.
493+
/// Retrieve the set of options suitable for parseable module interfaces.
494494
///
495495
/// This is a format that will be parsed again later, so the output must be
496496
/// consistent and well-formed.
497497
///
498-
/// \see swift::emitSwiftInterface
499-
static PrintOptions printSwiftInterfaceFile(bool preferTypeRepr);
498+
/// \see swift::emitParseableInterface
499+
static PrintOptions printParseableInterfaceFile(bool preferTypeRepr);
500500

501-
/// Retrieve the set of options suitable for "Generated Interfaces", which
502-
/// are a prettified representation of the public API of a module, to be
503-
/// displayed to users in an editor.
504501
static PrintOptions printModuleInterface();
505502
static PrintOptions printTypeInterface(Type T);
506503

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/FileTypes.def

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ TYPE("dependencies", Dependencies, "d", "")
4949
TYPE("autolink", AutolinkFile, "autolink", "")
5050
TYPE("swiftmodule", SwiftModuleFile, "swiftmodule", "")
5151
TYPE("swiftdoc", SwiftModuleDocFile, "swiftdoc", "")
52-
TYPE("swiftinterface", SwiftModuleInterfaceFile, "swiftinterface", "")
52+
TYPE("swiftinterface", SwiftParseableInterfaceFile, \
53+
"swiftinterface", "")
5354
TYPE("assembly", Assembly, "s", "")
5455
TYPE("raw-sil", RawSIL, "sil", "")
5556
TYPE("raw-sib", RawSIB, "sib", "")

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/Basic/SupplementaryOutputPaths.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,16 @@ struct SupplementaryOutputPaths {
113113
/// \sa swift::writeTBDFile
114114
std::string TBDPath;
115115

116-
/// The path to which we should emit a module interface, which can
116+
/// The path to which we should emit a parseable module interface, which can
117117
/// be used by a client source file to import this module.
118118
///
119119
/// This format is similar to the binary format used for #ModuleOutputPath,
120120
/// but is intended to be stable across compiler versions.
121121
///
122122
/// Currently only makes sense when the compiler has whole-module knowledge.
123123
///
124-
/// \sa swift::emitSwiftInterface
125-
std::string ModuleInterfaceOutputPath;
124+
/// \sa swift::emitParseableInterface
125+
std::string ParseableInterfaceOutputPath;
126126

127127
SupplementaryOutputPaths() = default;
128128
SupplementaryOutputPaths(const SupplementaryOutputPaths &) = default;
@@ -132,7 +132,7 @@ struct SupplementaryOutputPaths {
132132
ModuleDocOutputPath.empty() && DependenciesFilePath.empty() &&
133133
ReferenceDependenciesFilePath.empty() &&
134134
SerializedDiagnosticsPath.empty() && LoadedModuleTracePath.empty() &&
135-
TBDPath.empty() && ModuleInterfaceOutputPath.empty();
135+
TBDPath.empty() && ParseableInterfaceOutputPath.empty();
136136
}
137137
};
138138
} // namespace swift

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/Demangling/Demangler.h

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -456,11 +456,9 @@ class Demangler : public NodeFactory {
456456
int NumWords;
457457
StringRef Text;
458458
size_t Pos;
459-
std::function<SymbolicReferenceResolver_t> SymbolicReferenceResolver;
460459

461460
public:
462-
DemangleInitRAII(Demangler &Dem, StringRef MangledName,
463-
std::function<SymbolicReferenceResolver_t> SymbolicReferenceResolver);
461+
DemangleInitRAII(Demangler &Dem, StringRef MangledName);
464462
~DemangleInitRAII();
465463
};
466464
friend DemangleInitRAII;
@@ -589,35 +587,39 @@ class Demangler : public NodeFactory {
589587

590588
void clear() override;
591589

590+
/// Install a resolver for symbolic references in a mangled string.
591+
void setSymbolicReferenceResolver(
592+
std::function<SymbolicReferenceResolver_t> resolver) {
593+
SymbolicReferenceResolver = resolver;
594+
}
595+
596+
/// Take the symbolic reference resolver.
597+
std::function<SymbolicReferenceResolver_t> &&
598+
takeSymbolicReferenceResolver() {
599+
return std::move(SymbolicReferenceResolver);
600+
}
601+
592602
/// Demangle the given symbol and return the parse tree.
593603
///
594604
/// \param MangledName The mangled symbol string, which start with the
595605
/// mangling prefix $S.
596-
/// \param SymbolicReferenceResolver A function invoked to resolve symbolic references in
597-
/// the string. If null, then symbolic references will cause the demangle to fail.
598606
///
599607
/// \returns A parse tree for the demangled string - or a null pointer
600608
/// on failure.
601609
/// The lifetime of the returned node tree ends with the lifetime of the
602610
/// Demangler or with a call of clear().
603-
NodePointer demangleSymbol(StringRef MangledName,
604-
std::function<SymbolicReferenceResolver_t> SymbolicReferenceResolver
605-
= nullptr);
611+
NodePointer demangleSymbol(StringRef MangledName);
606612

607613
/// Demangle the given type and return the parse tree.
608614
///
609615
/// \param MangledName The mangled type string, which does _not_ start with
610616
/// the mangling prefix $S.
611-
/// \param SymbolicReferenceResolver A function invoked to resolve symbolic references in
612-
/// the string. If null, then symbolic references will cause the demangle to fail.
613617
///
614618
/// \returns A parse tree for the demangled string - or a null pointer
615619
/// on failure.
616620
/// The lifetime of the returned node tree ends with the lifetime of the
617621
/// Demangler or with a call of clear().
618-
NodePointer demangleType(StringRef MangledName,
619-
std::function<SymbolicReferenceResolver_t> SymbolicReferenceResolver
620-
= nullptr);
622+
NodePointer demangleType(StringRef MangledName);
621623
};
622624

623625
/// A demangler which uses stack space for its initial memory.

branches/master-rebranch/include/swift/Demangling/StandardTypesMangling.def

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,10 @@
1313
/// STANDARD_TYPE(KIND, MANGLING, TYPENAME)
1414
/// The 1-character MANGLING for a known TYPENAME of KIND.
1515

16-
/// OBJC_INTEROP_STANDARD_TYPE(KIND, MANGLING, TYPENAME)
17-
/// The 1-character MANGLING for a known TYPENAME of KIND, for a type that's
18-
/// only available with ObjC interop enabled.
19-
20-
#ifndef OBJC_INTEROP_STANDARD_TYPE
21-
#define OBJC_INTEROP_STANDARD_TYPE(KIND, MANGLING, TYPENAME) \
22-
STANDARD_TYPE(KIND, MANGLING, TYPENAME)
23-
#endif
24-
25-
OBJC_INTEROP_STANDARD_TYPE(Structure, A, AutoreleasingUnsafeMutablePointer)
16+
STANDARD_TYPE(Structure, A, AutoreleasingUnsafeMutablePointer)
2617
STANDARD_TYPE(Structure, a, Array)
2718
STANDARD_TYPE(Structure, b, Bool)
19+
STANDARD_TYPE(Structure, c, UnicodeScalar)
2820
STANDARD_TYPE(Structure, D, Dictionary)
2921
STANDARD_TYPE(Structure, d, Double)
3022
STANDARD_TYPE(Structure, f, Float)
@@ -74,4 +66,3 @@ STANDARD_TYPE(Protocol, Z, SignedInteger)
7466
STANDARD_TYPE(Protocol, z, BinaryInteger)
7567

7668
#undef STANDARD_TYPE
77-
#undef OBJC_INTEROP_STANDARD_TYPE

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,10 @@ class Driver {
354354
StringRef workingDirectory,
355355
CommandOutput *Output) const;
356356

357-
void chooseModuleInterfacePath(Compilation &C, const JobAction *JA,
358-
StringRef workingDirectory,
359-
llvm::SmallString<128> &buffer,
360-
CommandOutput *output) const;
357+
void chooseParseableInterfacePath(Compilation &C, const JobAction *JA,
358+
StringRef workingDirectory,
359+
llvm::SmallString<128> &buffer,
360+
CommandOutput *output) const;
361361

362362
void chooseRemappingOutputPath(Compilation &C, const TypeToPathMap *OutputMap,
363363
CommandOutput *Output) const;

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include "swift/ClangImporter/ClangImporter.h"
3232
#include "swift/ClangImporter/ClangImporterOptions.h"
3333
#include "swift/Frontend/FrontendOptions.h"
34-
#include "swift/Frontend/ModuleInterfaceSupport.h"
34+
#include "swift/Frontend/ParseableInterfaceSupport.h"
3535
#include "swift/Migrator/MigratorOptions.h"
3636
#include "swift/Parse/CodeCompletionCallbacks.h"
3737
#include "swift/Parse/Parser.h"
@@ -78,7 +78,7 @@ class CompilerInvocation {
7878
SILOptions SILOpts;
7979
IRGenOptions IRGenOpts;
8080
TBDGenOptions TBDGenOpts;
81-
ModuleInterfaceOptions ModuleInterfaceOpts;
81+
ParseableInterfaceOptions ParseableInterfaceOpts;
8282
/// The \c SyntaxParsingCache to use when parsing the main file of this
8383
/// invocation
8484
SyntaxParsingCache *MainFileSyntaxParsingCache = nullptr;
@@ -208,8 +208,8 @@ class CompilerInvocation {
208208
TBDGenOptions &getTBDGenOptions() { return TBDGenOpts; }
209209
const TBDGenOptions &getTBDGenOptions() const { return TBDGenOpts; }
210210

211-
ModuleInterfaceOptions &getModuleInterfaceOptions() { return ModuleInterfaceOpts; }
212-
const ModuleInterfaceOptions &getModuleInterfaceOptions() const { return ModuleInterfaceOpts; }
211+
ParseableInterfaceOptions &getParseableInterfaceOptions() { return ParseableInterfaceOpts; }
212+
const ParseableInterfaceOptions &getParseableInterfaceOptions() const { return ParseableInterfaceOpts; }
213213

214214
ClangImporterOptions &getClangImporterOptions() { return ClangImporterOpts; }
215215
const ClangImporterOptions &getClangImporterOptions() const {
@@ -353,10 +353,10 @@ class CompilerInvocation {
353353
/// if not in that mode.
354354
std::string getTBDPathForWholeModule() const;
355355

356-
/// ModuleInterfaceOutputPath only makes sense in whole module compilation
357-
/// mode, so return the ModuleInterfaceOutputPath when in that mode and
356+
/// ParseableInterfaceOutputPath only makes sense in whole module compilation
357+
/// mode, so return the ParseableInterfaceOutputPath when in that mode and
358358
/// fail an assert if not in that mode.
359-
std::string getModuleInterfaceOutputPathForWholeModule() const;
359+
std::string getParseableInterfaceOutputPathForWholeModule() const;
360360

361361
SerializationOptions
362362
computeSerializationOptions(const SupplementaryOutputPaths &outs,

0 commit comments

Comments
 (0)