Skip to content

Commit d6e0eb2

Browse files
authored
---
yaml --- r: 314363 b: refs/heads/master c: 6674043 h: refs/heads/master i: 314361: d813b75 314359: ac56655
1 parent 589aee7 commit d6e0eb2

File tree

15 files changed

+216
-349
lines changed

15 files changed

+216
-349
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 57f6fc203f0c927fb476444188b6554a2e9d7462
2+
refs/heads/master: 667404345450b4a9eb83c0620daa233044955ea3
33
refs/heads/master-next: 66a7e661ff8e88e2d4efab3e430197a7a941e352
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/include/swift/Basic/STLExtras.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,17 @@ Iterator removeAdjacentIf(const Iterator first, const Iterator last,
862862
return insertionPoint;
863863
}
864864

865+
namespace detail {
866+
template <bool...> struct bool_pack;
867+
} // namespace detail
868+
869+
template <bool... b>
870+
using all_true =
871+
std::is_same<detail::bool_pack<b..., true>, detail::bool_pack<true, b...>>;
872+
873+
/// traits class for checking whether Ts consists only of compound types.
874+
template <class... Ts>
875+
using are_all_compound = all_true<std::is_compound<Ts>::value...>;
865876

866877
} // end namespace swift
867878

trunk/include/swift/Frontend/Frontend.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,12 @@ class CompilerInvocation {
291291

292292
void setCodeCompletionFactory(CodeCompletionCallbacksFactory *Factory) {
293293
CodeCompletionFactory = Factory;
294+
disableASTScopeLookup();
295+
}
296+
297+
/// Called from lldb, see rdar://53971116
298+
void disableASTScopeLookup() {
299+
LangOpts.EnableASTScopeLookup = false;
294300
}
295301

296302
CodeCompletionCallbacksFactory *getCodeCompletionFactory() const {

trunk/include/swift/Frontend/ParseableInterfaceModuleLoader.h

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12+
///
1213
/// \file This implements the logic for loading and building parseable module
1314
/// interfaces.
1415
///
@@ -102,22 +103,25 @@
102103
///
103104
//===----------------------------------------------------------------------===//
104105

106+
#ifndef SWIFT_FRONTEND_PARSEABLEINTERFACEMODULELOADER_H
107+
#define SWIFT_FRONTEND_PARSEABLEINTERFACEMODULELOADER_H
108+
105109
#include "swift/Basic/LLVM.h"
106110
#include "swift/Frontend/ParseableInterfaceSupport.h"
107111
#include "swift/Serialization/SerializedModuleLoader.h"
108112

109113
namespace clang {
110-
class CompilerInstance;
114+
class CompilerInstance;
111115
}
112116

113117
namespace unittest {
114-
class ParseableInterfaceModuleLoaderTest;
118+
class ParseableInterfaceModuleLoaderTest;
115119
}
116120

117121
namespace swift {
118122

119-
class LangOptions;
120-
class SearchPathOptions;
123+
class LangOptions;
124+
class SearchPathOptions;
121125

122126
/// A ModuleLoader that runs a subordinate \c CompilerInvocation and
123127
/// \c CompilerInstance to convert .swiftinterface files to .swiftmodule
@@ -182,3 +186,5 @@ std::string
182186
getModuleCachePathFromClang(const clang::CompilerInstance &Instance);
183187

184188
}
189+
190+
#endif

trunk/include/swift/SIL/InstructionUtils.h

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -142,48 +142,6 @@ bool onlyUsedByAssignByWrapper(PartialApplyInst *PAI);
142142
void findClosuresForFunctionValue(SILValue V,
143143
TinyPtrVector<PartialApplyInst *> &results);
144144

145-
/// A utility class for evaluating whether a newly parsed or deserialized
146-
/// function has qualified or unqualified ownership.
147-
///
148-
/// The reason that we are using this is that we would like to avoid needing to
149-
/// add code to the SILParser or to the Serializer to support this temporary
150-
/// staging concept of a function having qualified or unqualified
151-
/// ownership. Once SemanticARC is complete, SILFunctions will always have
152-
/// qualified ownership, so the notion of an unqualified ownership function will
153-
/// no longer exist.
154-
///
155-
/// Thus we note that there are three sets of instructions in SIL from an
156-
/// ownership perspective:
157-
///
158-
/// a. ownership qualified instructions
159-
/// b. ownership unqualified instructions
160-
/// c. instructions that do not have ownership semantics (think literals,
161-
/// geps, etc).
162-
///
163-
/// The set of functions can be split into ownership qualified and ownership
164-
/// unqualified using the rules that:
165-
///
166-
/// a. a function can never contain both ownership qualified and ownership
167-
/// unqualified instructions.
168-
/// b. a function that contains only instructions without ownership semantics
169-
/// is considered ownership qualified.
170-
///
171-
/// Thus we can know when parsing/serializing what category of function we have
172-
/// and set the bit appropriately.
173-
class FunctionOwnershipEvaluator {
174-
NullablePtr<SILFunction> F;
175-
bool HasOwnershipQualifiedInstruction = false;
176-
177-
public:
178-
FunctionOwnershipEvaluator() {}
179-
FunctionOwnershipEvaluator(SILFunction *F) : F(F) {}
180-
void reset(SILFunction *NewF) {
181-
F = NewF;
182-
HasOwnershipQualifiedInstruction = false;
183-
}
184-
bool evaluate(SILInstruction *I);
185-
};
186-
187145
} // end namespace swift
188146

189147
#endif

0 commit comments

Comments
 (0)