Skip to content

Commit 04c8cf9

Browse files
committed
---
yaml --- r: 315387 b: refs/heads/master-next c: 33be0c8 h: refs/heads/master i: 315385: 204e7ec 315383: 4d6aa6a
1 parent b1dbb7e commit 04c8cf9

File tree

97 files changed

+800
-1237
lines changed

Some content is hidden

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

97 files changed

+800
-1237
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 3fe9333052029c114ef816ea805c335eb1ee8a99
3-
refs/heads/master-next: f4e9bef832146f7bd014f26e4be6a048d56036ec
3+
refs/heads/master-next: 33be0c80439d7523039b5416208b3036da36dd4e
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
66
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-b: 66d897bfcf64a82cb9a87f5e663d889189d06d07

branches/master-next/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-next/include/swift/AST/Decl.h

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

48084808
protected:
4809-
PointerUnion<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
4809+
PointerUnion3<PatternBindingDecl *, Stmt *, VarDecl *> Parent;
48104810

48114811
VarDecl(DeclKind kind, bool isStatic, Introducer introducer,
48124812
bool issCaptureList, SourceLoc nameLoc, Identifier name,

branches/master-next/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-next/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 *>
@@ -1374,8 +1374,8 @@ class GenericSignatureBuilder::FloatingRequirementSource {
13741374
} kind;
13751375

13761376
using Storage =
1377-
llvm::PointerUnion<const RequirementSource *, const TypeRepr *,
1378-
const RequirementRepr *>;
1377+
llvm::PointerUnion3<const RequirementSource *, const TypeRepr *,
1378+
const RequirementRepr *>;
13791379

13801380
Storage storage;
13811381

branches/master-next/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-next/include/swift/AST/TypeCheckRequests.h

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

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

372372
WhereClauseOwner(Decl *decl);
373373

branches/master-next/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-next/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

@@ -130,8 +129,7 @@ class ClangImporter final : public ClangModuleLoader {
130129
/// Create a new clang::DependencyCollector customized to
131130
/// ClangImporter's specific uses.
132131
static std::shared_ptr<clang::DependencyCollector>
133-
createDependencyCollector(bool TrackSystemDeps,
134-
std::shared_ptr<llvm::FileCollector> FileCollector);
132+
createDependencyCollector(bool TrackSystemDeps);
135133

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

branches/master-next/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-next/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-next/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-next/include/swift/SIL/SILInstruction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ class MultipleValueInstructionTrailingObjects<Derived, DerivedResult,
962962
MultipleValueInstruction *,
963963
DerivedResult,
964964
FinalOtherTrailingTypes...> {
965-
static_assert(std::is_final<DerivedResult>(),
965+
static_assert(LLVM_IS_FINAL(DerivedResult),
966966
"Expected DerivedResult to be final");
967967
static_assert(
968968
std::is_base_of<MultipleValueInstructionResult, DerivedResult>::value,

branches/master-next/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-next/include/swift/Serialization/BCReadingExtras.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#ifndef SWIFT_SERIALIZATION_BCREADINGEXTRAS_H
1414
#define SWIFT_SERIALIZATION_BCREADINGEXTRAS_H
1515

16-
#include "llvm/Bitstream/BitstreamReader.h"
16+
#include "llvm/Bitcode/BitstreamReader.h"
1717

1818
namespace swift {
1919
namespace serialization {
@@ -38,8 +38,7 @@ class BCOffsetRAII {
3838

3939
~BCOffsetRAII() {
4040
if (Cursor)
41-
cantFail(Cursor->JumpToBit(Offset),
42-
"BCOffsetRAII must be able to go back");
41+
Cursor->JumpToBit(Offset);
4342
}
4443
};
4544

branches/master-next/include/swift/Serialization/ModuleFile.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#include "llvm/ADT/ArrayRef.h"
2626
#include "llvm/ADT/DenseMap.h"
2727
#include "llvm/ADT/TinyPtrVector.h"
28-
#include "llvm/Bitstream/BitstreamReader.h"
28+
#include "llvm/Bitcode/BitstreamReader.h"
2929
#include "llvm/Support/Error.h"
3030
#include "llvm/Support/MemoryBuffer.h"
3131

@@ -502,15 +502,6 @@ class ModuleFile
502502
/// Emits one last diagnostic, logs the error, and then aborts for the stack
503503
/// trace.
504504
LLVM_ATTRIBUTE_NORETURN void fatal(llvm::Error error);
505-
void fatalIfNotSuccess(llvm::Error error) {
506-
if (error)
507-
fatal(std::move(error));
508-
}
509-
template <typename T> T fatalIfUnexpected(llvm::Expected<T> expected) {
510-
if (expected)
511-
return std::move(expected.get());
512-
fatal(expected.takeError());
513-
}
514505

515506
ASTContext &getContext() const {
516507
assert(FileContext && "no associated context yet");

branches/master-next/include/swift/Serialization/ModuleFormat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "swift/AST/Decl.h"
2323
#include "swift/AST/Types.h"
2424
#include "llvm/Bitcode/RecordLayout.h"
25-
#include "llvm/Bitstream/BitCodes.h"
25+
#include "llvm/Bitcode/BitCodes.h"
2626
#include "llvm/ADT/PointerEmbeddedInt.h"
2727

2828
namespace swift {

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1352,7 +1352,6 @@ Type IntrinsicTypeDecoder::decodeImmediate() {
13521352
case IITDescriptor::HalfVecArgument:
13531353
case IITDescriptor::VarArg:
13541354
case IITDescriptor::Token:
1355-
case IITDescriptor::VecElementArgument:
13561355
case IITDescriptor::VecOfAnyPtrsToElt:
13571356
// These types cannot be expressed in swift yet.
13581357
return Type();

branches/master-next/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-next/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-next/lib/Basic/FileSystem.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,16 +197,16 @@ std::error_code swift::moveFileIfDifferent(const llvm::Twine &source,
197197
same = true;
198198
} else {
199199
std::error_code sourceRegionErr;
200-
fs::mapped_file_region sourceRegion(
201-
fs::convertFDToNativeFile(sourceFile.fd),
202-
fs::mapped_file_region::readonly, size, 0, sourceRegionErr);
200+
fs::mapped_file_region sourceRegion(sourceFile.fd,
201+
fs::mapped_file_region::readonly,
202+
size, 0, sourceRegionErr);
203203
if (sourceRegionErr)
204204
return sourceRegionErr;
205205

206206
std::error_code destRegionErr;
207-
fs::mapped_file_region destRegion(fs::convertFDToNativeFile(destFile.fd),
208-
fs::mapped_file_region::readonly, size,
209-
0, destRegionErr);
207+
fs::mapped_file_region destRegion(destFile.fd,
208+
fs::mapped_file_region::readonly,
209+
size, 0, destRegionErr);
210210

211211
if (!destRegionErr) {
212212
same = (0 == memcmp(sourceRegion.const_data(), destRegion.const_data(),

branches/master-next/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:

branches/master-next/lib/ClangImporter/ClangAdapter.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -436,21 +436,6 @@ OmissionTypeName importer::getClangTypeNameForOmission(clang::ASTContext &ctx,
436436
// OpenMP types that don't have Swift equivalents.
437437
case clang::BuiltinType::OMPArraySection:
438438
return OmissionTypeName();
439-
440-
// SVE builtin types that don't have Swift equivalents.
441-
case clang::BuiltinType::SveInt8:
442-
case clang::BuiltinType::SveInt16:
443-
case clang::BuiltinType::SveInt32:
444-
case clang::BuiltinType::SveInt64:
445-
case clang::BuiltinType::SveUint8:
446-
case clang::BuiltinType::SveUint16:
447-
case clang::BuiltinType::SveUint32:
448-
case clang::BuiltinType::SveUint64:
449-
case clang::BuiltinType::SveFloat16:
450-
case clang::BuiltinType::SveFloat32:
451-
case clang::BuiltinType::SveFloat64:
452-
case clang::BuiltinType::SveBool:
453-
return OmissionTypeName();
454439
}
455440
}
456441

0 commit comments

Comments
 (0)