lldb-moduleimport-test: pass correct enableNoncopyableGenerics value to validateSerializedAST()

This commit is contained in:
Slava Pestov
2024-02-20 17:33:08 -05:00
parent e7d7f6f69f
commit 0eb146f50a
8 changed files with 3 additions and 28 deletions

View File

@@ -3,8 +3,6 @@
// RUN: %empty-directory(%t)
// XFAIL: noncopyable_generics
// RUN: cp %S/Inputs/objc-header.h %S/Inputs/module.modulemap %t
// RUN: %target-build-swift -emit-executable %s -g -o %t/a.out \
// RUN: -module-name basic -emit-module -I%t

View File

@@ -7,8 +7,6 @@
// RUN: %lldb-moduleimport-test -qualify-types \
// RUN: -type-from-mangled=%t/list %t/a.out | %FileCheck %s
// XFAIL: noncopyable_generics
// This name should come out fully qualified.
// CHECK: ClangModule.Foo
import ClangModule

View File

@@ -5,8 +5,6 @@
// RUN: %empty-directory(%t)
// XFAIL: noncopyable_generics
// RUN: echo "public let a0 = 0" >%t/a0.swift
// RUN: %target-build-swift %t/a0.swift -emit-module -emit-module-path %t/a0.swiftmodule -I %s/Inputs
// RUN: %target-swift-modulewrap %t/a0.swiftmodule -o %t/a0-mod.o

View File

@@ -1,7 +1,5 @@
// RUN: %empty-directory(%t)
// XFAIL: noncopyable_generics
// RUN: %target-build-swift -emit-executable %s -g -o %t/ASTSection -emit-module
// RUN: %lldb-moduleimport-test -verbose %t/ASTSection | %FileCheck %s
// RUN: %lldb-moduleimport-test -filter mips64-unknown-hurd -verbose %t/ASTSection | %FileCheck %s --check-prefix=LINETABLE-CHECK

View File

@@ -6,8 +6,6 @@
// RUN: %target-build-swift -c %S/Inputs/overlay.swift -module-name ClangModuleWithOverlay -I %S/Inputs -o %t/ClangModuleWithOverlay.o -parse-as-library
// 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
// XFAIL: noncopyable_generics
// RUN: %lldb-moduleimport-test -verbose %t/ASTSectionOverlay | %FileCheck %s
// CHECK: Loading ClangModuleWithOverlay
// CHECK-NOT: Loading (overlay) ClangModuleWithOverlay

View File

@@ -3,8 +3,6 @@
// RUN: %empty-directory(%t)
// XFAIL: noncopyable_generics
// RUN: cp %S/Inputs/serialized-objc-header.h %t
// 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
// RUN: %lldb-moduleimport-test -verbose %t/ASTSection-with-ObjC | %FileCheck %s

View File

@@ -1,7 +1,5 @@
// RUN: %empty-directory(%t)
// XFAIL: noncopyable_generics
// RUN: %target-build-swift %s -g -o %t/a.out \
// RUN: -emit-executable -emit-module \
// RUN: -Xfrontend -serialize-debugging-options \

View File

@@ -283,12 +283,6 @@ int main(int argc, char **argv) {
opt<bool> EnableOSSAModules("enable-ossa-modules", init(false),
desc("Serialize modules in OSSA"), cat(Visible));
opt<bool> EnableNoncopyableGenerics(
"enable-noncopyable-generics",
init(false),
desc("Serialize modules with NoncopyableGenerics"),
cat(Visible));
ParseCommandLineOptions(argc, argv);
// Unregister our options so they don't interfere with the command line
@@ -326,6 +320,8 @@ int main(int argc, char **argv) {
if (Modules.empty())
return 0;
bool enableNoncopyableGenerics = SWIFT_ENABLE_EXPERIMENTAL_NONCOPYABLE_GENERICS;
swift::serialization::ValidationInfo info;
swift::serialization::ExtendedValidationInfo extendedInfo;
llvm::SmallVector<swift::serialization::SearchPath> searchPaths;
@@ -333,7 +329,7 @@ int main(int argc, char **argv) {
info = {};
extendedInfo = {};
if (!validateModule(StringRef(Module.first, Module.second), Verbose,
EnableOSSAModules, EnableNoncopyableGenerics,
EnableOSSAModules, enableNoncopyableGenerics,
info, extendedInfo, searchPaths)) {
llvm::errs() << "Malformed module!\n";
return 1;
@@ -359,13 +355,6 @@ int main(int argc, char **argv) {
Invocation.getLangOptions().EnableMemoryBufferImporter = true;
Invocation.getSILOptions().EnableOSSAModules = EnableOSSAModules;
if (EnableNoncopyableGenerics)
Invocation.getLangOptions()
.enableFeature(swift::Feature::NoncopyableGenerics);
else
Invocation.getLangOptions()
.disableFeature(swift::Feature::NoncopyableGenerics);
if (!ResourceDir.empty()) {
Invocation.setRuntimeResourcePath(ResourceDir);
}