Skip to content

Commit 0eb146f

Browse files
committed
lldb-moduleimport-test: pass correct enableNoncopyableGenerics value to validateSerializedAST()
1 parent e7d7f6f commit 0eb146f

File tree

8 files changed

+3
-28
lines changed

8 files changed

+3
-28
lines changed

test/DWARFImporter/basic.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
// RUN: %empty-directory(%t)
55

6-
// XFAIL: noncopyable_generics
7-
86
// RUN: cp %S/Inputs/objc-header.h %S/Inputs/module.modulemap %t
97
// RUN: %target-build-swift -emit-executable %s -g -o %t/a.out \
108
// RUN: -module-name basic -emit-module -I%t

test/DebugInfo/ASTPrinter-imported-names.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
// RUN: %lldb-moduleimport-test -qualify-types \
88
// RUN: -type-from-mangled=%t/list %t/a.out | %FileCheck %s
99

10-
// XFAIL: noncopyable_generics
11-
1210
// This name should come out fully qualified.
1311
// CHECK: ClangModule.Foo
1412
import ClangModule

test/DebugInfo/ASTSection-single.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
// RUN: %empty-directory(%t)
77

8-
// XFAIL: noncopyable_generics
9-
108
// RUN: echo "public let a0 = 0" >%t/a0.swift
119
// RUN: %target-build-swift %t/a0.swift -emit-module -emit-module-path %t/a0.swiftmodule -I %s/Inputs
1210
// RUN: %target-swift-modulewrap %t/a0.swiftmodule -o %t/a0-mod.o

test/DebugInfo/ASTSection.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// RUN: %empty-directory(%t)
22

3-
// XFAIL: noncopyable_generics
4-
53
// RUN: %target-build-swift -emit-executable %s -g -o %t/ASTSection -emit-module
64
// RUN: %lldb-moduleimport-test -verbose %t/ASTSection | %FileCheck %s
75
// RUN: %lldb-moduleimport-test -filter mips64-unknown-hurd -verbose %t/ASTSection | %FileCheck %s --check-prefix=LINETABLE-CHECK

test/DebugInfo/ASTSectionOverlay.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// RUN: %target-build-swift -c %S/Inputs/overlay.swift -module-name ClangModuleWithOverlay -I %S/Inputs -o %t/ClangModuleWithOverlay.o -parse-as-library
77
// RUN: %target-build-swift -emit-executable %s %t/ClangModuleWithOverlay.o -I %t -g -o %t/ASTSectionOverlay -module-name ASTSectionOverlay -emit-module -Xlinker -add_ast_path -Xlinker %t/ClangModuleWithOverlay.swiftmodule
88

9-
// XFAIL: noncopyable_generics
10-
119
// RUN: %lldb-moduleimport-test -verbose %t/ASTSectionOverlay | %FileCheck %s
1210
// CHECK: Loading ClangModuleWithOverlay
1311
// CHECK-NOT: Loading (overlay) ClangModuleWithOverlay

test/DebugInfo/ASTSection_ObjC.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33

44
// RUN: %empty-directory(%t)
55

6-
// XFAIL: noncopyable_generics
7-
86
// RUN: cp %S/Inputs/serialized-objc-header.h %t
97
// RUN: %target-build-swift -emit-executable %S/ASTSection.swift -g -o %t/ASTSection-with-ObjC -import-objc-header %t/serialized-objc-header.h -DOBJC -module-name ASTSection -emit-module
108
// RUN: %lldb-moduleimport-test -verbose %t/ASTSection-with-ObjC | %FileCheck %s

test/Macros/serialize_plugin_search_paths.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// RUN: %empty-directory(%t)
22

3-
// XFAIL: noncopyable_generics
4-
53
// RUN: %target-build-swift %s -g -o %t/a.out \
64
// RUN: -emit-executable -emit-module \
75
// RUN: -Xfrontend -serialize-debugging-options \

tools/lldb-moduleimport-test/lldb-moduleimport-test.cpp

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,6 @@ int main(int argc, char **argv) {
283283
opt<bool> EnableOSSAModules("enable-ossa-modules", init(false),
284284
desc("Serialize modules in OSSA"), cat(Visible));
285285

286-
opt<bool> EnableNoncopyableGenerics(
287-
"enable-noncopyable-generics",
288-
init(false),
289-
desc("Serialize modules with NoncopyableGenerics"),
290-
cat(Visible));
291-
292286
ParseCommandLineOptions(argc, argv);
293287

294288
// Unregister our options so they don't interfere with the command line
@@ -326,14 +320,16 @@ int main(int argc, char **argv) {
326320
if (Modules.empty())
327321
return 0;
328322

323+
bool enableNoncopyableGenerics = SWIFT_ENABLE_EXPERIMENTAL_NONCOPYABLE_GENERICS;
324+
329325
swift::serialization::ValidationInfo info;
330326
swift::serialization::ExtendedValidationInfo extendedInfo;
331327
llvm::SmallVector<swift::serialization::SearchPath> searchPaths;
332328
for (auto &Module : Modules) {
333329
info = {};
334330
extendedInfo = {};
335331
if (!validateModule(StringRef(Module.first, Module.second), Verbose,
336-
EnableOSSAModules, EnableNoncopyableGenerics,
332+
EnableOSSAModules, enableNoncopyableGenerics,
337333
info, extendedInfo, searchPaths)) {
338334
llvm::errs() << "Malformed module!\n";
339335
return 1;
@@ -359,13 +355,6 @@ int main(int argc, char **argv) {
359355
Invocation.getLangOptions().EnableMemoryBufferImporter = true;
360356
Invocation.getSILOptions().EnableOSSAModules = EnableOSSAModules;
361357

362-
if (EnableNoncopyableGenerics)
363-
Invocation.getLangOptions()
364-
.enableFeature(swift::Feature::NoncopyableGenerics);
365-
else
366-
Invocation.getLangOptions()
367-
.disableFeature(swift::Feature::NoncopyableGenerics);
368-
369358
if (!ResourceDir.empty()) {
370359
Invocation.setRuntimeResourcePath(ResourceDir);
371360
}

0 commit comments

Comments
 (0)