Skip to content

Commit 1c9b090

Browse files
committed
Merge remote-tracking branch 'origin/master-next'
# Conflicts: # include/swift/Frontend/FrontendInputsAndOutputs.h
2 parents 3eb82c1 + 77cbdee commit 1c9b090

Some content is hidden

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

53 files changed

+261
-233
lines changed

include/swift/AST/ClangNode.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ class ClangNode {
4848
template <typename T>
4949
using Box = detail::ClangNodeBox<T>;
5050

51-
llvm::PointerUnion4<Box<clang::Decl>, Box<clang::MacroInfo>,
52-
Box<clang::ModuleMacro>, Box<clang::Module>> Ptr;
51+
llvm::PointerUnion<Box<clang::Decl>, Box<clang::MacroInfo>,
52+
Box<clang::ModuleMacro>, Box<clang::Module>> Ptr;
5353

5454
public:
5555
ClangNode() = default;

include/swift/AST/SimpleRequest.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "swift/Basic/TypeID.h"
2525
#include "llvm/ADT/Hashing.h"
2626
#include "llvm/ADT/STLExtras.h"
27+
#include "llvm/Support/Error.h"
2728
#include <tuple>
2829
#include <type_traits>
2930

include/swift/AST/SourceFile.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -688,9 +688,11 @@ struct DenseMapInfo<swift::SourceFile::ImportedModuleDesc> {
688688
StringRefDMI::getTombstoneKey());
689689
}
690690
static inline unsigned getHashValue(const ImportedModuleDesc &import) {
691-
return combineHashValue(ImportedModuleDMI::getHashValue(import.module),
692-
combineHashValue(ImportOptionsDMI::getHashValue(import.importOptions),
693-
StringRefDMI::getHashValue(import.filename)));
691+
return detail::combineHashValue(
692+
ImportedModuleDMI::getHashValue(import.module),
693+
detail::combineHashValue(
694+
ImportOptionsDMI::getHashValue(import.importOptions),
695+
StringRefDMI::getHashValue(import.filename)));
694696
}
695697
static bool isEqual(const ImportedModuleDesc &a,
696698
const ImportedModuleDesc &b) {

include/swift/Basic/STLExtras.h

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -69,51 +69,6 @@ struct function_traits<R (T::*)(Args...) const> {
6969
using argument_types = std::tuple<Args...>;
7070
};
7171

72-
} // end namespace swift
73-
74-
#if !defined(swiftCore_EXPORTS)
75-
namespace llvm {
76-
77-
/// @{
78-
79-
/// An STL-style algorithm similar to std::for_each that applies a second
80-
/// functor between every pair of elements.
81-
///
82-
/// This provides the control flow logic to, for example, print a
83-
/// comma-separated list:
84-
/// \code
85-
/// interleave(names.begin(), names.end(),
86-
/// [&](StringRef name) { OS << name; },
87-
/// [&] { OS << ", "; });
88-
/// \endcode
89-
template <typename ForwardIterator, typename UnaryFunctor,
90-
typename NullaryFunctor>
91-
inline void interleave(ForwardIterator begin, ForwardIterator end,
92-
UnaryFunctor each_fn,
93-
NullaryFunctor between_fn) {
94-
if (begin == end)
95-
return;
96-
each_fn(*begin);
97-
++begin;
98-
for (; begin != end; ++begin) {
99-
between_fn();
100-
each_fn(*begin);
101-
}
102-
}
103-
104-
template <typename Container, typename UnaryFunctor, typename NullaryFunctor>
105-
inline void interleave(const Container &c, UnaryFunctor each_fn,
106-
NullaryFunctor between_fn) {
107-
interleave(c.begin(), c.end(), each_fn, between_fn);
108-
}
109-
110-
/// @}
111-
112-
} // end namespace llvm
113-
#endif
114-
115-
namespace swift {
116-
11772
/// @{
11873

11974
/// The equivalent of std::for_each, but for two lists at once.

include/swift/ClangImporter/ClangModule.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "swift/AST/FileUnit.h"
2020
#include "swift/ClangImporter/ClangImporter.h"
2121
#include "clang/AST/ExternalASTSource.h"
22+
#include "clang/Basic/Module.h"
2223

2324
namespace clang {
2425
class ASTContext;
@@ -37,7 +38,7 @@ class ClangModuleUnit final : public LoadedFile {
3738
llvm::PointerIntPair<ModuleDecl *, 1, bool> overlayModule;
3839
mutable Optional<ArrayRef<ModuleDecl::ImportedModule>> importedModulesForLookup;
3940
/// The metadata of the underlying Clang module.
40-
clang::ExternalASTSource::ASTSourceDescriptor ASTSourceDescriptor;
41+
clang::ASTSourceDescriptor ASTSourceDescriptor;
4142

4243
public:
4344
/// True if the given Module contains an imported Clang module unit.
@@ -115,8 +116,7 @@ class ClangModuleUnit final : public LoadedFile {
115116

116117
/// Returns the ASTSourceDescriptor of the associated Clang module if one
117118
/// exists.
118-
Optional<clang::ExternalASTSource::ASTSourceDescriptor>
119-
getASTSourceDescriptor() const;
119+
Optional<clang::ASTSourceDescriptor> getASTSourceDescriptor() const;
120120

121121
virtual StringRef getModuleDefiningPath() const override;
122122

include/swift/Frontend/FrontendInputsAndOutputs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "swift/Basic/SupplementaryOutputPaths.h"
1818
#include "swift/Frontend/InputFile.h"
1919
#include "llvm/ADT/Hashing.h"
20+
#include "llvm/ADT/StringMap.h"
2021

2122
#include <string>
2223
#include <vector>

include/swift/Parse/ParsedRawSyntaxNode.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ class ParsedRawSyntaxNode {
9898
assert(DeferredToken.NumTrailingTrivia == numTrailingTrivia &&
9999
"numLeadingTrivia is too large value!");
100100
}
101-
ParsedRawSyntaxNode(ParsedRawSyntaxNode &other) = delete;
102-
ParsedRawSyntaxNode &operator=(ParsedRawSyntaxNode &other) = delete;
101+
ParsedRawSyntaxNode(const ParsedRawSyntaxNode &other) = delete;
102+
ParsedRawSyntaxNode &operator=(const ParsedRawSyntaxNode &other) = delete;
103103

104104
public:
105105
ParsedRawSyntaxNode()

include/swift/SIL/SILLocation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class SILLocation {
6565
using type = Pattern;
6666
};
6767

68-
using ASTNodeTy = llvm::PointerUnion4<Stmt *, Expr *, Decl *, Pattern *>;
68+
using ASTNodeTy = llvm::PointerUnion<Stmt *, Expr *, Decl *, Pattern *>;
6969

7070
public:
7171
enum LocationKind : unsigned {

include/swift/SIL/SILNode.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include "llvm/Support/Compiler.h"
2121
#include "llvm/ADT/DenseMapInfo.h"
22+
#include "llvm/Support/PointerLikeTypeTraits.h"
2223
#include "swift/Basic/InlineBitfield.h"
2324
#include "swift/Basic/LLVM.h"
2425
#include <type_traits>

lib/AST/ASTPrinter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include "clang/AST/Decl.h"
4848
#include "clang/AST/DeclObjC.h"
4949
#include "clang/Basic/Module.h"
50+
#include "clang/Basic/SourceManager.h"
5051
#include "llvm/ADT/StringSwitch.h"
5152
#include "llvm/Support/Compiler.h"
5253
#include "llvm/Support/ConvertUTF.h"

0 commit comments

Comments
 (0)