Skip to content

Commit 5c36c58

Browse files
committed
---
yaml --- r: 349129 b: refs/heads/master c: 0381ae8 h: refs/heads/master i: 349127: b5f8afa
1 parent bf149d9 commit 5c36c58

File tree

9 files changed

+10
-47
lines changed

9 files changed

+10
-47
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: ff8c6e2571feb5e7923cab2e4e9da3c59d0da48a
2+
refs/heads/master: 0381ae866683b4cb9c613859ec2b91925856e838
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/include/swift/SIL/SILDeclRef.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,6 @@ struct SILDeclRef {
249249
bool isStoredPropertyInitializer() const {
250250
return kind == Kind::StoredPropertyInitializer;
251251
}
252-
/// True if the SILDeclRef references the initializer for the backing storage
253-
/// of a property wrapper.
254-
bool isPropertyWrapperBackingInitializer() const {
255-
return kind == Kind::PropertyWrapperBackingInitializer;
256-
}
257252

258253
/// True if the SILDeclRef references the ivar initializer or deinitializer of
259254
/// a class.

trunk/lib/Frontend/Frontend.cpp

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -318,23 +318,6 @@ void CompilerInstance::setUpDiagnosticOptions() {
318318
}
319319
}
320320

321-
// The ordering of ModuleLoaders is important!
322-
//
323-
// 1. SourceLoader: This is a hack and only the compiler's tests are using it,
324-
// to avoid writing repetitive code involving generating modules/interfaces.
325-
// Ideally, we'd get rid of it.
326-
// 2. MemoryBufferSerializedModuleLoader: This is used by LLDB, because it might
327-
// already have the module available in memory.
328-
// 3. ModuleInterfaceLoader: Tries to find an up-to-date swiftmodule. If it
329-
// succeeds, it issues a particular "error" (see
330-
// [Note: ModuleInterfaceLoader-defer-to-SerializedModuleLoader]), which
331-
// is interpreted by the overarching loader as a command to use the
332-
// SerializedModuleLoader. If we failed to find a .swiftmodule, this falls
333-
// back to using an interface. Actual errors lead to diagnostics.
334-
// 4. SerializedModuleLoader: Loads a serialized module if it can.
335-
// 5. ClangImporter: This must come after all the Swift module loaders because
336-
// in the presence of overlays and mixed-source frameworks, we want to prefer
337-
// the overlay or framework module over the underlying Clang module.
338321
bool CompilerInstance::setUpModuleLoaders() {
339322
if (hasSourceImport()) {
340323
bool enableLibraryEvolution =
@@ -371,6 +354,10 @@ bool CompilerInstance::setUpModuleLoaders() {
371354
Context->addModuleLoader(std::move(MemoryBufferLoader));
372355
}
373356

357+
std::unique_ptr<SerializedModuleLoader> SML =
358+
SerializedModuleLoader::create(*Context, getDependencyTracker(), MLM);
359+
this->SML = SML.get();
360+
374361
// Wire up the Clang importer. If the user has specified an SDK, use it.
375362
// Otherwise, we just keep it around as our interface to Clang's ABI
376363
// knowledge.
@@ -393,12 +380,7 @@ bool CompilerInstance::setUpModuleLoaders() {
393380
FEOpts.RemarkOnRebuildFromModuleInterface);
394381
Context->addModuleLoader(std::move(PIML));
395382
}
396-
397-
std::unique_ptr<SerializedModuleLoader> SML =
398-
SerializedModuleLoader::create(*Context, getDependencyTracker(), MLM);
399-
this->SML = SML.get();
400383
Context->addModuleLoader(std::move(SML));
401-
402384
Context->addModuleLoader(std::move(clangImporter), /*isClang*/ true);
403385

404386
return false;

trunk/lib/Frontend/ModuleInterfaceLoader.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,6 @@ class ModuleInterfaceLoaderImpl {
764764
}
765765
}
766766

767-
// [Note: ModuleInterfaceLoader-defer-to-SerializedModuleLoader]
768767
// Finally, if there's a module adjacent to the .swiftinterface that we can
769768
// _likely_ load (it validates OK and is up to date), bail early with
770769
// errc::not_supported, so the next (serialized) loader in the chain will

