mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
lldb-moduleimport-test: pass correct enableNoncopyableGenerics value to validateSerializedAST()
This commit is contained in:
@@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
// RUN: %empty-directory(%t)
|
// RUN: %empty-directory(%t)
|
||||||
|
|
||||||
// XFAIL: noncopyable_generics
|
|
||||||
|
|
||||||
// RUN: cp %S/Inputs/objc-header.h %S/Inputs/module.modulemap %t
|
// 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: %target-build-swift -emit-executable %s -g -o %t/a.out \
|
||||||
// RUN: -module-name basic -emit-module -I%t
|
// RUN: -module-name basic -emit-module -I%t
|
||||||
|
|||||||
@@ -7,8 +7,6 @@
|
|||||||
// RUN: %lldb-moduleimport-test -qualify-types \
|
// RUN: %lldb-moduleimport-test -qualify-types \
|
||||||
// RUN: -type-from-mangled=%t/list %t/a.out | %FileCheck %s
|
// RUN: -type-from-mangled=%t/list %t/a.out | %FileCheck %s
|
||||||
|
|
||||||
// XFAIL: noncopyable_generics
|
|
||||||
|
|
||||||
// This name should come out fully qualified.
|
// This name should come out fully qualified.
|
||||||
// CHECK: ClangModule.Foo
|
// CHECK: ClangModule.Foo
|
||||||
import ClangModule
|
import ClangModule
|
||||||
|
|||||||
@@ -5,8 +5,6 @@
|
|||||||
|
|
||||||
// RUN: %empty-directory(%t)
|
// RUN: %empty-directory(%t)
|
||||||
|
|
||||||
// XFAIL: noncopyable_generics
|
|
||||||
|
|
||||||
// RUN: echo "public let a0 = 0" >%t/a0.swift
|
// 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-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
|
// RUN: %target-swift-modulewrap %t/a0.swiftmodule -o %t/a0-mod.o
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
// RUN: %empty-directory(%t)
|
// RUN: %empty-directory(%t)
|
||||||
|
|
||||||
// XFAIL: noncopyable_generics
|
|
||||||
|
|
||||||
// RUN: %target-build-swift -emit-executable %s -g -o %t/ASTSection -emit-module
|
// 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 -verbose %t/ASTSection | %FileCheck %s
|
||||||
// RUN: %lldb-moduleimport-test -filter mips64-unknown-hurd -verbose %t/ASTSection | %FileCheck %s --check-prefix=LINETABLE-CHECK
|
// RUN: %lldb-moduleimport-test -filter mips64-unknown-hurd -verbose %t/ASTSection | %FileCheck %s --check-prefix=LINETABLE-CHECK
|
||||||
|
|||||||
@@ -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 -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
|
// 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
|
// RUN: %lldb-moduleimport-test -verbose %t/ASTSectionOverlay | %FileCheck %s
|
||||||
// CHECK: Loading ClangModuleWithOverlay
|
// CHECK: Loading ClangModuleWithOverlay
|
||||||
// CHECK-NOT: Loading (overlay) ClangModuleWithOverlay
|
// CHECK-NOT: Loading (overlay) ClangModuleWithOverlay
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
|
|
||||||
// RUN: %empty-directory(%t)
|
// RUN: %empty-directory(%t)
|
||||||
|
|
||||||
// XFAIL: noncopyable_generics
|
|
||||||
|
|
||||||
// RUN: cp %S/Inputs/serialized-objc-header.h %t
|
// 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: %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
|
// RUN: %lldb-moduleimport-test -verbose %t/ASTSection-with-ObjC | %FileCheck %s
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
// RUN: %empty-directory(%t)
|
// RUN: %empty-directory(%t)
|
||||||
|
|
||||||
// XFAIL: noncopyable_generics
|
|
||||||
|
|
||||||
// RUN: %target-build-swift %s -g -o %t/a.out \
|
// RUN: %target-build-swift %s -g -o %t/a.out \
|
||||||
// RUN: -emit-executable -emit-module \
|
// RUN: -emit-executable -emit-module \
|
||||||
// RUN: -Xfrontend -serialize-debugging-options \
|
// RUN: -Xfrontend -serialize-debugging-options \
|
||||||
|
|||||||
@@ -283,12 +283,6 @@ int main(int argc, char **argv) {
|
|||||||
opt<bool> EnableOSSAModules("enable-ossa-modules", init(false),
|
opt<bool> EnableOSSAModules("enable-ossa-modules", init(false),
|
||||||
desc("Serialize modules in OSSA"), cat(Visible));
|
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);
|
ParseCommandLineOptions(argc, argv);
|
||||||
|
|
||||||
// Unregister our options so they don't interfere with the command line
|
// 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())
|
if (Modules.empty())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
bool enableNoncopyableGenerics = SWIFT_ENABLE_EXPERIMENTAL_NONCOPYABLE_GENERICS;
|
||||||
|
|
||||||
swift::serialization::ValidationInfo info;
|
swift::serialization::ValidationInfo info;
|
||||||
swift::serialization::ExtendedValidationInfo extendedInfo;
|
swift::serialization::ExtendedValidationInfo extendedInfo;
|
||||||
llvm::SmallVector<swift::serialization::SearchPath> searchPaths;
|
llvm::SmallVector<swift::serialization::SearchPath> searchPaths;
|
||||||
@@ -333,7 +329,7 @@ int main(int argc, char **argv) {
|
|||||||
info = {};
|
info = {};
|
||||||
extendedInfo = {};
|
extendedInfo = {};
|
||||||
if (!validateModule(StringRef(Module.first, Module.second), Verbose,
|
if (!validateModule(StringRef(Module.first, Module.second), Verbose,
|
||||||
EnableOSSAModules, EnableNoncopyableGenerics,
|
EnableOSSAModules, enableNoncopyableGenerics,
|
||||||
info, extendedInfo, searchPaths)) {
|
info, extendedInfo, searchPaths)) {
|
||||||
llvm::errs() << "Malformed module!\n";
|
llvm::errs() << "Malformed module!\n";
|
||||||
return 1;
|
return 1;
|
||||||
@@ -359,13 +355,6 @@ int main(int argc, char **argv) {
|
|||||||
Invocation.getLangOptions().EnableMemoryBufferImporter = true;
|
Invocation.getLangOptions().EnableMemoryBufferImporter = true;
|
||||||
Invocation.getSILOptions().EnableOSSAModules = EnableOSSAModules;
|
Invocation.getSILOptions().EnableOSSAModules = EnableOSSAModules;
|
||||||
|
|
||||||
if (EnableNoncopyableGenerics)
|
|
||||||
Invocation.getLangOptions()
|
|
||||||
.enableFeature(swift::Feature::NoncopyableGenerics);
|
|
||||||
else
|
|
||||||
Invocation.getLangOptions()
|
|
||||||
.disableFeature(swift::Feature::NoncopyableGenerics);
|
|
||||||
|
|
||||||
if (!ResourceDir.empty()) {
|
if (!ResourceDir.empty()) {
|
||||||
Invocation.setRuntimeResourcePath(ResourceDir);
|
Invocation.setRuntimeResourcePath(ResourceDir);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user