trunk/lib/SIL/SILProfiler.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ static bool canCreateProfilerForAST(ASTNode N, SILDeclRef forDecl) {
135135
return true;
136136
} else if (auto *E = N.get<Expr *>()) {
137137
if (forDecl.isStoredPropertyInitializer() ||
138-
forDecl.isPropertyWrapperBackingInitializer() ||
139138
forDecl.getAbstractClosureExpr())
140139
return true;
141140
}
@@ -152,10 +151,8 @@ SILProfiler *SILProfiler::create(SILModule &M, ForDefinition_t forDefinition,
152151
if (!doesASTRequireProfiling(M, N) && Opts.UseProfile.empty())
153152
return nullptr;
154153

155-
if (!canCreateProfilerForAST(N, forDecl)) {
156-
N.dump(llvm::errs());
154+
if (!canCreateProfilerForAST(N, forDecl))
157155
llvm_unreachable("Invalid AST node for profiling");
158-
}
159156

160157
auto *Buf = M.allocate<SILProfiler>(1);
161158
auto *SP =

trunk/lib/SILGen/SILGen.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,11 +1145,10 @@ emitPropertyWrapperBackingInitializer(VarDecl *var) {
11451145
preEmitFunction(constant, var, f, var);
11461146
PrettyStackTraceSILFunction X(
11471147
"silgen emitPropertyWrapperBackingInitializer", f);
1148+
f->createProfiler(var, constant, ForDefinition);
1149+
auto varDC = var->getInnermostDeclContext();
11481150
auto wrapperInfo = var->getPropertyWrapperBackingPropertyInfo();
11491151
assert(wrapperInfo.initializeFromOriginal);
1150-
f->createProfiler(wrapperInfo.initializeFromOriginal, constant,
1151-
ForDefinition);
1152-
auto varDC = var->getInnermostDeclContext();
11531152
SILGenFunction SGF(*this, *f, varDC);
11541153
SGF.emitGeneratorFunction(constant, wrapperInfo.initializeFromOriginal);
11551154
postEmitFunction(constant, f);

trunk/test/NameBinding/name_lookup.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,7 @@ _ = ShadowingGenericParameter<String>().foo(t: "hi")
614614
// rdar://problem/51266778
615615
struct PatternBindingWithTwoVars1 { var x = 3, y = x }
616616
// expected-error@-1 {{cannot use instance member 'x' within property initializer; property initializers run before 'self' is available}}
617+
// expected-error@-2 {{property 'x' references itself}}
617618

618619
struct PatternBindingWithTwoVars2 { var x = y, y = 3 }
619620
// expected-error@-1 {{property 'y' references itself}}

trunk/test/Profiler/coverage_var_init.swift

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
// RUN: %target-swift-frontend -Xllvm -sil-full-demangle -profile-generate -profile-coverage-mapping -emit-sorted-sil -emit-sil -module-name coverage_var_init %s | %FileCheck %s
22

33
final class VarInit {
4-
// CHECK: sil_coverage_map {{.*}} "$s17coverage_var_init7VarInitC018initializedWrapperE0SivpfP"
5-
// CHECK-NEXT: [[@LINE+1]]:4 -> [[@LINE+1]]:38 : 0
6-
@Wrapper var initializedWrapperInit = 2
7-
84
// CHECK: sil_coverage_map {{.*}} "$s17coverage_var_init7VarInitC04lazydE033_49373CB2DFB47C8DC62FA963604688DFLLSSvgSSyXEfU_"
95
// CHECK-NEXT: [[@LINE+1]]:42 -> [[@LINE+3]]:4 : 0
106
private lazy var lazyVarInit: String = {
@@ -27,13 +23,7 @@ final class VarInit {
2723
print(lazyVarInit)
2824
print(basicVarInit)
2925
print(simpleVar)
30-
print(initializedWrapperInit)
3126
}
3227
}
3328

34-
@propertyWrapper struct Wrapper {
35-
init(wrappedValue: Int) {}
36-
var wrappedValue: Int { 1 }
37-
}
38-
3929
VarInit().coverageFunction()

trunk/utils/build-script-impl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3054,7 +3054,7 @@ for host in "${ALL_HOSTS[@]}"; do
30543054
results_dir="${lldb_build_dir}/test-results"
30553055

30563056
call mkdir -p "${results_dir}"
3057-
LLVM_LIT_ARGS="${LLVM_LIT_ARGS} --xunit-xml-output=${results_dir}/results.xml"
3057+
LLVM_LIT_ARG="${LLVM_LIT_ARGS} --xunit-xml-output=${results_dir}/results.xml"
30583058

30593059
if [[ "${ENABLE_ASAN}" ]] ; then
30603060
# Limit the number of parallel tests

0 commit comments

Comments
 (0)