diff --git a/SwiftCompilerSources/Sources/Optimizer/ModulePasses/MandatoryPerformanceOptimizations.swift b/SwiftCompilerSources/Sources/Optimizer/ModulePasses/MandatoryPerformanceOptimizations.swift index 6cd09ef54cdb7..233a22ac476a9 100644 --- a/SwiftCompilerSources/Sources/Optimizer/ModulePasses/MandatoryPerformanceOptimizations.swift +++ b/SwiftCompilerSources/Sources/Optimizer/ModulePasses/MandatoryPerformanceOptimizations.swift @@ -58,10 +58,6 @@ private func optimize(function: Function, _ context: FunctionPassContext) { switch instruction { case let apply as FullApplySite: inlineAndDevirtualize(apply: apply, context, simplifyCtxt) - case let mt as MetatypeInst: - if mt.isTriviallyDeadIgnoringDebugUses { - simplifyCtxt.erase(instructionIncludingDebugUses: mt) - } default: break } @@ -69,6 +65,8 @@ private func optimize(function: Function, _ context: FunctionPassContext) { _ = context.specializeApplies(in: function, isMandatory: true) + removeUnusedMetatypeInstructions(in: function, context) + // If this is a just specialized function, try to optimize copy_addr, etc. if context.optimizeMemoryAccesses(in: function) { _ = context.eliminateDeadAllocations(in: function) @@ -103,6 +101,15 @@ private func inlineAndDevirtualize(apply: FullApplySite, _ context: FunctionPass } } +private func removeUnusedMetatypeInstructions(in function: Function, _ context: FunctionPassContext) { + for inst in function.instructions { + if let mt = inst as? MetatypeInst, + mt.isTriviallyDeadIgnoringDebugUses { + context.erase(instructionIncludingDebugUses: mt) + } + } +} + private func shouldInline(apply: FullApplySite, callee: Function) -> Bool { if callee.isTransparent { return true diff --git a/include/swift/AST/DiagnosticEngine.h b/include/swift/AST/DiagnosticEngine.h index df9130b971694..fce04b13d43b7 100644 --- a/include/swift/AST/DiagnosticEngine.h +++ b/include/swift/AST/DiagnosticEngine.h @@ -564,6 +564,15 @@ namespace swift { /// until the next major language version. InFlightDiagnostic &warnUntilSwiftVersion(unsigned majorVersion); + /// Limit the diagnostic behavior to warning if the context is a + /// swiftinterface. + /// + /// This is useful for diagnostics for restrictions that may be lifted by a + /// future version of the compiler. In such cases, it may be helpful to + /// avoid failing to build a module from its interface if the interface was + /// emitted using a compiler that no longer has the restriction. + InFlightDiagnostic &warnInSwiftInterface(const DeclContext *context); + /// Conditionally limit the diagnostic behavior to warning until /// the specified version. If the condition is false, no limit is /// imposed, meaning (presumably) it is treated as an error. diff --git a/include/swift/AST/DiagnosticsSema.def b/include/swift/AST/DiagnosticsSema.def index 88358f0d2ace7..63cde20ba0480 100644 --- a/include/swift/AST/DiagnosticsSema.def +++ b/include/swift/AST/DiagnosticsSema.def @@ -7053,6 +7053,10 @@ ERROR(attr_incompatible_with_back_deploy,none, "'%0' cannot be applied to a back deployed %1", (DeclAttribute, DescriptiveDeclKind)) +ERROR(backdeployed_opaque_result_not_supported,none, + "'%0' is unsupported on a %1 with a 'some' return type", + (DeclAttribute, DescriptiveDeclKind)) + //------------------------------------------------------------------------------ // MARK: Implicit opening of existential types //------------------------------------------------------------------------------ diff --git a/include/swift/AST/PluginLoader.h b/include/swift/AST/PluginLoader.h index d2ad612116882..5ef31029af38f 100644 --- a/include/swift/AST/PluginLoader.h +++ b/include/swift/AST/PluginLoader.h @@ -52,30 +52,19 @@ class PluginLoader { void setRegistry(PluginRegistry *newValue); PluginRegistry *getRegistry(); - /// Lookup a library plugin that can handle \p moduleName and return the path - /// to it from `-load-plugin-library`. - /// The path returned can be loaded by 'loadLibraryPlugin' method. - llvm::Optional - lookupExplicitLibraryPluginByModuleName(Identifier moduleName); - - /// Lookup a library plugin that can handle \p moduleName and return the path - /// to it from `-plugin-path`. - /// The path returned can be loaded by 'loadLibraryPlugin' method. - llvm::Optional - lookupLibraryPluginInSearchPathByModuleName(Identifier moduleName); - - /// Lookup an executable plugin that is declared to handle \p moduleName - /// module by '-load-plugin-executable'. - /// The path returned can be loaded by 'loadExecutablePlugin' method. - llvm::Optional - lookupExecutablePluginByModuleName(Identifier moduleName); - - /// Look for dynamic libraries in paths from `-external-plugin-path` and - /// return a pair of `(library path, plugin server executable)` if found. - /// These paths are valid within the VFS, use `FS.getRealPath()` for their - /// underlying path. - llvm::Optional> - lookupExternalLibraryPluginByModuleName(Identifier moduleName); + /// Lookup a plugin that can handle \p moduleName and return the path(s) to + /// it. The path returned can be loaded by 'load(Library|Executable)Plugin()'. + /// The return value is a pair of a "library path" and a "executable path". + /// + /// * (libPath: empty, execPath: empty) - plugin not found. + /// * (libPath: some, execPath: empty) - load the library path by + /// 'loadLibraryPlugin()'. + /// * (libPath: empty, execPath: some) - load the executable path by + /// 'loadExecutablePlugin()'. + /// * (libPath: some, execPath: some) - load the executable path by + /// 'loadExecutablePlugin()' and let the plugin load the libPath via IPC. + std::pair + lookupPluginByModuleName(Identifier moduleName); /// Load the specified dylib plugin path resolving the path with the /// current VFS. If it fails to load the plugin, a diagnostic is emitted, and diff --git a/include/swift/AST/SearchPathOptions.h b/include/swift/AST/SearchPathOptions.h index 74bc7d175af11..be355091b29d6 100644 --- a/include/swift/AST/SearchPathOptions.h +++ b/include/swift/AST/SearchPathOptions.h @@ -15,6 +15,7 @@ #include "swift/Basic/ArrayRefView.h" #include "swift/Basic/PathRemapper.h" +#include "swift/Basic/TaggedUnion.h" #include "llvm/ADT/Hashing.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/ADT/StringMap.h" @@ -34,7 +35,6 @@ enum class ModuleSearchPathKind { Framework, DarwinImplicitFramework, RuntimeLibrary, - CompilerPlugin, }; /// A single module search path that can come from different sources, e.g. @@ -187,6 +187,26 @@ struct ExternalPluginSearchPathAndServerPath { std::string ServerPath; }; +namespace PluginSearchOption { +struct LoadPluginLibrary { + std::string LibraryPath; +}; +struct LoadPluginExecutable { + std::string ExecutablePath; + std::vector ModuleNames; +}; +struct PluginPath { + std::string SearchPath; +}; +struct ExternalPluginPath { + std::string SearchPath; + std::string ServerPath; +}; + +using Value = TaggedUnion; +} // namespace PluginSearchOption + /// Options for controlling search path behavior. class SearchPathOptions { /// To call \c addImportSearchPath and \c addFrameworkSearchPath from @@ -259,14 +279,6 @@ class SearchPathOptions { ImportSearchPaths.size() - 1); } - void addCompilerPluginLibraryPath(StringRef Path, llvm::vfs::FileSystem *FS) { - CompilerPluginLibraryPaths.push_back(Path.str()); - Lookup.searchPathAdded(FS, CompilerPluginLibraryPaths.back(), - ModuleSearchPathKind::CompilerPlugin, - /*isSystem=*/false, - CompilerPluginLibraryPaths.size() - 1); - } - /// Add a single framework search path. Must only be called from /// \c ASTContext::addSearchPath. void addFrameworkSearchPath(FrameworkSearchPath NewPath, @@ -355,27 +367,6 @@ class SearchPathOptions { Lookup.searchPathsDidChange(); } - void setCompilerPluginLibraryPaths( - std::vector NewCompilerPluginLibraryPaths) { - CompilerPluginLibraryPaths = NewCompilerPluginLibraryPaths; - Lookup.searchPathsDidChange(); - } - - ArrayRef getCompilerPluginLibraryPaths() const { - return CompilerPluginLibraryPaths; - } - - void setCompilerPluginExecutablePaths( - std::vector &&newValue) { - CompilerPluginExecutablePaths = std::move(newValue); - Lookup.searchPathsDidChange(); - } - - ArrayRef - getCompilerPluginExecutablePaths() const { - return CompilerPluginExecutablePaths; - } - /// Path(s) to virtual filesystem overlay YAML files. std::vector VFSOverlayFiles; @@ -391,15 +382,8 @@ class SearchPathOptions { /// preference. std::vector RuntimeLibraryPaths; - /// Paths that contain compiler plugins loaded on demand for, e.g., - /// macro implementations. - std::vector PluginSearchPaths; - - /// Pairs of external compiler plugin search paths and the corresponding - /// plugin server executables. - /// e.g. {"/path/to/usr/lib/swift/host/plugins", - /// "/path/to/usr/bin/plugin-server"} - std::vector ExternalPluginSearchPaths; + /// Plugin search path options. + std::vector PluginSearchOpts; /// Don't look in for compiler-provided modules. bool SkipRuntimeLibraryImportPaths = false; diff --git a/include/swift/Frontend/Frontend.h b/include/swift/Frontend/Frontend.h index 56636c17bc8b7..e85733aa66ddc 100644 --- a/include/swift/Frontend/Frontend.h +++ b/include/swift/Frontend/Frontend.h @@ -198,14 +198,6 @@ class CompilerInvocation { SearchPathOpts.VFSOverlayFiles = Overlays; } - void setCompilerPluginLibraryPaths(const std::vector &Paths) { - SearchPathOpts.setCompilerPluginLibraryPaths(Paths); - } - - ArrayRef getCompilerPluginLibraryPaths() { - return SearchPathOpts.getCompilerPluginLibraryPaths(); - } - void setExtraClangArgs(const std::vector &Args) { ClangImporterOpts.ExtraArgs = Args; } diff --git a/include/swift/Option/Options.td b/include/swift/Option/Options.td index 1069d3ea2b10f..dba97b91132e0 100644 --- a/include/swift/Option/Options.td +++ b/include/swift/Option/Options.td @@ -304,15 +304,6 @@ def I : JoinedOrSeparate<["-"], "I">, def I_EQ : Joined<["-"], "I=">, Flags<[FrontendOption, ArgumentIsPath]>, Alias; -def plugin_path : Separate<["-"], "plugin-path">, - Flags<[FrontendOption, ArgumentIsPath, SwiftAPIExtractOption, SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>, - HelpText<"Add directory to the plugin search path">; - -def external_plugin_path : Separate<["-"], "external-plugin-path">, - Flags<[FrontendOption, ArgumentIsPath, SwiftAPIExtractOption, SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>, - HelpText<"Add directory to the plugin search path with a plugin server executable">, - MetaVarName<"#">; - def import_underlying_module : Flag<["-"], "import-underlying-module">, Flags<[FrontendOption, NoInteractiveOption]>, HelpText<"Implicitly imports the Objective-C half of a module">; @@ -1852,15 +1843,27 @@ def clang_include_tree_root: Separate<["-"], "clang-include-tree-root">, Flags<[FrontendOption, NoDriverOption]>, HelpText<"Clang Include Tree CASID">, MetaVarName<"">; + +def plugin_search_Group : OptionGroup<"">; + +def plugin_path : Separate<["-"], "plugin-path">, Group, + Flags<[FrontendOption, ArgumentIsPath, SwiftAPIExtractOption, SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>, + HelpText<"Add directory to the plugin search path">; + +def external_plugin_path : Separate<["-"], "external-plugin-path">, Group, + Flags<[FrontendOption, ArgumentIsPath, SwiftAPIExtractOption, SwiftSymbolGraphExtractOption, SwiftAPIDigesterOption]>, + HelpText<"Add directory to the plugin search path with a plugin server executable">, + MetaVarName<"#">; + def load_plugin_library: - Separate<["-"], "load-plugin-library">, + Separate<["-"], "load-plugin-library">, Group, Flags<[FrontendOption, DoesNotAffectIncrementalBuild, ArgumentIsPath]>, HelpText<"Path to a dynamic library containing compiler plugins such as " "macros">, MetaVarName<"">; def load_plugin_executable: - Separate<["-"], "load-plugin-executable">, + Separate<["-"], "load-plugin-executable">, Group, Flags<[FrontendOption, DoesNotAffectIncrementalBuild, ArgumentIsPath]>, HelpText<"Path to an executable compiler plugins and providing module names " "such as macros">, diff --git a/include/swift/SIL/AbstractionPatternGenerators.h b/include/swift/SIL/AbstractionPatternGenerators.h index 154dde080cb92..bc5684988a9b2 100644 --- a/include/swift/SIL/AbstractionPatternGenerators.h +++ b/include/swift/SIL/AbstractionPatternGenerators.h @@ -291,6 +291,22 @@ class TupleElementGenerator { } } + /// Like `getSubstTypes`, but uses a different and possibly + /// non-canonical tuple type. + TupleEltTypeArrayRef getSubstTypes(Type ncSubstType) const { + assert(!isFinished()); + if (!origTupleVanishes) { + return ncSubstType->castTo() + ->getElementTypes().slice(substEltIndex, + numSubstEltsForOrigElt); + } else if (numSubstEltsForOrigElt == 0) { + return TupleEltTypeArrayRef(); + } else { + scratchSubstElt = TupleTypeElt(ncSubstType); + return TupleEltTypeArrayRef(scratchSubstElt); + } + } + /// Call this to finalize the traversal and assert that it was done /// properly. void finish() { diff --git a/include/swift/SIL/GenericSpecializationMangler.h b/include/swift/SIL/GenericSpecializationMangler.h index 30a7543ff195b..ade99ce92c417 100644 --- a/include/swift/SIL/GenericSpecializationMangler.h +++ b/include/swift/SIL/GenericSpecializationMangler.h @@ -88,7 +88,8 @@ class GenericSpecializationMangler : public SpecializationMangler { : SpecializationMangler(SpecializationPass::GenericSpecializer, Serialized, F) {} - std::string mangleNotReabstracted(SubstitutionMap subs); + std::string mangleNotReabstracted(SubstitutionMap subs, + bool metatyeParamsRemoved); /// Mangle a generic specialization with re-abstracted parameters. /// diff --git a/include/swift/SILOptimizer/Utils/Generics.h b/include/swift/SILOptimizer/Utils/Generics.h index 90f7b97b072f8..b08750fec9608 100644 --- a/include/swift/SILOptimizer/Utils/Generics.h +++ b/include/swift/SILOptimizer/Utils/Generics.h @@ -157,10 +157,6 @@ class ReabstractionInfo { LoadableAndTrivial }; - unsigned param2ArgIndex(unsigned ParamIdx) const { - return ParamIdx + NumFormalIndirectResults; - } - // Create a new substituted type with the updated signature. CanSILFunctionType createSubstitutedType(SILFunction *OrigF, SubstitutionMap SubstMap, @@ -199,8 +195,8 @@ class ReabstractionInfo { ApplySite Apply, SILFunction *Callee, SubstitutionMap ParamSubs, IsSerialized_t Serialized, - bool ConvertIndirectToDirect = true, - bool dropMetatypeArgs = false, + bool ConvertIndirectToDirect, + bool dropMetatypeArgs, OptRemark::Emitter *ORE = nullptr); /// Constructs the ReabstractionInfo for generic function \p Callee with @@ -214,7 +210,11 @@ class ReabstractionInfo { IsSerialized_t isSerialized() const { return Serialized; } - + + unsigned param2ArgIndex(unsigned ParamIdx) const { + return ParamIdx + NumFormalIndirectResults; + } + /// Returns true if the specialized function needs an alternative mangling. /// See hasConvertedResilientParams. bool needAlternativeMangling() const { @@ -314,6 +314,8 @@ class ReabstractionInfo { CanSILFunctionType createSpecializedType(CanSILFunctionType SubstFTy, SILModule &M) const; + CanSILFunctionType createThunkType(PartialApplyInst *forPAI) const; + SILFunction *getNonSpecializedFunction() const { return Callee; } /// Map type into a context of the specialized function. diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index 93c8f0f0959e4..1fd84972038b3 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -103,11 +103,10 @@ llvm::StringRef swift::getProtocolName(KnownProtocolKind kind) { } namespace { - enum class SearchPathKind : uint8_t { - Import = 1 << 0, - Framework = 1 << 1, - CompilerPlugin = 1 << 2 - }; +enum class SearchPathKind : uint8_t { + Import = 1 << 0, + Framework = 1 << 1, +}; } // end anonymous namespace using AssociativityCacheType = @@ -694,8 +693,6 @@ ASTContext::ASTContext( getImpl().SearchPathsSet[path] |= SearchPathKind::Import; for (const auto &framepath : SearchPathOpts.getFrameworkSearchPaths()) getImpl().SearchPathsSet[framepath.Path] |= SearchPathKind::Framework; - for (StringRef path : SearchPathOpts.getCompilerPluginLibraryPaths()) - getImpl().SearchPathsSet[path] |= SearchPathKind::CompilerPlugin; // Register any request-evaluator functions available at the AST layer. registerAccessRequestFunctions(evaluator); diff --git a/lib/AST/ASTDumper.cpp b/lib/AST/ASTDumper.cpp index c7fa382e74067..58089b8353f00 100644 --- a/lib/AST/ASTDumper.cpp +++ b/lib/AST/ASTDumper.cpp @@ -2128,6 +2128,17 @@ class PrintExpr : public ExprVisitor { PrintWithColorRAII(OS, ExprModifierColor) << " number_of_decls=" << E->getDecls().size() << " function_ref=" << getFunctionRefKindStr(E->getFunctionRefKind()); + if (!E->isForOperator()) { + PrintWithColorRAII(OS, ExprModifierColor) << " decls=[\n"; + interleave( + E->getDecls(), + [&](ValueDecl *D) { + OS.indent(Indent + 2); + D->dumpRef(PrintWithColorRAII(OS, DeclModifierColor).getOS()); + }, + [&] { PrintWithColorRAII(OS, DeclModifierColor) << ",\n"; }); + PrintWithColorRAII(OS, ExprModifierColor) << "]"; + } PrintWithColorRAII(OS, ParenthesisColor) << ')'; } void visitUnresolvedDeclRefExpr(UnresolvedDeclRefExpr *E) { diff --git a/lib/AST/DiagnosticEngine.cpp b/lib/AST/DiagnosticEngine.cpp index ef08ea1fe6eff..f96915d750b68 100644 --- a/lib/AST/DiagnosticEngine.cpp +++ b/lib/AST/DiagnosticEngine.cpp @@ -334,6 +334,16 @@ InFlightDiagnostic::warnUntilSwiftVersion(unsigned majorVersion) { return *this; } +InFlightDiagnostic & +InFlightDiagnostic::warnInSwiftInterface(const DeclContext *context) { + auto sourceFile = context->getParentSourceFile(); + if (sourceFile && sourceFile->Kind == SourceFileKind::Interface) { + return limitBehavior(DiagnosticBehavior::Warning); + } + + return *this; +} + InFlightDiagnostic & InFlightDiagnostic::wrapIn(const Diagnostic &wrapper) { // Save current active diagnostic into WrappedDiagnostics, ignoring state diff --git a/lib/AST/PluginLoader.cpp b/lib/AST/PluginLoader.cpp index efae0a6ca2a2c..1bdfc95b1e7ef 100644 --- a/lib/AST/PluginLoader.cpp +++ b/lib/AST/PluginLoader.cpp @@ -20,12 +20,14 @@ using namespace swift; void PluginLoader::createModuleToExecutablePluginMap() { - for (auto &arg : Ctx.SearchPathOpts.getCompilerPluginExecutablePaths()) { - // Create a moduleName -> pluginPath mapping. - assert(!arg.ExecutablePath.empty() && "empty plugin path"); - StringRef pathStr = Ctx.AllocateCopy(arg.ExecutablePath); - for (auto moduleName : arg.ModuleNames) { - ExecutablePluginPaths[Ctx.getIdentifier(moduleName)] = pathStr; + for (auto &elem : Ctx.SearchPathOpts.PluginSearchOpts) { + if (auto *arg = elem.dyn_cast()) { + // Create a moduleName -> pluginPath mapping. + assert(!arg->ExecutablePath.empty() && "empty plugin path"); + StringRef pathStr = Ctx.AllocateCopy(arg->ExecutablePath); + for (auto moduleName : arg->ModuleNames) { + ExecutablePluginPaths[Ctx.getIdentifier(moduleName)] = pathStr; + } } } } @@ -46,69 +48,59 @@ PluginRegistry *PluginLoader::getRegistry() { return Registry; } -llvm::Optional -PluginLoader::lookupExplicitLibraryPluginByModuleName(Identifier moduleName) { - // Look for 'lib${module name}(.dylib|.so)'. - SmallString<64> expectedBasename; - expectedBasename.append("lib"); - expectedBasename.append(moduleName.str()); - expectedBasename.append(LTDL_SHLIB_EXT); - - // Try '-load-plugin-library'. - for (const auto &libPath : - Ctx.SearchPathOpts.getCompilerPluginLibraryPaths()) { - if (llvm::sys::path::filename(libPath) == expectedBasename) { - return libPath; - } - } - return None; -} +std::pair +PluginLoader::lookupPluginByModuleName(Identifier moduleName) { + auto fs = Ctx.SourceMgr.getFileSystem(); -llvm::Optional -PluginLoader::lookupLibraryPluginInSearchPathByModuleName( - Identifier moduleName) { // Look for 'lib${module name}(.dylib|.so)'. - SmallString<64> expectedBasename; - expectedBasename.append("lib"); - expectedBasename.append(moduleName.str()); - expectedBasename.append(LTDL_SHLIB_EXT); - - // Try '-plugin-path'. - auto fs = Ctx.SourceMgr.getFileSystem(); - for (const auto &searchPath : Ctx.SearchPathOpts.PluginSearchPaths) { - SmallString<128> fullPath(searchPath); - llvm::sys::path::append(fullPath, expectedBasename); - if (fs->exists(fullPath)) { - return std::string(fullPath); + // FIXME: Shared library prefix might be different between platforms. + SmallString<64> pluginLibBasename; + pluginLibBasename.append("lib"); + pluginLibBasename.append(moduleName.str()); + pluginLibBasename.append(LTDL_SHLIB_EXT); + + // FIXME: Should we create a lookup table keyed by module name? + for (auto &entry : Ctx.SearchPathOpts.PluginSearchOpts) { + using namespace PluginSearchOption; + // Try '-load-plugin-library'. + if (auto *val = entry.dyn_cast()) { + if (llvm::sys::path::filename(val->LibraryPath) == pluginLibBasename) { + return {val->LibraryPath, ""}; + } + continue; } - } - - return None; -} -Optional> -PluginLoader::lookupExternalLibraryPluginByModuleName(Identifier moduleName) { - auto fs = Ctx.SourceMgr.getFileSystem(); + // Try '-load-plugin-executable'. + if (auto *v = entry.dyn_cast()) { + auto found = ExecutablePluginPaths.find(moduleName); + if (found != ExecutablePluginPaths.end()) { + return {"", std::string(found->second)}; + } + continue; + } - for (auto &pair : Ctx.SearchPathOpts.ExternalPluginSearchPaths) { - SmallString<128> fullPath(pair.SearchPath); - llvm::sys::path::append(fullPath, - "lib" + moduleName.str() + LTDL_SHLIB_EXT); + // Try '-plugin-path'. + if (auto *v = entry.dyn_cast()) { + SmallString<128> fullPath(v->SearchPath); + llvm::sys::path::append(fullPath, pluginLibBasename); + if (fs->exists(fullPath)) { + return {std::string(fullPath), ""}; + } + continue; + } - if (fs->exists(fullPath)) { - return {{std::string(fullPath), pair.ServerPath}}; + // Try '-external-plugin-path'. + if (auto *v = entry.dyn_cast()) { + SmallString<128> fullPath(v->SearchPath); + llvm::sys::path::append(fullPath, pluginLibBasename); + if (fs->exists(fullPath)) { + return {std::string(fullPath), v->ServerPath}; + } + continue; } } - return None; -} -Optional -PluginLoader::lookupExecutablePluginByModuleName(Identifier moduleName) { - auto &execPluginPaths = ExecutablePluginPaths; - auto found = execPluginPaths.find(moduleName); - if (found == execPluginPaths.end()) - return None; - return found->second; + return {}; } LoadedLibraryPlugin *PluginLoader::loadLibraryPlugin(StringRef path) { diff --git a/lib/AST/SearchPathOptions.cpp b/lib/AST/SearchPathOptions.cpp index 4e110ccacd70d..88a1cb56e0548 100644 --- a/lib/AST/SearchPathOptions.cpp +++ b/lib/AST/SearchPathOptions.cpp @@ -73,12 +73,6 @@ void ModuleSearchPathLookup::rebuildLookupTable(const SearchPathOptions *Opts, /*isSystem=*/true, Entry.index()); } - for (auto Entry : llvm::enumerate(Opts->getCompilerPluginLibraryPaths())) { - addFilesInPathToLookupTable(FS, Entry.value(), - ModuleSearchPathKind::CompilerPlugin, - /*isSystem=*/false, Entry.index()); - } - State.FileSystem = FS; State.IsOSDarwin = IsOSDarwin; State.Opts = Opts; diff --git a/lib/ClangImporter/ClangImporter.cpp b/lib/ClangImporter/ClangImporter.cpp index 8dacf49cfd5a2..525c133880fd0 100644 --- a/lib/ClangImporter/ClangImporter.cpp +++ b/lib/ClangImporter/ClangImporter.cpp @@ -845,7 +845,7 @@ importer::addCommonInvocationArguments( invocationArgStrs.push_back("-fansi-escape-codes"); invocationArgStrs.push_back("-Xclang"); - invocationArgStrs.push_back("-no-opaque-pointers"); + invocationArgStrs.push_back("-opaque-pointers"); if (importerOpts.ValidateModulesOnce) { invocationArgStrs.push_back("-fmodules-validate-once-per-build-session"); @@ -6877,14 +6877,25 @@ const clang::TypedefType *ClangImporter::getTypeDefForCXXCFOptionsDefinition( if (!enumDecl->getDeclName().isEmpty()) return nullptr; - if (auto typedefType = dyn_cast( - enumDecl->getIntegerType().getTypePtr())) { - if (auto enumExtensibilityAttr = - typedefType->getDecl()->getAttr(); - enumExtensibilityAttr && + const clang::ElaboratedType *elaboratedType = + dyn_cast(enumDecl->getIntegerType().getTypePtr()); + if (auto typedefType = + elaboratedType + ? dyn_cast(elaboratedType->desugar()) + : dyn_cast( + enumDecl->getIntegerType().getTypePtr())) { + auto enumExtensibilityAttr = + elaboratedType + ? enumDecl->getAttr() + : typedefType->getDecl()->getAttr(); + const bool hasFlagEnumAttr = + elaboratedType ? enumDecl->hasAttr() + : typedefType->getDecl()->hasAttr(); + + if (enumExtensibilityAttr && enumExtensibilityAttr->getExtensibility() == clang::EnumExtensibilityAttr::Open && - typedefType->getDecl()->hasAttr()) { + hasFlagEnumAttr) { return Impl.isUnavailableInSwift(typedefType->getDecl()) ? typedefType : nullptr; } diff --git a/lib/Demangling/Remangler.cpp b/lib/Demangling/Remangler.cpp index 63b6043b72b8b..272a0ccf59713 100644 --- a/lib/Demangling/Remangler.cpp +++ b/lib/Demangling/Remangler.cpp @@ -3839,6 +3839,8 @@ ManglingErrorOr Demangle::getUnspecialized(Node *node, case Node::Kind::TypeAlias: case Node::Kind::OtherNominalType: { NodePointer result = Factory.createNode(node->getKind()); + + DEMANGLER_ASSERT(node->hasChildren(), node); NodePointer parentOrModule = node->getChild(0); if (isSpecialized(parentOrModule)) { auto unspec = getUnspecialized(parentOrModule, Factory); @@ -3859,8 +3861,10 @@ ManglingErrorOr Demangle::getUnspecialized(Node *node, case Node::Kind::BoundGenericProtocol: case Node::Kind::BoundGenericOtherNominalType: case Node::Kind::BoundGenericTypeAlias: { + DEMANGLER_ASSERT(node->hasChildren(), node); NodePointer unboundType = node->getChild(0); DEMANGLER_ASSERT(unboundType->getKind() == Node::Kind::Type, unboundType); + DEMANGLER_ASSERT(unboundType->hasChildren(), unboundType); NodePointer nominalType = unboundType->getChild(0); if (isSpecialized(nominalType)) return getUnspecialized(nominalType, Factory); @@ -3868,12 +3872,14 @@ ManglingErrorOr Demangle::getUnspecialized(Node *node, } case Node::Kind::ConstrainedExistential: { + DEMANGLER_ASSERT(node->hasChildren(), node); NodePointer unboundType = node->getChild(0); DEMANGLER_ASSERT(unboundType->getKind() == Node::Kind::Type, unboundType); return unboundType; } case Node::Kind::BoundGenericFunction: { + DEMANGLER_ASSERT(node->hasChildren(), node); NodePointer unboundFunction = node->getChild(0); DEMANGLER_ASSERT(unboundFunction->getKind() == Node::Kind::Function || unboundFunction->getKind() == @@ -3885,6 +3891,7 @@ ManglingErrorOr Demangle::getUnspecialized(Node *node, } case Node::Kind::Extension: { + DEMANGLER_ASSERT(node->getNumChildren() >= 2, node); NodePointer parent = node->getChild(1); if (!isSpecialized(parent)) return node; diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index c2dee09d575ba..c17b17f808b2d 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -236,8 +236,6 @@ void ToolChain::addCommonFrontendArgs(const OutputInfo &OI, inputArgs.AddAllArgs(arguments, options::OPT_I); inputArgs.AddAllArgs(arguments, options::OPT_F, options::OPT_Fsystem); inputArgs.AddAllArgs(arguments, options::OPT_vfsoverlay); - inputArgs.AddAllArgs(arguments, options::OPT_plugin_path); - inputArgs.AddAllArgs(arguments, options::OPT_external_plugin_path); inputArgs.AddLastArg(arguments, options::OPT_AssertConfig); inputArgs.AddLastArg(arguments, options::OPT_autolink_force_load); @@ -325,8 +323,6 @@ void ToolChain::addCommonFrontendArgs(const OutputInfo &OI, inputArgs.AddLastArg(arguments, options::OPT_enable_bare_slash_regex); inputArgs.AddLastArg(arguments, options::OPT_enable_experimental_cxx_interop); inputArgs.AddLastArg(arguments, options::OPT_cxx_interoperability_mode); - inputArgs.AddLastArg(arguments, options::OPT_load_plugin_library); - inputArgs.AddLastArg(arguments, options::OPT_load_plugin_executable); inputArgs.AddLastArg(arguments, options::OPT_enable_builtin_module); // Pass on any build config options @@ -376,9 +372,9 @@ void ToolChain::addCommonFrontendArgs(const OutputInfo &OI, inputArgs.AddAllArgs(arguments, options::OPT_file_compilation_dir); } - // Add plugin path options. - inputArgs.AddAllArgs(arguments, options::OPT_plugin_path); - + // Specify default plugin search path options after explicitly specified + // options. + inputArgs.AddAllArgs(arguments, options::OPT_plugin_search_Group); { SmallString<64> pluginPath; auto programPath = getDriver().getSwiftProgramPath(); @@ -1512,7 +1508,8 @@ void ToolChain::getRuntimeLibraryPaths(SmallVectorImpl &runtimeLibP if (!scratchPath.empty()) runtimeLibPaths.push_back(std::string(scratchPath.str())); - if (!SDKPath.empty()) { + // Only Darwin places libraries directly in /sdk/usr/lib/swift/. + if (Triple.isOSDarwin() && !SDKPath.empty()) { if (!scratchPath.empty()) { // If we added the secondary resource dir, we also need the iOSSupport // directory. diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index d6c547c76d293..7e4aa57a3c54b 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -1601,18 +1601,56 @@ static bool ParseSearchPathArgs(SearchPathOptions &Opts, } Opts.setFrameworkSearchPaths(FrameworkSearchPaths); - for (const Arg *A : Args.filtered(OPT_plugin_path)) { - Opts.PluginSearchPaths.push_back(resolveSearchPath(A->getValue())); - } - - for (const Arg *A : Args.filtered(OPT_external_plugin_path)) { - // '#'. - // FIXME: '#' can be used in the paths. - StringRef dylibPath; - StringRef serverPath; - std::tie(dylibPath, serverPath) = StringRef(A->getValue()).split('#'); - Opts.ExternalPluginSearchPaths.push_back( - {resolveSearchPath(dylibPath), resolveSearchPath(serverPath)}); + // All plugin search options, i.e. '-load-plugin-library', + // '-load-plugin-executable', '-plugin-path', and '-external-plugin-path' + // are grouped, and plugins are searched by the order of these options. + // e.g. For '-plugin-path A -load-plugin-library B/libModule.dylib', if + // 'A/libModule.dylib' exists, it's used. + for (const Arg *A : Args.filtered(OPT_plugin_search_Group)) { + switch (A->getOption().getID()) { + case OPT_load_plugin_library: { + Opts.PluginSearchOpts.emplace_back(PluginSearchOption::LoadPluginLibrary{ + resolveSearchPath(A->getValue())}); + break; + } + case OPT_load_plugin_executable: { + // '#' where the module names are + // comma separated. + StringRef path; + StringRef modulesStr; + std::tie(path, modulesStr) = StringRef(A->getValue()).rsplit('#'); + std::vector moduleNames; + for (auto name : llvm::split(modulesStr, ',')) { + moduleNames.emplace_back(name); + } + if (path.empty() || moduleNames.empty()) { + Diags.diagnose(SourceLoc(), diag::error_load_plugin_executable, + A->getValue()); + } else { + Opts.PluginSearchOpts.emplace_back( + PluginSearchOption::LoadPluginExecutable{resolveSearchPath(path), + std::move(moduleNames)}); + } + break; + } + case OPT_plugin_path: { + Opts.PluginSearchOpts.emplace_back( + PluginSearchOption::PluginPath{resolveSearchPath(A->getValue())}); + break; + } + case OPT_external_plugin_path: { + // '#'. + // FIXME: '#' can be used in the paths. + StringRef dylibPath; + StringRef serverPath; + std::tie(dylibPath, serverPath) = StringRef(A->getValue()).split('#'); + Opts.PluginSearchOpts.emplace_back(PluginSearchOption::ExternalPluginPath{ + resolveSearchPath(dylibPath), resolveSearchPath(serverPath)}); + break; + } + default: + llvm_unreachable("unhandled plugin search option"); + } } for (const Arg *A : Args.filtered(OPT_L)) { @@ -1674,36 +1712,6 @@ static bool ParseSearchPathArgs(SearchPathOptions &Opts, // is called before setTargetTriple() and parseArgs(). // TODO: improve the handling of RuntimeIncludePath. - std::vector CompilerPluginLibraryPaths( - Opts.getCompilerPluginLibraryPaths()); - for (const Arg *A : Args.filtered(OPT_load_plugin_library)) { - CompilerPluginLibraryPaths.push_back(resolveSearchPath(A->getValue())); - } - Opts.setCompilerPluginLibraryPaths(CompilerPluginLibraryPaths); - - std::vector CompilerPluginExecutablePaths( - Opts.getCompilerPluginExecutablePaths()); - for (const Arg *A : Args.filtered(OPT_load_plugin_executable)) { - // 'A' is '#' where the module names are - // comma separated. - StringRef path; - StringRef modulesStr; - std::tie(path, modulesStr) = StringRef(A->getValue()).rsplit('#'); - std::vector moduleNames; - for (auto name : llvm::split(modulesStr, ',')) { - moduleNames.emplace_back(name); - } - if (path.empty() || moduleNames.empty()) { - Diags.diagnose(SourceLoc(), diag::error_load_plugin_executable, - A->getValue()); - } else { - CompilerPluginExecutablePaths.push_back( - {resolveSearchPath(path), std::move(moduleNames)}); - } - } - Opts.setCompilerPluginExecutablePaths( - std::move(CompilerPluginExecutablePaths)); - return false; } diff --git a/lib/Frontend/Frontend.cpp b/lib/Frontend/Frontend.cpp index b65e628b31953..f96f80fc9647e 100644 --- a/lib/Frontend/Frontend.cpp +++ b/lib/Frontend/Frontend.cpp @@ -209,30 +209,35 @@ SerializationOptions CompilerInvocation::computeSerializationOptions( serializationOpts.ExtraClangOptions = getClangImporterOptions().ExtraArgs; } - // '-plugin-path' options. - for (const auto &path : getSearchPathOptions().PluginSearchPaths) { - serializationOpts.PluginSearchPaths.push_back(path); - } - // '-external-plugin-path' options. - for (const ExternalPluginSearchPathAndServerPath &pair : - getSearchPathOptions().ExternalPluginSearchPaths) { - serializationOpts.ExternalPluginSearchPaths.push_back( - pair.SearchPath + "#" + - pair.ServerPath); - } - // '-load-plugin-library' options. - for (const auto &path : - getSearchPathOptions().getCompilerPluginLibraryPaths()) { - serializationOpts.CompilerPluginLibraryPaths.push_back(path); - } - // '-load-plugin-executable' options. - for (const PluginExecutablePathAndModuleNames &pair : - getSearchPathOptions().getCompilerPluginExecutablePaths()) { - std::string optStr = pair.ExecutablePath + "#"; - llvm::interleave( - pair.ModuleNames, [&](auto &name) { optStr += name; }, - [&]() { optStr += ","; }); - serializationOpts.CompilerPluginExecutablePaths.push_back(optStr); + // FIXME: Preserve the order of these options. + for (auto &elem : getSearchPathOptions().PluginSearchOpts) { + // '-plugin-path' options. + if (auto *arg = elem.dyn_cast()) { + serializationOpts.PluginSearchPaths.push_back(arg->SearchPath); + continue; + } + + // '-external-plugin-path' options. + if (auto *arg = elem.dyn_cast()) { + serializationOpts.ExternalPluginSearchPaths.push_back( + arg->SearchPath + "#" + arg->ServerPath); + continue; + } + + // '-load-plugin-library' options. + if (auto *arg = elem.dyn_cast()) { + serializationOpts.CompilerPluginLibraryPaths.push_back(arg->LibraryPath); + continue; + } + + // '-load-plugin-executable' options. + if (auto *arg = elem.dyn_cast()) { + std::string optStr = arg->ExecutablePath + "#"; + llvm::interleave( + arg->ModuleNames, [&](auto &name) { optStr += name; }, + [&]() { optStr += ","; }); + serializationOpts.CompilerPluginExecutablePaths.push_back(optStr); + } } serializationOpts.DisableCrossModuleIncrementalInfo = diff --git a/lib/IRGen/GenDecl.cpp b/lib/IRGen/GenDecl.cpp index 54443868ef378..711c5bd05e108 100644 --- a/lib/IRGen/GenDecl.cpp +++ b/lib/IRGen/GenDecl.cpp @@ -5190,7 +5190,8 @@ IRGenModule::getAddrOfTypeMetadata(CanType concreteType, } if (auto *GV = dyn_cast(addr.getValue())) - GV->setComdat(nullptr); + if (GV->isDeclaration()) + GV->setComdat(nullptr); // FIXME: MC breaks when emitting alias references on some platforms // (rdar://problem/22450593 ). Work around this by referring to the aliasee diff --git a/lib/IRGen/IRGenDebugInfo.cpp b/lib/IRGen/IRGenDebugInfo.cpp index d4ce0fbe47bce..333bb07d8fc44 100644 --- a/lib/IRGen/IRGenDebugInfo.cpp +++ b/lib/IRGen/IRGenDebugInfo.cpp @@ -569,14 +569,8 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo { if (FuncDecl *FD = L.getAsASTNode()) return getName(*FD); - if (L.isASTNode()) - return "init"; - - if (L.isASTNode()) - return "deinit"; - if (ValueDecl *D = L.getAsASTNode()) - return D->getBaseIdentifier().str(); + return D->getBaseName().userFacingName(); if (auto *D = L.getAsASTNode()) return D->getMacroName().getBaseIdentifier().str(); @@ -2817,6 +2811,7 @@ void IRGenDebugInfoImpl::emitDbgIntrinsic( llvm::DIExpression *Expr, unsigned Line, unsigned Col, llvm::DILocalScope *Scope, const SILDebugScope *DS, bool InCoroContext, AddrDbgInstrKind AddrDInstKind) { + Storage = Storage->stripPointerCasts(); // Set the location/scope of the intrinsic. auto *InlinedAt = createInlinedAt(DS); auto DL = diff --git a/lib/IRGen/IRGenSIL.cpp b/lib/IRGen/IRGenSIL.cpp index f927540fadc98..06d6d22322223 100644 --- a/lib/IRGen/IRGenSIL.cpp +++ b/lib/IRGen/IRGenSIL.cpp @@ -981,10 +981,16 @@ class IRGenSILFunction : && !isAnonymous; } - bool shouldShadowStorage(llvm::Value *Storage) { - return !isa(Storage) - && !isa(Storage) - && needsShadowCopy(Storage); + bool shouldShadowStorage(llvm::Value *Storage, + llvm::Type *StorageType) { + Storage = Storage->stripPointerCasts(); + if (isa(Storage)) + return false; + if (auto *Alloca = dyn_cast(Storage); + Alloca && Alloca->isStaticAlloca() && + Alloca->getAllocatedType() == StorageType) + return false; + return needsShadowCopy(Storage); } /// At -Onone, emit a shadow copy of an Address in an alloca, so the @@ -992,6 +998,7 @@ class IRGenSILFunction : /// register pressure is high. There is a trade-off to this: With /// shadow copies, we lose the precise lifetime. llvm::Value *emitShadowCopyIfNeeded(llvm::Value *Storage, + llvm::Type *StorageType, const SILDebugScope *Scope, SILDebugVariable VarInfo, bool IsAnonymous, bool WasMoved, @@ -1011,7 +1018,7 @@ class IRGenSILFunction : // This condition must be consistent with emitPoisonDebugValueInst to avoid // generating extra shadow copies for debug_value [poison]. if (!shouldShadowVariable(VarInfo, IsAnonymous) - || !shouldShadowStorage(Storage)) { + || !shouldShadowStorage(Storage, StorageType)) { return Storage; } @@ -1034,11 +1041,12 @@ class IRGenSILFunction : /// Like \c emitShadowCopyIfNeeded() but takes an \c Address instead of an /// \c llvm::Value. llvm::Value *emitShadowCopyIfNeeded(Address Storage, + llvm::Type *StorageType, const SILDebugScope *Scope, SILDebugVariable VarInfo, bool IsAnonymous, bool WasMoved) { - return emitShadowCopyIfNeeded(Storage.getAddress(), Scope, VarInfo, - IsAnonymous, WasMoved, + return emitShadowCopyIfNeeded(Storage.getAddress(), StorageType, Scope, + VarInfo, IsAnonymous, WasMoved, Storage.getAlignment()); } @@ -1072,7 +1080,9 @@ class IRGenSILFunction : return; if (e.size() == 1) { - copy.push_back(emitShadowCopyIfNeeded(e.claimNext(), Scope, VarInfo, + auto &ti = getTypeInfo(SILVal->getType()); + copy.push_back(emitShadowCopyIfNeeded(e.claimNext(), ti.getStorageType(), + Scope, VarInfo, IsAnonymous, WasMoved)); return; } @@ -1116,7 +1126,7 @@ class IRGenSILFunction : llvm::raw_svector_ostream(Buf) << "$pack_count_" << Position; auto Name = IGM.Context.getIdentifier(Buf.str()); SILDebugVariable Var(Name.str(), true, 0); - Shape = emitShadowCopyIfNeeded(Shape, getDebugScope(), Var, false, + Shape = emitShadowCopyIfNeeded(Shape, nullptr, getDebugScope(), Var, false, false /*was move*/); if (IGM.DebugInfo) IGM.DebugInfo->emitPackCountParameter(*this, Shape, Var); @@ -5061,7 +5071,7 @@ void IRGenSILFunction::emitErrorResultVar(CanSILFunctionType FnTy, auto Var = DbgValue->getVarInfo(); assert(Var && "error result without debug info"); auto Storage = - emitShadowCopyIfNeeded(ErrorResultSlot.getAddress(), getDebugScope(), + emitShadowCopyIfNeeded(ErrorResultSlot.getAddress(), nullptr, getDebugScope(), *Var, false, false /*was move*/); if (!IGM.DebugInfo) return; @@ -5108,7 +5118,7 @@ void IRGenSILFunction::emitPoisonDebugValueInst(DebugValueInst *i) { // copy--poison should never affect program behavior. Also filter everything // not handled by emitShadowCopyIfNeeded to avoid extra shadow copies. if (!shouldShadowVariable(*varInfo, isAnonymous) - || !shouldShadowStorage(storage)) { + || !shouldShadowStorage(storage, nullptr)) { return; } @@ -5255,13 +5265,15 @@ void IRGenSILFunction::visitDebugValueInst(DebugValueInst *i) { // Put the value into a shadow-copy stack slot at -Onone. llvm::SmallVector Copy; - if (IsAddrVal) + if (IsAddrVal) { + auto &ti = getTypeInfo(SILVal->getType()); Copy.emplace_back(emitShadowCopyIfNeeded( - getLoweredAddress(SILVal).getAddress(), i->getDebugScope(), *VarInfo, + getLoweredAddress(SILVal).getAddress(), ti.getStorageType(), i->getDebugScope(), *VarInfo, IsAnonymous, i->getUsesMoveableValueDebugInfo())); - else + } else { emitShadowCopyIfNeeded(SILVal, i->getDebugScope(), *VarInfo, IsAnonymous, i->getUsesMoveableValueDebugInfo(), Copy); + } bindArchetypes(DbgTy.getType()); if (!IGM.DebugInfo) @@ -5882,9 +5894,10 @@ void IRGenSILFunction::visitAllocBoxInst(swift::AllocBoxInst *i) { auto VarInfo = i->getVarInfo(); if (!VarInfo) return; - + auto &ti = getTypeInfo(SILTy); auto Storage = - emitShadowCopyIfNeeded(boxWithAddr.getAddress(), i->getDebugScope(), + emitShadowCopyIfNeeded(boxWithAddr.getAddress(), ti.getStorageType(), + i->getDebugScope(), *VarInfo, IsAnonymous, false /*was moved*/); if (!IGM.DebugInfo) diff --git a/lib/SIL/IR/AbstractionPattern.cpp b/lib/SIL/IR/AbstractionPattern.cpp index 6fa1285c98276..1188526024708 100644 --- a/lib/SIL/IR/AbstractionPattern.cpp +++ b/lib/SIL/IR/AbstractionPattern.cpp @@ -2064,6 +2064,9 @@ class SubstFunctionTypePatternVisitor if (auto gp = handleTypeParameter(pattern, t, level)) return gp; + if (pattern.isTuple()) + return visitTuplePattern(t, pattern); + return CanTypeVisitor::visit(t, pattern); } @@ -2312,11 +2315,15 @@ class SubstFunctionTypePatternVisitor TC.Context, ppt->getBaseType(), substArgs)); } - CanType visitTupleType(CanTupleType tuple, AbstractionPattern pattern) { + /// Visit a tuple pattern. Note that, because of vanishing tuples, + /// we can't handle this case by matching a tuple type in the + /// substituted type; we have to check for a tuple pattern in the + /// top-level visit routine. + CanType visitTuplePattern(CanType substType, AbstractionPattern pattern) { assert(pattern.isTuple()); SmallVector tupleElts; - pattern.forEachTupleElement(tuple, [&](TupleElementGenerator &elt) { + pattern.forEachTupleElement(substType, [&](TupleElementGenerator &elt) { auto substEltTypes = elt.getSubstTypes(); CanType eltTy; if (!elt.isOrigPackExpansion()) { diff --git a/lib/SIL/IR/SILType.cpp b/lib/SIL/IR/SILType.cpp index e3feb8378fe7c..57caf3d5277b9 100644 --- a/lib/SIL/IR/SILType.cpp +++ b/lib/SIL/IR/SILType.cpp @@ -851,6 +851,16 @@ bool SILType::isLoweringOf(TypeExpansionContext context, SILModule &Mod, } } + // The pattern of a pack expansion is lowered. + if (auto formalExpansion = dyn_cast(formalType)) { + if (auto loweredExpansion = loweredType.getAs()) { + return loweredExpansion.getCountType() == formalExpansion.getCountType() + && SILType::getPrimitiveAddressType(loweredExpansion.getPatternType()) + .isLoweringOf(context, Mod, formalExpansion.getPatternType()); + } + return false; + } + // Dynamic self has the same lowering as its contained type. if (auto dynamicSelf = dyn_cast(formalType)) formalType = dynamicSelf.getSelfType(); diff --git a/lib/SIL/Utils/GenericSpecializationMangler.cpp b/lib/SIL/Utils/GenericSpecializationMangler.cpp index 6bcacf4242701..8dbc746d31ca7 100644 --- a/lib/SIL/Utils/GenericSpecializationMangler.cpp +++ b/lib/SIL/Utils/GenericSpecializationMangler.cpp @@ -100,10 +100,15 @@ manglePrespecialized(GenericSignature sig, SubstitutionMap subs) { } std::string GenericSpecializationMangler:: -mangleNotReabstracted(SubstitutionMap subs) { +mangleNotReabstracted(SubstitutionMap subs, + bool metatyeParamsRemoved) { beginMangling(); appendSubstitutions(getGenericSignature(), subs); - appendSpecializationOperator("TG"); + if (metatyeParamsRemoved) { + appendSpecializationOperator("TGm"); + } else { + appendSpecializationOperator("TG"); + } return finalize(); } diff --git a/lib/SILGen/RValue.cpp b/lib/SILGen/RValue.cpp index bd9016ffa42c3..5401f02d3f5ff 100644 --- a/lib/SILGen/RValue.cpp +++ b/lib/SILGen/RValue.cpp @@ -94,12 +94,8 @@ class ExplodeTupleValue void visitType(CanType formalType, ManagedValue v) { // If we have a loadable type that has not been loaded, actually load it. - if (!v.getType().isObject() && v.getType().isLoadable(SGF.F)) { - if (v.isPlusOne(SGF)) { - v = SGF.B.createLoadTake(loc, v); - } else { - v = SGF.B.createLoadBorrow(loc, v); - } + if (!v.getType().isObject()) { + v = SGF.B.createLoadIfLoadable(loc, v); } values.push_back(v); diff --git a/lib/SILGen/SILGenBuilder.cpp b/lib/SILGen/SILGenBuilder.cpp index 59e4e4348575b..d751bfa5ce2dc 100644 --- a/lib/SILGen/SILGenBuilder.cpp +++ b/lib/SILGen/SILGenBuilder.cpp @@ -437,6 +437,23 @@ ManagedValue SILGenBuilder::createUncheckedTakeEnumDataAddr( return cloner.clone(result); } +ManagedValue +SILGenBuilder::createLoadIfLoadable(SILLocation loc, ManagedValue addr) { + assert(addr.getType().isAddress()); + if (!addr.getType().isLoadable(SGF.F)) + return addr; + return createLoadWithSameOwnership(loc, addr); +} + +ManagedValue +SILGenBuilder::createLoadWithSameOwnership(SILLocation loc, + ManagedValue addr) { + if (addr.isPlusOne(SGF)) + return createLoadTake(loc, addr); + else + return createLoadBorrow(loc, addr); +} + ManagedValue SILGenBuilder::createLoadTake(SILLocation loc, ManagedValue v) { auto &lowering = SGF.getTypeLowering(v.getType()); return createLoadTake(loc, v, lowering); diff --git a/lib/SILGen/SILGenBuilder.h b/lib/SILGen/SILGenBuilder.h index a7c7cc852d152..3067d32c08edb 100644 --- a/lib/SILGen/SILGenBuilder.h +++ b/lib/SILGen/SILGenBuilder.h @@ -236,6 +236,15 @@ class SILGenBuilder : public SILBuilder { ManagedValue createUncheckedTakeEnumDataAddr(SILLocation loc, ManagedValue operand, EnumElementDecl *element, SILType ty); + /// Given the address of a value, load a scalar value from it if the type + /// is loadable. Most general routines in SILGen expect to work with + /// values with the canonical scalar-ness for their type. + ManagedValue createLoadIfLoadable(SILLocation loc, ManagedValue addr); + + /// Given the address of a loadable value, load the value but don't + /// change the ownership. + ManagedValue createLoadWithSameOwnership(SILLocation loc, ManagedValue addr); + ManagedValue createLoadTake(SILLocation loc, ManagedValue addr); ManagedValue createLoadTake(SILLocation loc, ManagedValue addr, const TypeLowering &lowering); diff --git a/lib/SILGen/SILGenConstructor.cpp b/lib/SILGen/SILGenConstructor.cpp index 8631323e84b30..4879d186e36a5 100644 --- a/lib/SILGen/SILGenConstructor.cpp +++ b/lib/SILGen/SILGenConstructor.cpp @@ -222,6 +222,7 @@ static RValue emitImplicitValueConstructorArg(SILGenFunction &SGF, auto eltAddr = SGF.B.createPackElementGet(loc, packIndex, arg, eltTy); ManagedValue eltMV = emitManagedParameter(SGF, eltAddr, argIsConsumed); + eltMV = SGF.B.createLoadIfLoadable(loc, eltMV); eltInit->copyOrInitValueInto(SGF, loc, eltMV, argIsConsumed); eltInit->finishInitialization(SGF); }); @@ -232,21 +233,18 @@ static RValue emitImplicitValueConstructorArg(SILGenFunction &SGF, ManagedValue mvArg = emitManagedParameter(SGF, arg, argIsConsumed); + // This can happen if the value is resilient in the calling convention + // but not resilient locally. + if (argType.isAddress()) { + mvArg = SGF.B.createLoadIfLoadable(loc, mvArg); + } + if (argInit) { argInit->copyOrInitValueInto(SGF, loc, mvArg, argIsConsumed); argInit->finishInitialization(SGF); return RValue::forInContext(); } - // This can happen if the value is resilient in the calling convention - // but not resilient locally. - if (argType.isLoadable(SGF.F) && argType.isAddress()) { - if (mvArg.isPlusOne(SGF)) - mvArg = SGF.B.createLoadTake(loc, mvArg); - else - mvArg = SGF.B.createLoadBorrow(loc, mvArg); - } - return RValue(SGF, loc, type, mvArg); } diff --git a/lib/SILGen/SILGenProlog.cpp b/lib/SILGen/SILGenProlog.cpp index 7971435c54bda..ef80c8f49242d 100644 --- a/lib/SILGen/SILGenProlog.cpp +++ b/lib/SILGen/SILGenProlog.cpp @@ -263,10 +263,7 @@ class EmitBBArguments : public CanTypeVisitor packElts; + for (auto substEltType : resultTypesInContext) { + auto origComponentType + = origExpansionType.getPackExpansionComponentType(substEltType); + CanType loweredEltTy = + SGF.getLoweredRValueType(origComponentType, substEltType); + packElts.push_back(loweredEltTy); + } + + SILPackType::ExtInfo extInfo(indirect); + auto packType = SILPackType::get(ctx, extInfo, packElts); + auto resultSILType = SILType::getPrimitiveAddressType(packType); + + auto var = new (ctx) ParamDecl(SourceLoc(), SourceLoc(), + ctx.getIdentifier("$return_value"), SourceLoc(), + ctx.getIdentifier("$return_value"), + DC); + var->setSpecifier(ParamSpecifier::InOut); + var->setInterfaceType(resultType); + auto *arg = SGF.F.begin()->createFunctionArgument(resultSILType, var); + (void)arg; +} + static void emitIndirectResultParameters(SILGenFunction &SGF, Type resultType, AbstractionPattern origResultType, DeclContext *DC) { - // Expand tuples. + CanType resultTypeInContext = + DC->mapTypeIntoContext(resultType)->getCanonicalType(); + + // Tuples in the original result type are expanded. if (origResultType.isTuple()) { - auto tupleType = resultType->castTo(); - for (unsigned i = 0, e = origResultType.getNumTupleElements(); i < e; ++i) { - emitIndirectResultParameters(SGF, tupleType->getElementType(i), - origResultType.getTupleElementType(i), - DC); - } + origResultType.forEachTupleElement(resultTypeInContext, + [&](TupleElementGenerator &elt) { + auto origEltType = elt.getOrigType(); + auto substEltTypes = elt.getSubstTypes(resultType); + + // If the original element isn't a pack expansion, pull out the + // corresponding substituted tuple element and recurse. + if (!elt.isOrigPackExpansion()) { + emitIndirectResultParameters(SGF, substEltTypes[0], origEltType, DC); + return; + } + + // Otherwise, bind a pack parameter. + PackType *resultPackType = [&] { + SmallVector packElts(substEltTypes.begin(), + substEltTypes.end()); + return PackType::get(SGF.getASTContext(), packElts); + }(); + emitIndirectPackParameter(SGF, resultPackType, elt.getSubstTypes(), + origEltType, DC); + }); return; } + assert(!resultType->is()); + // If the return type is address-only, emit the indirect return argument. auto &resultTI = - SGF.SGM.Types.getTypeLowering(origResultType, - DC->mapTypeIntoContext(resultType), + SGF.SGM.Types.getTypeLowering(origResultType, resultTypeInContext, SGF.getTypeExpansionContext()); // The calling convention always uses minimal resilience expansion. auto &resultTIConv = SGF.SGM.Types.getTypeLowering( - DC->mapTypeIntoContext(resultType), TypeExpansionContext::minimal()); + resultTypeInContext, TypeExpansionContext::minimal()); auto resultConvType = resultTIConv.getLoweredType(); auto &ctx = SGF.getASTContext(); SILType resultSILType = resultTI.getLoweredType().getAddressType(); - // FIXME: respect susbtitution properly and collect the appropriate - // tuple components from resultType that correspond to the - // pack expansion in origType. - bool isPackExpansion = resultType->is(); - if (isPackExpansion) { - resultType = PackType::get(ctx, {resultType}); - - bool indirect = - origResultType.arePackElementsPassedIndirectly(SGF.SGM.Types); - SILPackType::ExtInfo extInfo(indirect); - resultSILType = SILType::getPrimitiveAddressType( - SILPackType::get(ctx, extInfo, {resultSILType.getASTType()})); - } - // And the abstraction pattern may force an indirect return even if the // concrete type wouldn't normally be returned indirectly. - if (!isPackExpansion && - !SILModuleConventions::isReturnedIndirectlyInSIL(resultConvType, + if (!SILModuleConventions::isReturnedIndirectlyInSIL(resultConvType, SGF.SGM.M)) { if (!SILModuleConventions(SGF.SGM.M).useLoweredAddresses() || origResultType.getResultConvention(SGF.SGM.Types) != AbstractionPattern::Indirect) diff --git a/lib/SILGen/SILGenStmt.cpp b/lib/SILGen/SILGenStmt.cpp index e47ecd343acfe..c6da83b620820 100644 --- a/lib/SILGen/SILGenStmt.cpp +++ b/lib/SILGen/SILGenStmt.cpp @@ -580,11 +580,29 @@ prepareIndirectResultInit(SILGenFunction &SGF, SILLocation loc, SmallVectorImpl &cleanups) { // Recursively decompose tuple abstraction patterns. if (origResultType.isTuple()) { - auto resultTupleType = cast(resultType); - auto tupleInit = new TupleInitialization(resultTupleType); - tupleInit->SubInitializations.reserve(resultTupleType->getNumElements()); + // Normally, we build a compound initialization for the tuple. But + // the initialization we build should match the substituted type, + // so if the tuple in the abstraction pattern vanishes under variadic + // substitution, we actually just want to return the initializer + // for the surviving component. + TupleInitialization *tupleInit = nullptr; + SmallVector singletonEltInit; + + bool vanishes = + origResultType.getVanishingTupleElementPatternType().hasValue(); + if (!vanishes) { + auto resultTupleType = cast(resultType); + tupleInit = new TupleInitialization(resultTupleType); + tupleInit->SubInitializations.reserve( + cast(resultType)->getNumElements()); + } + + // The list of element initializers to build into. + auto &eltInits = (vanishes + ? static_cast &>(singletonEltInit) + : tupleInit->SubInitializations); - origResultType.forEachTupleElement(resultTupleType, + origResultType.forEachTupleElement(resultType, [&](TupleElementGenerator &elt) { if (!elt.isOrigPackExpansion()) { auto eltInit = prepareIndirectResultInit(SGF, loc, fnTypeForResults, @@ -594,7 +612,7 @@ prepareIndirectResultInit(SILGenFunction &SGF, SILLocation loc, directResults, indirectResultAddrs, cleanups); - tupleInit->SubInitializations.push_back(std::move(eltInit)); + eltInits.push_back(std::move(eltInit)); } else { assert(allResults[0].isPack()); assert(SGF.silConv.isSILIndirect(allResults[0])); @@ -604,11 +622,17 @@ prepareIndirectResultInit(SILGenFunction &SGF, SILLocation loc, indirectResultAddrs = indirectResultAddrs.slice(1); preparePackResultInit(SGF, loc, elt.getOrigType(), elt.getSubstTypes(), - packAddr, - cleanups, tupleInit->SubInitializations); + packAddr, cleanups, eltInits); } }); + if (vanishes) { + assert(singletonEltInit.size() == 1); + return std::move(singletonEltInit.front()); + } + + assert(tupleInit); + assert(eltInits.size() == cast(resultType)->getNumElements()); return InitializationPtr(tupleInit); } diff --git a/lib/SILOptimizer/IPO/CapturePropagation.cpp b/lib/SILOptimizer/IPO/CapturePropagation.cpp index 6d67536fbca4e..a0b98715a3a43 100644 --- a/lib/SILOptimizer/IPO/CapturePropagation.cpp +++ b/lib/SILOptimizer/IPO/CapturePropagation.cpp @@ -492,7 +492,7 @@ static SILFunction *getSpecializedWithDeadParams( FuncBuilder.getModule().getSwiftModule(), FuncBuilder.getModule().isWholeModule(), ApplySite(), Specialized, PAI->getSubstitutionMap(), Specialized->isSerialized(), - /* ConvertIndirectToDirect */ false); + /* ConvertIndirectToDirect */ false, /*dropMetatypeArgs=*/ false); GenericFuncSpecializer FuncSpecializer(FuncBuilder, Specialized, ReInfo.getClonerParamSubstitutionMap(), diff --git a/lib/SILOptimizer/IPO/UsePrespecialized.cpp b/lib/SILOptimizer/IPO/UsePrespecialized.cpp index 3ef4c899b70c9..3bec378550003 100644 --- a/lib/SILOptimizer/IPO/UsePrespecialized.cpp +++ b/lib/SILOptimizer/IPO/UsePrespecialized.cpp @@ -91,7 +91,9 @@ bool UsePrespecialized::replaceByPrespecialized(SILFunction &F) { continue; ReabstractionInfo ReInfo(M.getSwiftModule(), M.isWholeModule(), AI, - ReferencedF, Subs, IsNotSerialized); + ReferencedF, Subs, IsNotSerialized, + /*ConvertIndirectToDirect=*/ true, + /*dropMetatypeArgs=*/ false); if (!ReInfo.canBeSpecialized()) continue; diff --git a/lib/SILOptimizer/Mandatory/PerformanceDiagnostics.cpp b/lib/SILOptimizer/Mandatory/PerformanceDiagnostics.cpp index 04c50546ccf65..43b5e853cd98a 100644 --- a/lib/SILOptimizer/Mandatory/PerformanceDiagnostics.cpp +++ b/lib/SILOptimizer/Mandatory/PerformanceDiagnostics.cpp @@ -217,6 +217,8 @@ bool PerformanceDiagnostics::checkClosureValue(SILValue closure, closure = tfi->getOperand(); } else if (auto *cp = dyn_cast(closure)) { closure = cp->getOperand(); + } else if (auto *cv = dyn_cast(closure)) { + closure = cv->getOperand(); } else if (acceptFunctionArgs && isa(closure)) { // We can assume that a function closure argument is already checked at // the call site. diff --git a/lib/SILOptimizer/Utils/Generics.cpp b/lib/SILOptimizer/Utils/Generics.cpp index ae5d6d62af8ac..c1f5dbbc230f5 100644 --- a/lib/SILOptimizer/Utils/Generics.cpp +++ b/lib/SILOptimizer/Utils/Generics.cpp @@ -997,6 +997,35 @@ ReabstractionInfo::createSubstitutedType(SILFunction *OrigF, return NewFnTy; } +CanSILFunctionType ReabstractionInfo::createThunkType(PartialApplyInst *forPAI) const { + if (!hasDroppedMetatypeArgs()) + return SubstitutedType; + + llvm::SmallVector newParams; + auto params = SubstitutedType->getParameters(); + unsigned firstAppliedParamIdx = params.size() - forPAI->getArguments().size(); + + for (unsigned paramIdx = 0; paramIdx < params.size(); ++paramIdx) { + if (paramIdx >= firstAppliedParamIdx && isDroppedMetatypeArg(param2ArgIndex(paramIdx))) + continue; + newParams.push_back(params[paramIdx]); + } + + auto newFnTy = SILFunctionType::get( + SubstitutedType->getInvocationGenericSignature(), + SubstitutedType->getExtInfo(), SubstitutedType->getCoroutineKind(), + SubstitutedType->getCalleeConvention(), newParams, + SubstitutedType->getYields(), SubstitutedType->getResults(), + SubstitutedType->getOptionalErrorResult(), + SubstitutedType->getPatternSubstitutions(), SubstitutionMap(), + SubstitutedType->getASTContext(), + SubstitutedType->getWitnessMethodConformanceOrInvalid()); + + // This is an interface type. It should not have any archetypes. + assert(!newFnTy->hasArchetype()); + return newFnTy; +} + /// Convert the substituted function type into a specialized function type based /// on the ReabstractionInfo. CanSILFunctionType ReabstractionInfo:: @@ -1067,8 +1096,10 @@ createSpecializedType(CanSILFunctionType SubstFTy, SILModule &M) const { : CanGenericSignature(); SILFunctionType::ExtInfo extInfo = SubstFTy->getExtInfo(); + ProtocolConformanceRef conf = SubstFTy->getWitnessMethodConformanceOrInvalid(); if (extInfo.hasSelfParam() && removedSelfParam) { extInfo = extInfo.withRepresentation(SILFunctionTypeRepresentation::Thin); + conf = ProtocolConformanceRef(); assert(!extInfo.hasSelfParam()); } @@ -1077,7 +1108,7 @@ createSpecializedType(CanSILFunctionType SubstFTy, SILModule &M) const { SubstFTy->getCoroutineKind(), SubstFTy->getCalleeConvention(), SpecializedParams, SpecializedYields, SpecializedResults, SubstFTy->getOptionalErrorResult(), SubstitutionMap(), SubstitutionMap(), - M.getASTContext(), SubstFTy->getWitnessMethodConformanceOrInvalid()); + M.getASTContext(), conf); } /// Create a new generic signature from an existing one by adding @@ -2531,7 +2562,8 @@ class ReabstractionThunkGenerator { if (!ReInfo.isPartialSpecialization()) { Mangle::GenericSpecializationMangler Mangler(OrigF, ReInfo.isSerialized()); ThunkName = Mangler.mangleNotReabstracted( - ReInfo.getCalleeParamSubstitutionMap()); + ReInfo.getCalleeParamSubstitutionMap(), + ReInfo.hasDroppedMetatypeArgs()); } else { Mangle::PartialSpecializationMangler Mangler( OrigF, ReInfo.getSpecializedType(), ReInfo.isSerialized(), @@ -2546,14 +2578,16 @@ class ReabstractionThunkGenerator { protected: FullApplySite createReabstractionThunkApply(SILBuilder &Builder); SILArgument *convertReabstractionThunkArguments( - SILBuilder &Builder, SmallVectorImpl &ArgsNeedingEndBorrows); + SILBuilder &Builder, SmallVectorImpl &ArgsNeedingEndBorrows, + CanSILFunctionType thunkType); }; } // anonymous namespace SILFunction *ReabstractionThunkGenerator::createThunk() { + CanSILFunctionType thunkType = ReInfo.createThunkType(OrigPAI); SILFunction *Thunk = FunctionBuilder.getOrCreateSharedFunction( - Loc, ThunkName, ReInfo.getSubstitutedType(), IsBare, IsTransparent, + Loc, ThunkName, thunkType, IsBare, IsTransparent, ReInfo.isSerialized(), ProfileCounter(), IsThunk, IsNotDynamic, IsNotDistributed, IsNotRuntimeAccessible); // Re-use an existing thunk. @@ -2594,7 +2628,7 @@ SILFunction *ReabstractionThunkGenerator::createThunk() { // Handle lowered addresses. SmallVector ArgsThatNeedEndBorrow; SILArgument *ReturnValueAddr = - convertReabstractionThunkArguments(Builder, ArgsThatNeedEndBorrow); + convertReabstractionThunkArguments(Builder, ArgsThatNeedEndBorrow, thunkType); FullApplySite ApplySite = createReabstractionThunkApply(Builder); @@ -2650,6 +2684,18 @@ FullApplySite ReabstractionThunkGenerator::createReabstractionThunkApply( return FullApplySite(TAI); } +static SILFunctionArgument *addFunctionArgument(SILFunction *function, + SILType argType, + SILArgument *copyAttributesFrom) { + SILBasicBlock *entryBB = function->getEntryBlock(); + auto *src = cast(copyAttributesFrom); + auto *arg = entryBB->createFunctionArgument(argType, src->getDecl()); + arg->setNoImplicitCopy(src->isNoImplicitCopy()); + arg->setLifetimeAnnotation(src->getLifetimeAnnotation()); + arg->setClosureCapture(src->isClosureCapture()); + return arg; +} + /// Create SIL arguments for a reabstraction thunk with lowered addresses. This /// may involve replacing indirect arguments with loads and stores. Return the /// SILArgument for the address of an indirect result, or nullptr. @@ -2657,43 +2703,31 @@ FullApplySite ReabstractionThunkGenerator::createReabstractionThunkApply( /// FIXME: Remove this if we don't need to create reabstraction thunks after /// address lowering. SILArgument *ReabstractionThunkGenerator::convertReabstractionThunkArguments( - SILBuilder &Builder, SmallVectorImpl &ArgsThatNeedEndBorrow) { + SILBuilder &Builder, SmallVectorImpl &ArgsThatNeedEndBorrow, + CanSILFunctionType thunkType +) { SILFunction *Thunk = &Builder.getFunction(); CanSILFunctionType SpecType = SpecializedFunc->getLoweredFunctionType(); - CanSILFunctionType SubstType = ReInfo.getSubstitutedType(); auto specConv = SpecializedFunc->getConventions(); (void)specConv; - SILFunctionConventions substConv(SubstType, M); + SILFunctionConventions substConv(thunkType, M); assert(specConv.useLoweredAddresses()); // ReInfo.NumIndirectResults corresponds to SubstTy's formal indirect // results. SpecTy may have fewer formal indirect results. - assert(SubstType->getNumIndirectFormalResults() + assert(thunkType->getNumIndirectFormalResults() >= SpecType->getNumIndirectFormalResults()); - SILBasicBlock *EntryBB = Thunk->getEntryBlock(); SILArgument *ReturnValueAddr = nullptr; auto SpecArgIter = SpecializedFunc->getArguments().begin(); - auto cloneSpecializedArgument = [&]() { - // No change to the argument. - SILArgument *SpecArg = *SpecArgIter++; - auto *NewArg = - EntryBB->createFunctionArgument(SpecArg->getType(), SpecArg->getDecl()); - NewArg->setNoImplicitCopy( - cast(SpecArg)->isNoImplicitCopy()); - NewArg->setLifetimeAnnotation( - cast(SpecArg)->getLifetimeAnnotation()); - NewArg->setClosureCapture( - cast(SpecArg)->isClosureCapture()); - Arguments.push_back(NewArg); - }; + // ReInfo.NumIndirectResults corresponds to SubstTy's formal indirect // results. SpecTy may have fewer formal indirect results. - assert(SubstType->getNumIndirectFormalResults() + assert(thunkType->getNumIndirectFormalResults() >= SpecType->getNumIndirectFormalResults()); unsigned resultIdx = 0; - for (auto substRI : SubstType->getIndirectFormalResults()) { + for (auto substRI : thunkType->getIndirectFormalResults()) { if (ReInfo.isFormalResultConverted(resultIdx++)) { // Convert an originally indirect to direct specialized result. // Store the result later. @@ -2703,36 +2737,35 @@ SILArgument *ReabstractionThunkGenerator::convertReabstractionThunkArguments( substConv.getSILType(substRI, Builder.getTypeExpansionContext())); assert(ResultTy.isAddress()); assert(!ReturnValueAddr); - ReturnValueAddr = EntryBB->createFunctionArgument(ResultTy); + ReturnValueAddr = Thunk->getEntryBlock()->createFunctionArgument(ResultTy); continue; } // If the specialized result is already indirect, simply clone the indirect // result argument. - assert((*SpecArgIter)->getType().isAddress()); - cloneSpecializedArgument(); + SILArgument *specArg = *SpecArgIter++; + assert(specArg->getType().isAddress()); + Arguments.push_back(addFunctionArgument(Thunk, specArg->getType(), specArg)); } assert(SpecArgIter == SpecializedFunc->getArgumentsWithoutIndirectResults().begin()); - unsigned numParams = SpecType->getNumParameters(); - assert(numParams == SubstType->getNumParameters()); - for (unsigned paramIdx = 0; paramIdx < numParams; ++paramIdx) { - if (ReInfo.isParamConverted(paramIdx)) { + unsigned numParams = OrigF->getLoweredFunctionType()->getNumParameters(); + for (unsigned origParamIdx = 0, specArgIdx = 0; origParamIdx < numParams; ++origParamIdx) { + unsigned origArgIdx = ReInfo.param2ArgIndex(origParamIdx); + if (ReInfo.isDroppedMetatypeArg(origArgIdx)) { + assert(origArgIdx >= ApplySite(OrigPAI).getCalleeArgIndexOfFirstAppliedArg() && + "cannot drop metatype argument of not applied argument"); + continue; + } + SILArgument *specArg = *SpecArgIter++; + if (ReInfo.isParamConverted(origParamIdx)) { // Convert an originally indirect to direct specialized parameter. - assert(!specConv.isSILIndirect(SpecType->getParameters()[paramIdx])); + assert(!specConv.isSILIndirect(SpecType->getParameters()[specArgIdx])); // Instead of passing the address, pass the loaded value. SILType ParamTy = SpecializedFunc->mapTypeIntoContext( - substConv.getSILType(SubstType->getParameters()[paramIdx], + substConv.getSILType(thunkType->getParameters()[specArgIdx], Builder.getTypeExpansionContext())); assert(ParamTy.isAddress()); - SILArgument *SpecArg = *SpecArgIter++; - SILFunctionArgument *NewArg = - EntryBB->createFunctionArgument(ParamTy, SpecArg->getDecl()); - NewArg->setNoImplicitCopy( - cast(SpecArg)->isNoImplicitCopy()); - NewArg->setLifetimeAnnotation( - cast(SpecArg)->getLifetimeAnnotation()); - NewArg->setClosureCapture( - cast(SpecArg)->isClosureCapture()); + SILFunctionArgument *NewArg = addFunctionArgument(Thunk, ParamTy, specArg); if (!NewArg->getArgumentConvention().isGuaranteedConvention()) { SILValue argVal = Builder.emitLoadValueOperation( Loc, NewArg, LoadOwnershipQualifier::Take); @@ -2743,10 +2776,11 @@ SILArgument *ReabstractionThunkGenerator::convertReabstractionThunkArguments( ArgsThatNeedEndBorrow.push_back(Arguments.size()); Arguments.push_back(argVal); } - continue; + } else { + // Simply clone unconverted direct or indirect parameters. + Arguments.push_back(addFunctionArgument(Thunk, specArg->getType(), specArg)); } - // Simply clone unconverted direct or indirect parameters. - cloneSpecializedArgument(); + ++specArgIdx; } assert(SpecArgIter == SpecializedFunc->getArguments().end()); return ReturnValueAddr; @@ -2773,7 +2807,7 @@ static bool createPrespecialized(StringRef UnspecializedName, ReabstractionInfo ReInfo(M.getSwiftModule(), M.isWholeModule(), ApplySite(), UnspecFunc, Apply.getSubstitutionMap(), IsNotSerialized, - /*ConvertIndirectToDirect=*/true); + /*ConvertIndirectToDirect= */true, /*dropMetatypeArgs=*/ false); if (!ReInfo.canBeSpecialized()) return false; @@ -2945,7 +2979,7 @@ bool usePrespecialized( funcBuilder.getModule().getSwiftModule(), funcBuilder.getModule().isWholeModule(), apply, refF, newSubstMap, apply.getFunction()->isSerialized() ? IsSerialized : IsNotSerialized, - /*ConvertIndirectToDirect=*/true, /*dropMetatypeArgs*/true, nullptr); + /*ConvertIndirectToDirect=*/ true, /*dropMetatypeArgs=*/ false, nullptr); if (layoutReInfo.getSpecializedType() == reInfo.getSpecializedType()) { layoutMatches.push_back( @@ -3005,6 +3039,54 @@ bool usePrespecialized( return false; } +static bool isUsedAsDynamicSelf(SILArgument *arg) { + for (Operand *use : arg->getUses()) { + if (use->isTypeDependent()) + return true; + } + return false; +} + +static bool canDropMetatypeArgs(ApplySite apply, SILFunction *callee) { + if (!callee->isDefinition()) + return false; + + auto calleeArgs = callee->getArguments(); + unsigned firstAppliedArgIdx = apply.getCalleeArgIndexOfFirstAppliedArg(); + for (unsigned calleeArgIdx = 0; calleeArgIdx < calleeArgs.size(); ++calleeArgIdx) { + SILArgument *calleeArg = calleeArgs[calleeArgIdx]; + auto mt = calleeArg->getType().getAs(); + if (!mt) + continue; + + if (isUsedAsDynamicSelf(calleeArg)) + return false; + + // We don't drop metatype arguments of not applied arguments (in case of `partial_apply`). + if (firstAppliedArgIdx > calleeArgIdx) + return false; + + if (mt->hasRepresentation() && mt->getRepresentation() == MetatypeRepresentation::Thin) + continue; + + // If the passed thick metatype value is not a `metatype` instruction + // we don't know the real metatype at runtime. It's not necessarily the + // same as the declared metatype. It could e.g. be an upcast of a class + // metatype. + SILValue callerArg = apply.getArguments()[calleeArgIdx - firstAppliedArgIdx]; + if (isa(callerArg)) + continue; + + // But: if the metatype is not used in the callee we don't have to care + // what metatype value is passed. We can just remove it. + if (callee->isDefinition() && onlyHaveDebugUses(calleeArg)) + continue; + + return false; + } + return true; +} + void swift::trySpecializeApplyOfGeneric( SILOptFunctionBuilder &FuncBuilder, ApplySite Apply, DeadInstructionSet &DeadApplies, @@ -3053,7 +3135,7 @@ void swift::trySpecializeApplyOfGeneric( FuncBuilder.getModule().isWholeModule(), Apply, RefF, Apply.getSubstitutionMap(), Serialized, /*ConvertIndirectToDirect=*/ true, - /*dropMetatypeArgs=*/ isMandatory, + /*dropMetatypeArgs=*/ canDropMetatypeArgs(Apply, RefF), &ORE); if (!ReInfo.canBeSpecialized()) return; @@ -3210,16 +3292,19 @@ void swift::trySpecializeApplyOfGeneric( auto *FRI = Builder.createFunctionRef(PAI->getLoc(), Thunk); SmallVector Arguments; for (auto &Op : PAI->getArgumentOperands()) { + unsigned calleeArgIdx = ApplySite(PAI).getCalleeArgIndex(Op); + if (ReInfo.isDroppedMetatypeArg(calleeArgIdx)) + continue; Arguments.push_back(Op.get()); } auto Subs = ReInfo.getCallerParamSubstitutionMap(); auto FnTy = Thunk->getLoweredFunctionType(); Subs = SubstitutionMap::get(FnTy->getSubstGenericSignature(), Subs); - auto *NewPAI = Builder.createPartialApply( - PAI->getLoc(), FRI, Subs, Arguments, - PAI->getType().getAs()->getCalleeConvention(), - PAI->isOnStack()); - PAI->replaceAllUsesWith(NewPAI); + SingleValueInstruction *newPAI = Builder.createPartialApply( + PAI->getLoc(), FRI, Subs, Arguments, + PAI->getType().getAs()->getCalleeConvention(), + PAI->isOnStack()); + PAI->replaceAllUsesWith(newPAI); DeadApplies.insert(PAI); return; } diff --git a/lib/Sema/CSGen.cpp b/lib/Sema/CSGen.cpp index 085d178ae2de3..e6d7e415a2807 100644 --- a/lib/Sema/CSGen.cpp +++ b/lib/Sema/CSGen.cpp @@ -1808,60 +1808,14 @@ namespace { } if (AnyMetatypeType *meta = baseTy->getAs()) { - if (BoundGenericType *bgt - = meta->getInstanceType()->getAs()) { - ArrayRef typeVars = bgt->getGenericArgs(); - auto specializations = expr->getUnresolvedParams(); - - // If we have too many generic arguments, complain. - if (specializations.size() > typeVars.size()) { - de.diagnose(expr->getSubExpr()->getLoc(), - diag::type_parameter_count_mismatch, - bgt->getDecl()->getName(), typeVars.size(), - specializations.size(), - /*too many arguments*/ false, - /*isParameterPack?*/ false) - .highlight( - SourceRange(expr->getLAngleLoc(), expr->getRAngleLoc())); - de.diagnose(bgt->getDecl(), diag::kind_declname_declared_here, - DescriptiveDeclKind::GenericType, - bgt->getDecl()->getName()); - return Type(); - } - - // Bind the specified generic arguments to the type variables in the - // open type. - auto *const locator = CS.getConstraintLocator(expr); - auto options = - TypeResolutionOptions(TypeResolverContext::InExpression); - for (size_t i = 0, e = specializations.size(); i < e; ++i) { - PackExpansionExpr *elementEnv = nullptr; - if (!PackElementEnvironments.empty()) { - options |= TypeResolutionFlags::AllowPackReferences; - elementEnv = PackElementEnvironments.back(); - } - - const auto result = TypeResolution::resolveContextualType( - specializations[i], CS.DC, options, - // Introduce type variables for unbound generics. - OpenUnboundGenericType(CS, locator), - HandlePlaceholderType(CS, locator), - OpenPackElementType(CS, locator, elementEnv)); - if (result->hasError()) - return Type(); - - CS.addConstraint(ConstraintKind::Bind, typeVars[i], result, - locator); - } - - return baseTy; - } else { - de.diagnose(expr->getSubExpr()->getLoc(), diag::not_a_generic_type, - meta->getInstanceType()); - de.diagnose(expr->getLAngleLoc(), - diag::while_parsing_as_left_angle_bracket); + auto *overloadLocator = CS.getConstraintLocator(expr->getSubExpr()); + if (addSpecializationConstraint(overloadLocator, + meta->getInstanceType(), + expr->getUnresolvedParams())) { return Type(); } + + return baseTy; } // FIXME: If the base type is a type variable, constrain it to a metatype diff --git a/lib/Sema/CSSimplify.cpp b/lib/Sema/CSSimplify.cpp index 676f777692719..49b82b210e1b1 100644 --- a/lib/Sema/CSSimplify.cpp +++ b/lib/Sema/CSSimplify.cpp @@ -13535,18 +13535,32 @@ ConstraintSystem::simplifyExplicitGenericArgumentsConstraint( if (simplifiedBoundType->isTypeVariableOrMember()) return formUnsolved(); - // If the overload hasn't been resolved, we can't simplify this constraint. - auto overloadLocator = getCalleeLocator(getConstraintLocator(locator)); - auto selectedOverload = findSelectedOverloadFor(overloadLocator); - if (!selectedOverload) - return formUnsolved(); + ValueDecl *decl; + SmallVector openedTypes; + if (auto *bound = dyn_cast(type1.getPointer())) { + decl = bound->getDecl(); + for (auto argType : bound->getDirectGenericArgs()) { + auto *typeVar = argType->getAs(); + auto *genericParam = typeVar->getImpl().getGenericParameter(); + openedTypes.push_back({genericParam, typeVar}); + } + } else { + // If the overload hasn't been resolved, we can't simplify this constraint. + auto overloadLocator = getCalleeLocator(getConstraintLocator(locator)); + auto selectedOverload = findSelectedOverloadFor(overloadLocator); + if (!selectedOverload) + return formUnsolved(); - auto overloadChoice = selectedOverload->choice; - if (!overloadChoice.isDecl()) { - return SolutionKind::Error; + auto overloadChoice = selectedOverload->choice; + if (!overloadChoice.isDecl()) { + return SolutionKind::Error; + } + + decl = overloadChoice.getDecl(); + auto openedOverloadTypes = getOpenedTypes(overloadLocator); + openedTypes.append(openedOverloadTypes.begin(), openedOverloadTypes.end()); } - auto decl = overloadChoice.getDecl(); auto genericContext = decl->getAsGenericContext(); if (!genericContext) return SolutionKind::Error; @@ -13560,9 +13574,28 @@ ConstraintSystem::simplifyExplicitGenericArgumentsConstraint( // Map the generic parameters we have over to their opened types. SmallVector openedGenericParams; auto genericParamDepth = genericParams->getParams()[0]->getDepth(); - for (const auto &openedType : getOpenedTypes(overloadLocator)) { + for (const auto &openedType : openedTypes) { if (openedType.first->getDepth() == genericParamDepth) { - openedGenericParams.push_back(Type(openedType.second)); + // A generic argument list containing pack references expects + // those packs to be wrapped in pack expansion types. If this + // opened type represents the generic argument for a parameter + // pack, wrap generate the appropriate shape constraints and + // add a pack expansion to the argument list. + if (openedType.first->isParameterPack()) { + auto patternType = openedType.second; + auto *shapeLoc = getConstraintLocator( + locator.withPathElement(ConstraintLocator::PackShape)); + auto *shapeType = createTypeVariable(shapeLoc, + TVO_CanBindToPack | + TVO_CanBindToHole); + addConstraint(ConstraintKind::ShapeOf, + shapeType, patternType, shapeLoc); + + auto *expansion = PackExpansionType::get(patternType, shapeType); + openedGenericParams.push_back(expansion); + } else { + openedGenericParams.push_back(Type(openedType.second)); + } } } assert(openedGenericParams.size() == genericParams->size()); diff --git a/lib/Sema/TypeCheckAttr.cpp b/lib/Sema/TypeCheckAttr.cpp index 4c81fe8540fae..9b21805409618 100644 --- a/lib/Sema/TypeCheckAttr.cpp +++ b/lib/Sema/TypeCheckAttr.cpp @@ -4349,6 +4349,14 @@ void AttributeChecker::checkBackDeployedAttrs( } } + if (VD->getOpaqueResultTypeDecl()) { + diagnoseAndRemoveAttr(Attr, + diag::backdeployed_opaque_result_not_supported, + Attr, D->getDescriptiveKind()) + .warnInSwiftInterface(D->getDeclContext()); + continue; + } + auto AtLoc = Attr->AtLoc; auto Platform = Attr->Platform; diff --git a/lib/Sema/TypeCheckMacros.cpp b/lib/Sema/TypeCheckMacros.cpp index c7b0f454aca02..f939aeec229ef 100644 --- a/lib/Sema/TypeCheckMacros.cpp +++ b/lib/Sema/TypeCheckMacros.cpp @@ -345,25 +345,8 @@ CompilerPluginLoadRequest::evaluate(Evaluator &evaluator, ASTContext *ctx, std::string libraryPath; std::string executablePath; - - // '-load-plugin-libarary'. - if (auto found = loader.lookupExplicitLibraryPluginByModuleName(moduleName)) { - libraryPath = found.value(); - } - // '-load-plugin-executable'. - else if (auto found = loader.lookupExecutablePluginByModuleName(moduleName)) { - executablePath = found->str(); - } - // '-plugin-path'. - else if (auto found = - loader.lookupLibraryPluginInSearchPathByModuleName(moduleName)) { - libraryPath = found.value(); - } - // '-external-plugin-path'. - else if (auto found = - loader.lookupExternalLibraryPluginByModuleName(moduleName)) { - std::tie(libraryPath, executablePath) = found.value(); - } + std::tie(libraryPath, executablePath) = + loader.lookupPluginByModuleName(moduleName); if (!executablePath.empty()) { if (LoadedExecutablePlugin *executablePlugin = diff --git a/lib/Serialization/SerializedModuleLoader.cpp b/lib/Serialization/SerializedModuleLoader.cpp index 56327b501b71a..1107e1d48f1b4 100644 --- a/lib/Serialization/SerializedModuleLoader.cpp +++ b/lib/Serialization/SerializedModuleLoader.cpp @@ -205,8 +205,7 @@ void SerializedModuleLoaderBase::collectVisibleTopLevelModuleNamesImpl( }); return None; } - case ModuleSearchPathKind::RuntimeLibrary: - case ModuleSearchPathKind::CompilerPlugin: { + case ModuleSearchPathKind::RuntimeLibrary: { // Look for: // (Darwin OS) $PATH/{name}.swiftmodule/{arch}.{extension} // (Other OS) $PATH/{name}.{extension} @@ -678,8 +677,7 @@ bool SerializedModuleLoaderBase::findModule( switch (searchPath->getKind()) { case ModuleSearchPathKind::Import: - case ModuleSearchPathKind::RuntimeLibrary: - case ModuleSearchPathKind::CompilerPlugin: { + case ModuleSearchPathKind::RuntimeLibrary: { isFramework = false; // On Apple platforms, we can assume that the runtime libraries use diff --git a/lib/SymbolGraphGen/SymbolGraph.cpp b/lib/SymbolGraphGen/SymbolGraph.cpp index 3d9b142885505..cf6e8e9e89b8a 100644 --- a/lib/SymbolGraphGen/SymbolGraph.cpp +++ b/lib/SymbolGraphGen/SymbolGraph.cpp @@ -718,7 +718,10 @@ bool SymbolGraph::isImplicitlyPrivate(const Decl *D, // Symbols from exported-imported modules should only be included if they // were originally public. - if (Walker.isFromExportedImportedModule(D) && + // We force compiler-equality here to ensure that the presence of an underlying + // Clang module does not prevent internal Swift symbols from being emitted when + // MinimumAccessLevel is set to `internal` or below. + if (Walker.isFromExportedImportedModule(D, /*countUnderlyingClangModule*/false) && VD->getFormalAccess() < AccessLevel::Public) { return true; } diff --git a/lib/SymbolGraphGen/SymbolGraphASTWalker.cpp b/lib/SymbolGraphGen/SymbolGraphASTWalker.cpp index 98b2fad193240..84b0bbfa16724 100644 --- a/lib/SymbolGraphGen/SymbolGraphASTWalker.cpp +++ b/lib/SymbolGraphGen/SymbolGraphASTWalker.cpp @@ -28,8 +28,17 @@ namespace { /// /// This does a by-name comparison to consider a module's underlying Clang module to be equivalent /// to the wrapping module of the same name. -bool areModulesEqual(const ModuleDecl *lhs, const ModuleDecl *rhs) { - return lhs->getNameStr() == rhs->getNameStr(); +/// +/// If the `isClangEqual` argument is set to `false`, the modules must also be from the same +/// compiler, i.e. a Swift module and its underlying Clang module would be considered not equal. +bool areModulesEqual(const ModuleDecl *lhs, const ModuleDecl *rhs, bool isClangEqual = true) { + if (lhs->getNameStr() != rhs->getNameStr()) + return false; + + if (!isClangEqual && (lhs->isNonSwiftModule() != rhs->isNonSwiftModule())) + return false; + + return true; } } // anonymous namespace @@ -303,9 +312,9 @@ bool SymbolGraphASTWalker::isConsideredExportedImported(const Decl *D) const { return false; } -bool SymbolGraphASTWalker::isFromExportedImportedModule(const Decl* D) const { +bool SymbolGraphASTWalker::isFromExportedImportedModule(const Decl* D, bool countUnderlyingClangModule) const { auto *M = D->getModuleContext(); - return isQualifiedExportedImport(D) || isExportedImportedModule(M); + return isQualifiedExportedImport(D) || isExportedImportedModule(M, countUnderlyingClangModule); } bool SymbolGraphASTWalker::isQualifiedExportedImport(const Decl *D) const { @@ -314,9 +323,9 @@ bool SymbolGraphASTWalker::isQualifiedExportedImport(const Decl *D) const { }); } -bool SymbolGraphASTWalker::isExportedImportedModule(const ModuleDecl *M) const { - return llvm::any_of(ExportedImportedModules, [&M](const auto *MD) { - return areModulesEqual(M, MD->getModuleContext()); +bool SymbolGraphASTWalker::isExportedImportedModule(const ModuleDecl *M, bool countUnderlyingClangModule) const { + return llvm::any_of(ExportedImportedModules, [&M, countUnderlyingClangModule](const auto *MD) { + return areModulesEqual(M, MD->getModuleContext(), /*isClangEqual*/countUnderlyingClangModule); }); } diff --git a/lib/SymbolGraphGen/SymbolGraphASTWalker.h b/lib/SymbolGraphGen/SymbolGraphASTWalker.h index 14d04b2385616..84b043dff4bac 100644 --- a/lib/SymbolGraphGen/SymbolGraphASTWalker.h +++ b/lib/SymbolGraphGen/SymbolGraphASTWalker.h @@ -103,13 +103,19 @@ struct SymbolGraphASTWalker : public SourceEntityWalker { virtual bool isConsideredExportedImported(const Decl *D) const; /// Returns whether the given declaration comes from an `@_exported import` module. - virtual bool isFromExportedImportedModule(const Decl *D) const; + /// + /// If `countUnderlyingClangModule` is `false`, decls from Clang modules will not be considered + /// re-exported unless the Clang module was itself directly re-exported. + virtual bool isFromExportedImportedModule(const Decl *D, bool countUnderlyingClangModule = true) const; /// Returns whether the given declaration was imported via an `@_exported import ` declaration. virtual bool isQualifiedExportedImport(const Decl *D) const; /// Returns whether the given module is an `@_exported import` module. - virtual bool isExportedImportedModule(const ModuleDecl *M) const; + /// + /// If `countUnderlyingClangModule` is `false`, Clang modules will not be considered re-exported + /// unless the Clang module itself was directly re-exported. + virtual bool isExportedImportedModule(const ModuleDecl *M, bool countUnderlyingClangModule = true) const; /// Returns whether the given module is the main module, or is an `@_exported import` module. virtual bool isOurModule(const ModuleDecl *M) const; diff --git a/stdlib/cmake/modules/AddSwiftStdlib.cmake b/stdlib/cmake/modules/AddSwiftStdlib.cmake index 5f2415f87b025..f5a77c4c81a02 100644 --- a/stdlib/cmake/modules/AddSwiftStdlib.cmake +++ b/stdlib/cmake/modules/AddSwiftStdlib.cmake @@ -138,8 +138,8 @@ function(_add_target_variant_c_compile_link_flags) if (_lto_flag_out) list(APPEND result "${_lto_flag_out}") # Disable opaque pointers in lto mode. - list(APPEND result "-Xclang") - list(APPEND result "-no-opaque-pointers") + #list(APPEND result "-Xclang") + #list(APPEND result "-no-opaque-pointers") endif() set("${CFLAGS_RESULT_VAR_NAME}" "${result}" PARENT_SCOPE) diff --git a/stdlib/public/Observation/Sources/Observation/Observable.swift b/stdlib/public/Observation/Sources/Observation/Observable.swift index cc7d1f5732c3b..fcd7fe4cff1d6 100644 --- a/stdlib/public/Observation/Sources/Observation/Observable.swift +++ b/stdlib/public/Observation/Sources/Observation/Observable.swift @@ -10,11 +10,35 @@ //===----------------------------------------------------------------------===// +/// A type that emits notifications to observers when underlying data changes. +/// +/// Conforming to this protocol signals to other APIs that the type supports +/// observation. However, applying the `Observable` protocol by itself to a +/// type doesn't add observation functionality to the type. Instead, always use +/// the ``Observation/Observable-swift.macro`` macro when adding observation +/// support to a type. @available(SwiftStdlib 5.9, *) @_marker public protocol Observable { } #if $Macros && hasAttribute(attached) +/// Defines and implements conformance of the Observable protocol. +/// +/// This macro adds observation support to a custom type and conforms the type +/// to the ``Observation/Observable-swift.protocol`` protocol. For example, the +/// following code applies the `Observable` macro to the type `Car` making it +/// observable: +/// +/// @Observable +/// class Car { +/// var name: String = "" +/// var needsRepairs: Bool = false +/// +/// init(name: String, needsRepairs: Bool = false) { +/// self.name = name +/// self.needsRepairs = needsRepairs +/// } +/// } @available(SwiftStdlib 5.9, *) #if OBSERVATION_SUPPORTS_PEER_MACROS @attached(member, names: named(_$observationRegistrar), named(access), named(withMutation)) @@ -26,6 +50,10 @@ public macro Observable() = #externalMacro(module: "ObservationMacros", type: "ObservableMacro") +/// Synthesizes a property for accessors. +/// +/// The ``Observation`` module uses this macro. Its use outside of the +/// framework isn't necessary. @available(SwiftStdlib 5.9, *) @attached(accessor, names: named(init), named(get), named(set)) #if OBSERVATION_SUPPORTS_PEER_MACROS @@ -34,6 +62,11 @@ public macro Observable() = public macro ObservationTracked() = #externalMacro(module: "ObservationMacros", type: "ObservationTrackedMacro") +/// Disables observation tracking of a property. +/// +/// By default, an object can observe any property of an observable type that +/// is accessible to the observing object. To prevent observation of an +/// accessible property, attach the `ObservationIgnored` macro to the property. @available(SwiftStdlib 5.9, *) @attached(accessor, names: named(willSet)) public macro ObservationIgnored() = diff --git a/stdlib/public/Observation/Sources/Observation/ObservationRegistrar.swift b/stdlib/public/Observation/Sources/Observation/ObservationRegistrar.swift index ccf9c63616aa1..f471b531476c7 100644 --- a/stdlib/public/Observation/Sources/Observation/ObservationRegistrar.swift +++ b/stdlib/public/Observation/Sources/Observation/ObservationRegistrar.swift @@ -9,6 +9,11 @@ // //===----------------------------------------------------------------------===// +/// Provides storage for tracking and access to data changes. +/// +/// You don't need to create an instance of `ObservationRegistrar` when using +/// the ``Observation/Observable-swift.macro`` macro to indicate observability +/// of a type. @available(SwiftStdlib 5.9, *) public struct ObservationRegistrar: Sendable { struct State: @unchecked Sendable { @@ -90,9 +95,20 @@ public struct ObservationRegistrar: Sendable { let context = Context() + /// Creates an instance of the observation registrar. + /// + /// You don't need to create an instance of + /// ``Observation/ObservationRegistrar`` when using the + /// ``Observation/Observable-swift.macro`` macro to indicate observably + /// of a type. public init() { } + /// Registers access to a specific property for observation. + /// + /// - Parameters: + /// - subject: An instance of an observable type. + /// - keyPath: The key path of an observed property. public func access( _ subject: Subject, keyPath: KeyPath @@ -106,6 +122,11 @@ public struct ObservationRegistrar: Sendable { } } + /// A property observation called before setting the value of the subject. + /// + /// - Parameters: + /// - subject: An instance of an observable type. + /// - keyPath: The key path of an observed property. public func willSet( _ subject: Subject, keyPath: KeyPath @@ -113,6 +134,11 @@ public struct ObservationRegistrar: Sendable { context.willSet(subject, keyPath: keyPath) } + /// A property observation called after setting the value of the subject. + /// + /// - Parameters: + /// - subject: An instance of an observable type. + /// - keyPath: The key path of an observed property. public func didSet( _ subject: Subject, keyPath: KeyPath @@ -120,6 +146,13 @@ public struct ObservationRegistrar: Sendable { } + /// Identifies mutations to the transactions registered for observers. + /// + /// This method calls ``willset(_:keypath:)`` before the mutation. Then it + /// calls ``didset(_:keypath:)`` after the mutation. + /// - Parameters: + /// - of: An instance of an observable type. + /// - keyPath: The key path of an observed property. public func withMutation( of subject: Subject, keyPath: KeyPath, diff --git a/stdlib/public/Observation/Sources/Observation/ObservationTracking.swift b/stdlib/public/Observation/Sources/Observation/ObservationTracking.swift index d97d69186842d..c6558fb3e38a4 100644 --- a/stdlib/public/Observation/Sources/Observation/ObservationTracking.swift +++ b/stdlib/public/Observation/Sources/Observation/ObservationTracking.swift @@ -80,6 +80,30 @@ public struct ObservationTracking { } } +/// Tracks access to properties. +/// +/// This method tracks access to any property within the `apply` closure, and +/// informs the caller of value changes made to participating properties by way +/// of the `onChange` closure. For example, the following code tracks changes +/// to the name of cars, but it doesn't track changes to any other property of +/// `Car`: +/// +/// func render() { +/// withObservationTracking { +/// for car in cars { +/// print(car.name) +/// } +/// } onChange: { +/// print("Schedule renderer.") +/// } +/// } +/// +/// - Parameters: +/// - apply: A closure that contains properties to track. +/// - onChange: The closure invoked when the value of a property changes. +/// +/// - Returns: The value that the `apply` closure returns if it has a return +/// value; otherwise, there is no return value. @available(SwiftStdlib 5.9, *) public func withObservationTracking( _ apply: () -> T, diff --git a/test/AutoDiff/IRGen/differentiable_function.sil b/test/AutoDiff/IRGen/differentiable_function.sil index 71391c500a039..00aa51f2ccb81 100644 --- a/test/AutoDiff/IRGen/differentiable_function.sil +++ b/test/AutoDiff/IRGen/differentiable_function.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s sil_stage raw diff --git a/test/AutoDiff/IRGen/runtime.swift b/test/AutoDiff/IRGen/runtime.swift index 81802387929a0..9d6ad8d20ca57 100644 --- a/test/AutoDiff/IRGen/runtime.swift +++ b/test/AutoDiff/IRGen/runtime.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -parse-stdlib %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-stdlib %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -parse-stdlib %s -emit-ir import Swift import _Differentiation diff --git a/test/AutoDiff/IRGen/witness_table_differentiable_requirements.sil b/test/AutoDiff/IRGen/witness_table_differentiable_requirements.sil index 248e34c3a8c6d..c158bda41398e 100644 --- a/test/AutoDiff/IRGen/witness_table_differentiable_requirements.sil +++ b/test/AutoDiff/IRGen/witness_table_differentiable_requirements.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -parse-sil %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-sil %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -parse-sil %s -emit-ir // REQUIRES: CPU=x86_64 sil_stage canonical diff --git a/test/AutoDiff/SIL/differentiability_witness_function_inst.sil b/test/AutoDiff/SIL/differentiability_witness_function_inst.sil index c3246c428caba..3fe35718337b2 100644 --- a/test/AutoDiff/SIL/differentiability_witness_function_inst.sil +++ b/test/AutoDiff/SIL/differentiability_witness_function_inst.sil @@ -15,7 +15,8 @@ // IRGen test. -// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=Simplification -emit-ir %s | %FileCheck %s --check-prefix=IRGEN --check-prefix %target-cpu +// RUN: %target-swift-frontend %use_no_opaque_pointers -Xllvm -sil-disable-pass=Simplification -emit-ir %s | %FileCheck %s --check-prefix=IRGEN --check-prefix %target-cpu +// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=Simplification -emit-ir %s // NOTE: `%target-cpu`-specific FileCheck lines exist because lowered function types in LLVM IR differ between architectures. // `shell` is required only to run `sed` as a diff --git a/test/AutoDiff/SIL/differentiable_function_inst.sil b/test/AutoDiff/SIL/differentiable_function_inst.sil index ed2033b9fbf1a..f7cd4d57d4951 100644 --- a/test/AutoDiff/SIL/differentiable_function_inst.sil +++ b/test/AutoDiff/SIL/differentiable_function_inst.sil @@ -15,7 +15,8 @@ // IRGen test. -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefix=CHECK-IRGEN +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s --check-prefix=CHECK-IRGEN +// RUN: %target-swift-frontend -emit-ir %s // `shell` is required only to run `sed` as a // https://github.com/apple/swift/issues/54526 workaround. diff --git a/test/AutoDiff/SIL/sil_differentiability_witness.sil b/test/AutoDiff/SIL/sil_differentiability_witness.sil index ff40f7d54b07d..c607a5c5a75d1 100644 --- a/test/AutoDiff/SIL/sil_differentiability_witness.sil +++ b/test/AutoDiff/SIL/sil_differentiability_witness.sil @@ -15,7 +15,8 @@ // IRGen test. -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck --check-prefix=IRGEN %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck --check-prefix=IRGEN %s +// RUN: %target-swift-frontend -emit-ir %s // `shell` is required only to run `sed` as a // https://github.com/apple/swift/issues/54526 workaround. diff --git a/test/AutoDiff/compiler_crashers_fixed/issue-58123-invalid-debug-info.swift b/test/AutoDiff/compiler_crashers_fixed/issue-58123-invalid-debug-info.swift index f486f6a5b5d52..05365aef82cb7 100644 --- a/test/AutoDiff/compiler_crashers_fixed/issue-58123-invalid-debug-info.swift +++ b/test/AutoDiff/compiler_crashers_fixed/issue-58123-invalid-debug-info.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -O -g %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -O -g %s | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir -O -g %s // https://github.com/apple/swift/issues/58123 // Mutating functions with control flow can cause assertion failure for diff --git a/test/ClangImporter/CoreGraphics_test.swift b/test/ClangImporter/CoreGraphics_test.swift index bc39e0a20da80..b664ef08823b2 100644 --- a/test/ClangImporter/CoreGraphics_test.swift +++ b/test/ClangImporter/CoreGraphics_test.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -module-name=cgtest -emit-ir -O %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name=cgtest -emit-ir -O %s | %FileCheck %s +// RUN: %target-swift-frontend -module-name=cgtest -emit-ir -O %s // Test some imported CG APIs import CoreGraphics diff --git a/test/ClangImporter/MixedSource/forward-declarations.swift b/test/ClangImporter/MixedSource/forward-declarations.swift index 1a8d5d9d55b01..a66328e8912a5 100644 --- a/test/ClangImporter/MixedSource/forward-declarations.swift +++ b/test/ClangImporter/MixedSource/forward-declarations.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -primary-file %s %S/Inputs/forward-declarations-other.swift -import-objc-header %S/Inputs/forward-declarations.h -enable-objc-interop -disable-objc-attr-requires-foundation-module -module-name main | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -primary-file %s %S/Inputs/forward-declarations-other.swift -import-objc-header %S/Inputs/forward-declarations.h -enable-objc-interop -disable-objc-attr-requires-foundation-module -module-name main | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir -primary-file %s %S/Inputs/forward-declarations-other.swift -import-objc-header %S/Inputs/forward-declarations.h -enable-objc-interop -disable-objc-attr-requires-foundation-module -module-name main class Sub: Base { // CHECK-LABEL: define{{.*}} void @"$s4main3SubC4testyyF" @@ -13,4 +14,4 @@ class Sub: Base { // CHECK: call void @swift_release(%swift.refcounted* {{%.+}}) // CHECK: ret void } -} \ No newline at end of file +} diff --git a/test/ClangImporter/cxx_interop_ir.swift b/test/ClangImporter/cxx_interop_ir.swift index c582b8498d4f5..6ec35610b1797 100644 --- a/test/ClangImporter/cxx_interop_ir.swift +++ b/test/ClangImporter/cxx_interop_ir.swift @@ -1,4 +1,5 @@ -// RUN: %target-swiftxx-frontend -module-name cxx_ir -I %S/Inputs/custom-modules -emit-ir -o - -primary-file %s -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swiftxx-frontend %use_no_opaque_pointers -module-name cxx_ir -I %S/Inputs/custom-modules -emit-ir -o - -primary-file %s -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swiftxx-frontend -module-name cxx_ir -I %S/Inputs/custom-modules -emit-ir -o - -primary-file %s -Xcc -fignore-exceptions // https://github.com/apple/swift/issues/55575 // We can't yet call member functions correctly on Windows. diff --git a/test/ClangImporter/enum-anon-sized.swift b/test/ClangImporter/enum-anon-sized.swift index 69a6cbc6c7eaf..a80913cef90db 100644 --- a/test/ClangImporter/enum-anon-sized.swift +++ b/test/ClangImporter/enum-anon-sized.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s -enable-objc-interop -import-objc-header %S/Inputs/enum-anon.h | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-%target-runtime %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s -enable-objc-interop -import-objc-header %S/Inputs/enum-anon.h | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-%target-runtime %s +// RUN: %target-swift-frontend -emit-ir %s -enable-objc-interop -import-objc-header %S/Inputs/enum-anon.h func verifyIsInt(_: inout Int) { } func verifyIsInt32(_: inout Int32) { } diff --git a/test/ClangImporter/objc_ir.swift b/test/ClangImporter/objc_ir.swift index 58a9014ac6eed..bbcb3ed584cf6 100644 --- a/test/ClangImporter/objc_ir.swift +++ b/test/ClangImporter/objc_ir.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %build-clang-importer-objc-overlays -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -module-name objc_ir -I %S/Inputs/custom-modules -emit-ir -g -o - -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) %use_no_opaque_pointers -module-name objc_ir -I %S/Inputs/custom-modules -emit-ir -g -o - -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource -I %t) -module-name objc_ir -I %S/Inputs/custom-modules -emit-ir -g -o - -primary-file %s // REQUIRES: objc_interop // REQUIRES: OS=macosx diff --git a/test/Concurrency/Backdeploy/mangling.swift b/test/Concurrency/Backdeploy/mangling.swift index 028b70d3aa64b..23d44840e19c2 100644 --- a/test/Concurrency/Backdeploy/mangling.swift +++ b/test/Concurrency/Backdeploy/mangling.swift @@ -1,7 +1,9 @@ // RUN: %empty-directory(%t) -// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir -o %t/new.ir +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir -o %t/new.ir +// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir // RUN: %FileCheck %s --check-prefix=NEW < %t/new.ir -// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -o %t/old.ir -disable-availability-checking +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -o %t/old.ir -disable-availability-checking +// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -disable-availability-checking // RUN: %FileCheck %s --check-prefix=OLD < %t/old.ir // Check that we add extra type metadata accessors for new kinds of functions diff --git a/test/Concurrency/Backdeploy/weak_linking.swift b/test/Concurrency/Backdeploy/weak_linking.swift index 886668036bd8c..d408d359cc0b3 100644 --- a/test/Concurrency/Backdeploy/weak_linking.swift +++ b/test/Concurrency/Backdeploy/weak_linking.swift @@ -1,15 +1,19 @@ // RUN: %empty-directory(%t) -// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx13.0 -module-name main -emit-ir -o %t/new.ir +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -target %target-cpu-apple-macosx13.0 -module-name main -emit-ir -o %t/new.ir +// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx13.0 -module-name main -emit-ir // RUN: %FileCheck %s --check-prefix=NEW < %t/new.ir -// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir -o %t/backdeploy_56.ir +// RUN: %target-swift-frontend %s %use_no_opaque_pointers -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir -o %t/backdeploy_56.ir +// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx12.0 -module-name main -emit-ir // RUN: %FileCheck %s --check-prefix=BACKDEPLOY56 < %t/backdeploy_56.ir -// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -o %t/backdeployed_concurrency.ir -disable-availability-checking +// RUN: %target-swift-frontend %s %use_no_opaque_pointers -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -o %t/backdeployed_concurrency.ir -disable-availability-checking +// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -module-name main -emit-ir -disable-availability-checking // RUN: %FileCheck %s --check-prefixes=BACKDEPLOY_CONCURRENCY,BACKDEPLOY56 < %t/backdeployed_concurrency.ir -// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -O -module-name main -emit-ir -o %t/optimized.ir -disable-availability-checking +// RUN: %target-swift-frontend %s %use_no_opaque_pointers -target %target-cpu-apple-macosx10.15 -O -module-name main -emit-ir -o %t/optimized.ir -disable-availability-checking +// RUN: %target-swift-frontend %s -target %target-cpu-apple-macosx10.15 -O -module-name main -emit-ir -disable-availability-checking // RUN: %FileCheck %s --check-prefix=OPTIMIZED < %t/optimized.ir diff --git a/test/DebugInfo/EagerTypeMetadata.swift b/test/DebugInfo/EagerTypeMetadata.swift index bf76fb441ff7f..d25d87b8f4918 100644 --- a/test/DebugInfo/EagerTypeMetadata.swift +++ b/test/DebugInfo/EagerTypeMetadata.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -Onone -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -Onone -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -Onone -emit-ir -g -o - public class C { diff --git a/test/DebugInfo/LoadableByAddress-allockstack.swift b/test/DebugInfo/LoadableByAddress-allockstack.swift index a4028d76a6da4..d602aaf052547 100644 --- a/test/DebugInfo/LoadableByAddress-allockstack.swift +++ b/test/DebugInfo/LoadableByAddress-allockstack.swift @@ -1,10 +1,14 @@ // Check we don't crash when verifying debug info. // Ideally this should print the output after loadable by address runs // but there's no way of doing this in SIL (for IRGen passes). -// RUN: %target-swift-frontend -emit-sil %s -Onone \ +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-sil %s -Onone \ // RUN: -sil-verify-all -Xllvm -verify-di-holes -emit-ir \ // RUN: -Xllvm -sil-print-debuginfo -g -o - | %FileCheck %s +// RUN: %target-swift-frontend -emit-sil %s -Onone \ +// RUN: -sil-verify-all -Xllvm -verify-di-holes -emit-ir \ +// RUN: -Xllvm -sil-print-debuginfo -g -o - + struct m { let major: Int let minor: Int diff --git a/test/DebugInfo/LoadableByAddress.swift b/test/DebugInfo/LoadableByAddress.swift index 34697d63e5305..41270fd402cb9 100644 --- a/test/DebugInfo/LoadableByAddress.swift +++ b/test/DebugInfo/LoadableByAddress.swift @@ -1,4 +1,6 @@ -// RUN: %target-swift-frontend %s -module-name A -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -module-name A -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -module-name A -emit-ir -g -o - + // REQUIRES: CPU=x86_64 public struct Continuation { private let magicToken = "Hello World" diff --git a/test/DebugInfo/ProtocolContainer.swift b/test/DebugInfo/ProtocolContainer.swift index ee18113c5d9c7..5ef5ee54ad894 100644 --- a/test/DebugInfo/ProtocolContainer.swift +++ b/test/DebugInfo/ProtocolContainer.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - func markUsed(_ t: T) {} diff --git a/test/DebugInfo/WeakCapture.swift b/test/DebugInfo/WeakCapture.swift index 73c9c260c2625..1a6581c38c29a 100644 --- a/test/DebugInfo/WeakCapture.swift +++ b/test/DebugInfo/WeakCapture.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - class A { init(handler: (() -> ())) { } } diff --git a/test/DebugInfo/any.swift b/test/DebugInfo/any.swift index d5616e867c976..fb04492286e9a 100644 --- a/test/DebugInfo/any.swift +++ b/test/DebugInfo/any.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - func markUsed(_ t: T) {} diff --git a/test/DebugInfo/async-args.swift b/test/DebugInfo/async-args.swift index 3c5fe9ae815e6..5e98671f4bc77 100644 --- a/test/DebugInfo/async-args.swift +++ b/test/DebugInfo/async-args.swift @@ -1,6 +1,11 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - \ +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - \ // RUN: -module-name M -disable-availability-checking \ // RUN: -parse-as-library | %FileCheck %s + +// RUN: %target-swift-frontend %s -emit-ir -g -o - \ +// RUN: -module-name M -disable-availability-checking \ +// RUN: -parse-as-library + // REQUIRES: concurrency func use(_ t: T) {} diff --git a/test/DebugInfo/async-let-await.swift b/test/DebugInfo/async-let-await.swift index 5c71c22a4a7d4..fd408e439fb46 100644 --- a/test/DebugInfo/async-let-await.swift +++ b/test/DebugInfo/async-let-await.swift @@ -1,6 +1,11 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - \ +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - \ // RUN: -module-name M -disable-availability-checking \ // RUN: -parse-as-library | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize + +// RUN: %target-swift-frontend %s -emit-ir -g -o - \ +// RUN: -module-name M -disable-availability-checking \ +// RUN: -parse-as-library + // REQUIRES: concurrency public func getVegetables() async -> [String] { diff --git a/test/DebugInfo/async-let.swift b/test/DebugInfo/async-let.swift index 999c9e0c28e53..4c45e8ea036b2 100644 --- a/test/DebugInfo/async-let.swift +++ b/test/DebugInfo/async-let.swift @@ -1,6 +1,11 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - \ +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - \ // RUN: -module-name M -disable-availability-checking \ // RUN: -parse-as-library | %FileCheck %s --check-prefix=CHECK + +// RUN: %target-swift-frontend %s -emit-ir -g -o - \ +// RUN: -module-name M -disable-availability-checking \ +// RUN: -parse-as-library + // REQUIRES: concurrency public actor Alice { diff --git a/test/DebugInfo/basic.swift b/test/DebugInfo/basic.swift index 08a50062c8acc..a63dee7403dd0 100644 --- a/test/DebugInfo/basic.swift +++ b/test/DebugInfo/basic.swift @@ -20,19 +20,23 @@ // CHECK-LINETABLES-NOT: DIBasicType // -------------------------------------------------------------------- // Now check that we do generate line+scope info with -g. -// RUN: %target-swift-frontend %/s -emit-ir -g -o - \ +// RUN: %target-swift-frontend %use_no_opaque_pointers %/s -emit-ir -g -o - \ // RUN: | %FileCheck %s --check-prefixes CHECK,DWARF-CHECK +// RUN: %target-swift-frontend %/s -emit-ir -g -o - // -------------------------------------------------------------------- // Currently -gdwarf-types should give the same results as -g. -// RUN: %target-swift-frontend %/s -emit-ir -gdwarf-types -o - \ +// RUN: %target-swift-frontend %use_no_opaque_pointers %/s -emit-ir -gdwarf-types -o - \ // RUN: | %FileCheck %s --check-prefixes CHECK,DWARF-CHECK +// RUN: %target-swift-frontend %/s -emit-ir -gdwarf-types -o - // -------------------------------------------------------------------- // Verify that -g -debug-info-format=dwarf gives the same results as -g. -// RUN: %target-swift-frontend %/s -emit-ir -g -debug-info-format=dwarf -o - \ +// RUN: %target-swift-frontend %use_no_opaque_pointers %/s -emit-ir -g -debug-info-format=dwarf -o - \ // RUN: | %FileCheck %s --check-prefixes CHECK,DWARF-CHECK +// RUN: %target-swift-frontend %/s -emit-ir -g -debug-info-format=dwarf -o - // -------------------------------------------------------------------- -// RUN: %target-swift-frontend %/s -emit-ir -g -debug-info-format=codeview -o - \ +// RUN: %target-swift-frontend %use_no_opaque_pointers %/s -emit-ir -g -debug-info-format=codeview -o - \ // RUN: | %FileCheck %s --check-prefixes CHECK,CV-CHECK +// RUN: %target-swift-frontend %/s -emit-ir -g -debug-info-format=codeview -o - // -------------------------------------------------------------------- // // CHECK: foo diff --git a/test/DebugInfo/byref-capture.swift b/test/DebugInfo/byref-capture.swift index 39ec979d2e458..3816a0754ed2e 100644 --- a/test/DebugInfo/byref-capture.swift +++ b/test/DebugInfo/byref-capture.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - func makeIncrementor(_ inc : Int64) -> () -> Int64 { diff --git a/test/DebugInfo/catch_let.swift b/test/DebugInfo/catch_let.swift index 5ddf8e583f724..4f260d767ebcb 100644 --- a/test/DebugInfo/catch_let.swift +++ b/test/DebugInfo/catch_let.swift @@ -1,4 +1,6 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - + enum MyError : Error { case Yikes } diff --git a/test/DebugInfo/closure-args.swift b/test/DebugInfo/closure-args.swift index b1aca0656d5b4..19c3f837031de 100644 --- a/test/DebugInfo/closure-args.swift +++ b/test/DebugInfo/closure-args.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - import Swift @@ -22,9 +23,9 @@ func main() -> Void // CHECK: store %TSS* %{{.*}}, %TSS** %[[RANDOM_STR_ADDR]], align {{(4|8)}} // CHECK-DAG: !DILocalVariable(name: "lhs",{{.*}} line: [[@LINE+5]], // CHECK-DAG: !DILocalVariable(name: "rhs",{{.*}} line: [[@LINE+4]], - // CHECK-DAG: !DILocalVariable(name: "random_string",{{.*}} line: 8, - // CHECK-DAG: !DILocalVariable(name: "random_int",{{.*}} line: 9, - // CHECK-DAG: !DILocalVariable(name: "out_only",{{.*}} line: 10, + // CHECK-DAG: !DILocalVariable(name: "random_string",{{.*}} line: 9, + // CHECK-DAG: !DILocalVariable(name: "random_int",{{.*}} line: 10, + // CHECK-DAG: !DILocalVariable(name: "out_only",{{.*}} line: 11, { (lhs : String, rhs : String) -> Bool in if rhs == random_string || rhs.unicodeScalars.count == random_int diff --git a/test/DebugInfo/dbgvalue-insertpt.swift b/test/DebugInfo/dbgvalue-insertpt.swift index 469f1223f4a93..c5afa4bfaba0b 100644 --- a/test/DebugInfo/dbgvalue-insertpt.swift +++ b/test/DebugInfo/dbgvalue-insertpt.swift @@ -1,4 +1,6 @@ -// RUN: %target-swift-frontend -g -emit-ir -Xllvm '-sil-inline-never-functions=next' %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -g -emit-ir -Xllvm '-sil-inline-never-functions=next' %s | %FileCheck %s +// RUN: %target-swift-frontend -g -emit-ir -Xllvm '-sil-inline-never-functions=next' %s + // FIXME: This test should be testing a non-shadow-copied value instead. for i in 0 ..< 3 { // CHECK: %[[ALLOCA:[0-9]+]] = alloca %TSiSg diff --git a/test/DebugInfo/debug_info_expression.sil b/test/DebugInfo/debug_info_expression.sil index fc53d4c9b3726..185b15c2297be 100644 --- a/test/DebugInfo/debug_info_expression.sil +++ b/test/DebugInfo/debug_info_expression.sil @@ -1,5 +1,6 @@ // RUN: %target-swift-frontend %s -sil-verify-all -g -emit-sil -o - | %FileCheck --check-prefix=CHECK-SIL %s -// RUN: %target-swift-frontend -disable-debugger-shadow-copies -primary-file %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-debugger-shadow-copies -primary-file %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend -disable-debugger-shadow-copies -primary-file %s -emit-ir -g -o - import Builtin import Swift @@ -28,17 +29,12 @@ bb0: // CHECK-SIL-SAME: (name "my_struct", loc "file.swift":8:9, scope {{[0-9]+}}) // CHECK-SIL-SAME type $MyStruct, expr op_deref:op_fragment:#MyStruct.x debug_value %3 : $*Builtin.Int64, var, (name "my_struct", loc "file.swift":8:9, scope 1), type $MyStruct, expr op_deref:op_fragment:#MyStruct.x, loc "file.swift":9:17, scope 1 - // CHECK: llvm.dbg.value(metadata {{.*}}* %[[FIELD_X]], metadata ![[VAR_DECL_MD]] - // CHECK-SAME: !DIExpression(DW_OP_deref, DW_OP_LLVM_fragment, 0, 64) - // CHECK-NOT: ), !dbg ![[VAR_DECL_MD]] %4 = alloc_stack $SmallStruct, var, name "small_struct", loc "file.swift":10:11, scope 1 %5 = struct_element_addr %4 : $*SmallStruct, #SmallStruct.z, loc "file.swift":11:13, scope 1 // CHECK: %[[FIELD_Z:.*]] = getelementptr {{.*}} %[[SMALL_STRUCT]] // If the fragment covers the whole struct, we're not generating the // DW_OP_LLVM_fragment part. - // CHECK: llvm.dbg.value(metadata {{.*}}* %[[FIELD_Z]], metadata ![[SMALL_VAR_DECL_MD]] - // CHECK-SAME: !DIExpression(DW_OP_deref) debug_value %5 : $*Builtin.Int64, var, (name "small_struct", loc "file.swift":10:11, scope 1), type $SmallStruct, expr op_deref:op_fragment:#SmallStruct.z, loc "file.swift":11:13, scope 1 dealloc_stack %4 : $*SmallStruct diff --git a/test/DebugInfo/debug_value_addr.swift b/test/DebugInfo/debug_value_addr.swift index bcd90ff9563ea..0152b8a4d7fb4 100644 --- a/test/DebugInfo/debug_value_addr.swift +++ b/test/DebugInfo/debug_value_addr.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - // RUN: %target-swift-frontend %s -emit-sil -g -o - | %FileCheck -check-prefix=CHECK-SIL %s // Verify that -Onone shadow copies are emitted for debug_value_addr diff --git a/test/DebugInfo/debug_variable.sil b/test/DebugInfo/debug_variable.sil index 985c9e5c3f7ef..ca2cbc7bee896 100644 --- a/test/DebugInfo/debug_variable.sil +++ b/test/DebugInfo/debug_variable.sil @@ -1,4 +1,5 @@ -// RUN: %target-swiftc_driver -g -emit-ir %s | %FileCheck %s +// RUN: %target-swiftc_driver %use_no_opaque_pointers -g -emit-ir %s | %FileCheck %s +// RUN: %target-swiftc_driver -g -emit-ir %s sil_stage canonical import Builtin diff --git a/test/DebugInfo/dynamic_layout.swift b/test/DebugInfo/dynamic_layout.swift index e509d805141b6..ff37b293b4acb 100644 --- a/test/DebugInfo/dynamic_layout.swift +++ b/test/DebugInfo/dynamic_layout.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - func markUsed(_ t: T) {} diff --git a/test/DebugInfo/generic_arg.swift b/test/DebugInfo/generic_arg.swift index 3f7dec6c730e9..f09763da4a3ec 100644 --- a/test/DebugInfo/generic_arg.swift +++ b/test/DebugInfo/generic_arg.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - import StdlibUnittest func foo(_ x: T) -> () { // CHECK: define {{.*}} @"$s11generic_arg3fooyyxlF" @@ -11,7 +12,7 @@ func foo(_ x: T) -> () { // CHECK: store %swift.type* %T, %swift.type** %[[T]], // CHECK: store %swift.opaque* %0, %swift.opaque** %[[X]], // CHECK-DAG: ![[T1]] = !DILocalVariable(name: "$\CF\84_0_0",{{.*}}flags: DIFlagArtificial) - // CHECK-DAG: ![[X1]] = !DILocalVariable(name: "x", arg: 1,{{.*}}line: 3, type: ![[LET_TY2:[0-9]+]]) + // CHECK-DAG: ![[X1]] = !DILocalVariable(name: "x", arg: 1,{{.*}}line: 4, type: ![[LET_TY2:[0-9]+]]) // CHECK-DAG: ![[LET_TY2]] = !DIDerivedType(tag: DW_TAG_const_type,{{.*}}baseType: ![[TY2:[0-9]+]]) // CHECK-DAG: ![[TY2]] = !DICompositeType({{.*}}name: "$sxD" _blackHole(x) diff --git a/test/DebugInfo/generic_arg2.swift b/test/DebugInfo/generic_arg2.swift index c2e4c743f81d4..43d72a5b96da8 100644 --- a/test/DebugInfo/generic_arg2.swift +++ b/test/DebugInfo/generic_arg2.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - // CHECK: define hidden swiftcc void @"$s12generic_arg25ClassC3foo{{.*}}, %swift.type* %U // CHECK: call void @llvm.dbg.declare(metadata %swift.opaque** %y.debug, metadata ![[U:.*]], metadata !DIExpression(DW_OP_deref)) diff --git a/test/DebugInfo/generic_arg3.swift b/test/DebugInfo/generic_arg3.swift index 2ef63ae4b8c3f..93b5bc85d2d68 100644 --- a/test/DebugInfo/generic_arg3.swift +++ b/test/DebugInfo/generic_arg3.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - func apply(_ T : Type, fn: (Type) -> Type) -> Type { return fn(T) } diff --git a/test/DebugInfo/generic_arg4.swift b/test/DebugInfo/generic_arg4.swift index bae202a8dd020..fe2f1158631ec 100644 --- a/test/DebugInfo/generic_arg4.swift +++ b/test/DebugInfo/generic_arg4.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - // REQUIRES: objc_interop public struct Q { let x: T diff --git a/test/DebugInfo/generic_arg5.swift b/test/DebugInfo/generic_arg5.swift index 86e2d058078eb..80538d9d234ef 100644 --- a/test/DebugInfo/generic_arg5.swift +++ b/test/DebugInfo/generic_arg5.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - public struct S { let value : Type diff --git a/test/DebugInfo/generic_enum_closure.swift b/test/DebugInfo/generic_enum_closure.swift index 4e5478f73b76a..c99a01cd5e9a5 100644 --- a/test/DebugInfo/generic_enum_closure.swift +++ b/test/DebugInfo/generic_enum_closure.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - struct __CurrentErrno {} struct CErrorOr diff --git a/test/DebugInfo/guard-let.swift b/test/DebugInfo/guard-let.swift index 247e4b03f96d5..aca098d4b0e4c 100644 --- a/test/DebugInfo/guard-let.swift +++ b/test/DebugInfo/guard-let.swift @@ -1,9 +1,10 @@ -// RUN: %target-swift-frontend %s -c -emit-ir -g -o - | \ +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -c -emit-ir -g -o - | \ // RUN: %FileCheck %s --check-prefix=CHECK1 -// RUN: %target-swift-frontend %s -c -emit-ir -g -o - | \ +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -c -emit-ir -g -o - | \ // RUN: %FileCheck %s --check-prefix=CHECK2 -// RUN: %target-swift-frontend %s -c -emit-ir -g -o - | \ +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -c -emit-ir -g -o - | \ // RUN: %FileCheck %s --check-prefix=CHECK3 +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -c -emit-ir -g -o - // UNSUPPORTED: OS=watchos diff --git a/test/DebugInfo/initializer.swift b/test/DebugInfo/initializer.swift index 70c3ed4f98e97..4c0457f5ae4d0 100644 --- a/test/DebugInfo/initializer.swift +++ b/test/DebugInfo/initializer.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -import-objc-header %S/Inputs/serialized-objc-header.h -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -import-objc-header %S/Inputs/serialized-objc-header.h -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -import-objc-header %S/Inputs/serialized-objc-header.h -emit-ir -g -o - // REQUIRES: objc_interop diff --git a/test/DebugInfo/inlined-generics-basic.swift b/test/DebugInfo/inlined-generics-basic.swift index 1ac19baa911d6..a396583521239 100644 --- a/test/DebugInfo/inlined-generics-basic.swift +++ b/test/DebugInfo/inlined-generics-basic.swift @@ -3,7 +3,7 @@ // RUN: -Xllvm -sil-print-debuginfo %s -g -O -o - -emit-sil \ // RUN: | %FileCheck %s --check-prefix=SIL // IR. -// RUN: %target-swift-frontend -parse-as-library -module-name A \ +// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-as-library -module-name A \ // RUN: %s -g -O -o - -emit-ir \ // RUN: | %FileCheck %s --check-prefix=IR @@ -44,15 +44,18 @@ public class C { // SIL-LABEL: // C.f(_:) // IR-LABEL: define {{.*}} @"$s1A1CC1fyyqd__lF" + // IR-SAME: nocapture %[[ARG_0:.*]], {{.*}} %[[ARG_S:.*]], #sourceLocation(file: "f.swift", line: 1) public func f(_ s: S) { // SIL: debug_value %0 : $*S, let, name "s", argno 1, expr op_deref, {{.*}} scope [[F]] // SIL: function_ref {{.*}}yes{{.*}} scope [[F1G1]] // SIL: function_ref {{.*}}use{{.*}} scope [[F1G3H]] - // IR: dbg.value(metadata %swift.type* %S, metadata ![[MD_1_0:[0-9]+]] - // IR: dbg.value(metadata %swift.opaque* %0, metadata ![[S:[0-9]+]] - // IR: dbg.value(metadata %swift.opaque* %0, metadata ![[GS_T:[0-9]+]] - // IR: dbg.value(metadata %swift.opaque* %0, metadata ![[GS_U:[0-9]+]] + // IR: dbg.value(metadata %swift.type* %[[ARG_S]], metadata ![[MD_1_0:[0-9]+]] + // IR: %[[RS_PAIR:.*]] = alloca i8, i64 % + // IR: dbg.declare({{.*}} %[[RS_PAIR]], metadata ![[GRS_T:[0-9]+]], + // IR: dbg.value(metadata %swift.opaque* %[[ARG_0]], metadata ![[S:[0-9]+]] + // IR: dbg.value(metadata %swift.opaque* %[[ARG_0]], metadata ![[GS_T:[0-9]+]] + // IR: dbg.value(metadata %swift.opaque* %[[ARG_0]], metadata ![[GS_U:[0-9]+]] // IR: call {{.*}}3use #sourceLocation(file: "f.swift", line: 2) g(s) @@ -67,21 +70,19 @@ public class C { // IR: call {{.*}}3use #sourceLocation(file: "f.swift", line: 3) g(r) - // IR: dbg.value({{.*}}, metadata ![[GRS_T:[0-9]+]] - // IR: dbg.value({{.*}}, metadata ![[GRS_U:[0-9]+]] // IR: call {{.*}}3use #sourceLocation(file: "f.swift", line: 4) g((r, s)) // Note to maintainers: the relative order of the constant dbg.values here // seem to flip back and forth. - // IR: dbg.value({{.*}}, metadata ![[GI_U:[0-9]+]] - // IR: dbg.value({{.*}}, metadata ![[GI_T:[0-9]+]] - // IR: call {{.*}}3use + // IR: dbg.value(metadata i64 0, metadata ![[GI_U:[0-9]+]] + // IR: dbg.value(metadata i64 0, metadata ![[GI_T:[0-9]+]] + // IR: call {{.*}}3use{{.*}}(i64 0) #sourceLocation(file: "f.swift", line: 5) g(Int(0)) - // IR: dbg.value({{.*}}, metadata ![[GB_U:[0-9]+]] - // IR: dbg.value({{.*}}, metadata ![[GB_T:[0-9]+]] - // IR: call {{.*}}3use + // IR: dbg.value(metadata i1 false, metadata ![[GB_U:[0-9]+]] + // IR: dbg.value(metadata i1 false, metadata ![[GB_T:[0-9]+]] + // IR: call {{.*}}3use{{.*}}(i1 false) #sourceLocation(file: "f.swift", line: 6) g(false) } @@ -97,6 +98,10 @@ public class C { // IR-DAG: ![[LET_TAU_0_0:[0-9]+]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: ![[TAU_0_0]]) // IR-DAG: ![[TAU_1_0:[0-9]+]] = {{.*}}DW_TAG_structure_type, name: "$sqd__D", file // IR-DAG: ![[MD_1_0]] = !DILocalVariable(name: "$\CF\84_1_0" +// IR-DAG: ![[GRS_T]] = !DILocalVariable(name: "t", {{.*}} scope: ![[SP_GRS_T:[0-9]+]], {{.*}}type: ![[LET_TUPLE:[0-9]+]] +// IR-DAG: ![[SP_GRS_T]] = {{.*}}linkageName: "$s1A1gyyxlFx_qd__t_Ti5" +// IR-DAG: ![[LET_TUPLE]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: ![[TUPLE:[0-9]+]]) +// IR-DAG: ![[TUPLE]] = {{.*}}DW_TAG_structure_type, name: "$sx_qd__tD" // IR-DAG: ![[S]] = !DILocalVariable(name: "s", {{.*}} type: ![[LET_TAU_1_0:[0-9]+]] // IR-DAG: ![[LET_TAU_1_0]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: ![[TAU_1_0]]) // IR-DAG: ![[GS_T]] = !DILocalVariable(name: "t", {{.*}} scope: ![[SP_GS_T:[0-9]+]], {{.*}} type: ![[LET_TAU_1_0]]) @@ -111,12 +116,6 @@ public class C { // IR: ![[GR_U]] = !DILocalVariable(name: "u", {{.*}} scope: ![[SP_GR_U:[0-9]+]], {{.*}}type: ![[LET_TAU_0_0]]) // IR: ![[SP_GR_U]] = {{.*}}linkageName: "$s1A1hyyxlF" -// IR: ![[GRS_T]] = !DILocalVariable(name: "t", {{.*}} scope: ![[SP_GRS_T:[0-9]+]], {{.*}}type: ![[LET_TUPLE:[0-9]+]] -// IR: ![[SP_GRS_T]] = {{.*}}linkageName: "$s1A1gyyxlFx_qd__t_Ti5" -// IR: ![[LET_TUPLE]] = !DIDerivedType(tag: DW_TAG_const_type, baseType: ![[TUPLE:[0-9]+]]) -// IR: ![[TUPLE]] = {{.*}}DW_TAG_structure_type, name: "$sx_qd__tD" -// IR: ![[GRS_U]] = !DILocalVariable(name: "u", {{.*}} scope: ![[SP_GRS_U:[0-9]+]], {{.*}}type: ![[LET_TUPLE]] -// IR: ![[SP_GRS_U]] = {{.*}}linkageName: "$s1A1hyyxlFx_qd__t_Ti5" // IR-DAG: ![[GI_T]] = !DILocalVariable(name: "t", {{.*}} scope: ![[SP_GI_G:[0-9]+]], {{.*}}type: ![[LET_INT]]) // IR-DAG: ![[SP_GI_G]] = {{.*}}linkageName: "$s1A1gyyxlFSi_Tg5" // IR-DAG: ![[GI_U]] = !DILocalVariable(name: "u", {{.*}} scope: ![[SP_GI_U:[0-9]+]], {{.*}}type: ![[LET_INT]]) diff --git a/test/DebugInfo/inlined-generics.swift b/test/DebugInfo/inlined-generics.swift index 62041a9169c46..bacb5b7dac860 100644 --- a/test/DebugInfo/inlined-generics.swift +++ b/test/DebugInfo/inlined-generics.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -Xllvm -sil-inline-generics=true %s -O -g -o - -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -Xllvm -sil-inline-generics=true %s -O -g -o - -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -Xllvm -sil-inline-generics=true %s -O -g -o - -emit-ir public protocol P { associatedtype DT1 func getDT() -> DT1 diff --git a/test/DebugInfo/inout.swift b/test/DebugInfo/inout.swift index 2a92bbeedd353..e75cf70a98b33 100644 --- a/test/DebugInfo/inout.swift +++ b/test/DebugInfo/inout.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -module-name inout -o %t.ll +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -module-name inout -o %t.ll +// RUN: %target-swift-frontend %s -emit-ir -g -module-name inout // RUN: cat %t.ll | %FileCheck %s // RUN: cat %t.ll | %FileCheck %s --check-prefix=PROMO-CHECK // RUN: cat %t.ll | %FileCheck %s --check-prefix=FOO-CHECK diff --git a/test/DebugInfo/iuo_arg.swift b/test/DebugInfo/iuo_arg.swift index f4ec4a3019906..8b6518646caee 100644 --- a/test/DebugInfo/iuo_arg.swift +++ b/test/DebugInfo/iuo_arg.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - class CGImageRef {} class UIImage { diff --git a/test/DebugInfo/let.swift b/test/DebugInfo/let.swift index 6472f56596fb6..cb99ad707d97c 100644 --- a/test/DebugInfo/let.swift +++ b/test/DebugInfo/let.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - class DeepThought { func query() -> Int64 { return 42 } diff --git a/test/DebugInfo/linetable-cleanups.swift b/test/DebugInfo/linetable-cleanups.swift index 25e343f2c5694..eafe989923982 100644 --- a/test/DebugInfo/linetable-cleanups.swift +++ b/test/DebugInfo/linetable-cleanups.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - // TODO: check why this is failing on linux // REQUIRES: OS=macosx diff --git a/test/DebugInfo/linetable-codeview.swift b/test/DebugInfo/linetable-codeview.swift index f4020f37a6a36..c3ba2aaf56650 100644 --- a/test/DebugInfo/linetable-codeview.swift +++ b/test/DebugInfo/linetable-codeview.swift @@ -1,4 +1,4 @@ -// RUN: %swiftc_driver %s -g -debug-info-format=codeview -emit-ir -o - | %FileCheck %s +// RUN: %swiftc_driver %use_no_opaque_pointers %s -g -debug-info-format=codeview -emit-ir -o - | %FileCheck %s // REQUIRES: optimized_stdlib func markUsed(_ t: T) {} diff --git a/test/DebugInfo/linetable.swift b/test/DebugInfo/linetable.swift index d866b8b75200d..20d3d8337e6c5 100644 --- a/test/DebugInfo/linetable.swift +++ b/test/DebugInfo/linetable.swift @@ -1,4 +1,4 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s %use_no_opaque_pointers -emit-ir -g -o - | %FileCheck %s // RUN: %target-swift-frontend %s -S -g -o - | %FileCheck %s --check-prefix ASM-CHECK // REQUIRES: CPU=i386 || CPU=x86_64 diff --git a/test/DebugInfo/move_function_dbginfo.swift b/test/DebugInfo/move_function_dbginfo.swift index 5d87bfc3d3ba4..38a7a88fcca72 100644 --- a/test/DebugInfo/move_function_dbginfo.swift +++ b/test/DebugInfo/move_function_dbginfo.swift @@ -1,6 +1,6 @@ // RUN: %empty-directory(%t) -// RUN: %target-swift-frontend -parse-as-library -g -emit-ir -o - %s | %FileCheck %s -// RUN: %target-swift-frontend -parse-as-library -g -c %s -o %t/out.o +// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-as-library -g -emit-ir -o - %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-as-library -g -c %s -o %t/out.o // RUN: %llvm-dwarfdump --show-children %t/out.o | %FileCheck -check-prefix=DWARF %s // This test checks that: diff --git a/test/DebugInfo/move_function_dbginfo_async.swift b/test/DebugInfo/move_function_dbginfo_async.swift index d31991e822c19..03185937b7e18 100644 --- a/test/DebugInfo/move_function_dbginfo_async.swift +++ b/test/DebugInfo/move_function_dbginfo_async.swift @@ -1,6 +1,6 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -parse-as-library -disable-availability-checking -g -emit-sil -o - %s | %FileCheck -check-prefix=SIL %s -// RUN: %target-swift-frontend -parse-as-library -disable-availability-checking -g -emit-ir -o - %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-as-library -disable-availability-checking -g -emit-ir -o - %s | %FileCheck %s // RUN: %target-swift-frontend -parse-as-library -disable-availability-checking -g -c %s -o %t/out.o // This test checks that: diff --git a/test/DebugInfo/nostorage.swift b/test/DebugInfo/nostorage.swift index 76c12220bb4d0..21267c6de1421 100644 --- a/test/DebugInfo/nostorage.swift +++ b/test/DebugInfo/nostorage.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o %t +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o %t +// RUN: %target-swift-frontend %s -emit-ir -g // RUN: cat %t | %FileCheck %s --check-prefix=CHECK1 // RUN: cat %t | %FileCheck %s --check-prefix=CHECK2 // RUN: cat %t | %FileCheck %s --check-prefix=CHECK3 diff --git a/test/DebugInfo/protocol-extension.swift b/test/DebugInfo/protocol-extension.swift index e5cc937f9f393..30788b2354444 100644 --- a/test/DebugInfo/protocol-extension.swift +++ b/test/DebugInfo/protocol-extension.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - public protocol P { var v : Int32 { get }; diff --git a/test/DebugInfo/protocolarg.swift b/test/DebugInfo/protocolarg.swift index ad995ac48f731..3dcaf60722808 100644 --- a/test/DebugInfo/protocolarg.swift +++ b/test/DebugInfo/protocolarg.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - func markUsed(_ t: T) {} func use(_ t: inout T) {} diff --git a/test/DebugInfo/resilient_debug_value.sil b/test/DebugInfo/resilient_debug_value.sil index 22ea9bfafb76f..25e44b6834aa3 100644 --- a/test/DebugInfo/resilient_debug_value.sil +++ b/test/DebugInfo/resilient_debug_value.sil @@ -5,7 +5,8 @@ // RUN: -emit-module-path=%t/resilient_struct.swiftmodule \ // RUN: -module-name=resilient_struct %S/../Inputs/resilient_struct.swift // -// RUN: %target-swift-frontend -g -I %t -emit-ir %s -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -g -I %t -emit-ir %s -o - | %FileCheck %s +// RUN: %target-swift-frontend -g -I %t -emit-ir %s -o - // REQUIRES: CPU=arm64 || CPU=x86_64 diff --git a/test/DebugInfo/return.swift b/test/DebugInfo/return.swift index e30afccfa69d1..65ac0407e357d 100644 --- a/test/DebugInfo/return.swift +++ b/test/DebugInfo/return.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -g -emit-ir -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -g -emit-ir -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -g -emit-ir -o - class X { init (i : Int64) { x = i } diff --git a/test/DebugInfo/self.swift b/test/DebugInfo/self.swift index 9439dda2516c6..e46c369ef1fa4 100644 --- a/test/DebugInfo/self.swift +++ b/test/DebugInfo/self.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - public struct stuffStruct { var a: Int64 = 6 diff --git a/test/DebugInfo/shadow_copies.swift b/test/DebugInfo/shadow_copies.swift index e38001ed34479..4d3a7af891fa8 100644 --- a/test/DebugInfo/shadow_copies.swift +++ b/test/DebugInfo/shadow_copies.swift @@ -1,6 +1,9 @@ -// RUN: %target-swift-frontend %s -Onone -emit-ir -g -o - | %FileCheck %s -// RUN: %target-swift-frontend %s -Onone -emit-ir -g -o - \ +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -Onone -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -Onone -emit-ir -g -o - +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -Onone -emit-ir -g -o - \ // RUN: -disable-debugger-shadow-copies | %FileCheck %s --check-prefix=NOCOPY +// RUN: %target-swift-frontend %s -Onone -emit-ir -g -o - \ +// RUN: -disable-debugger-shadow-copies class ClassA { var x : Int64 diff --git a/test/DebugInfo/shadowcopy-linetable.swift b/test/DebugInfo/shadowcopy-linetable.swift index 3b340082354e8..521ebf7ee043c 100644 --- a/test/DebugInfo/shadowcopy-linetable.swift +++ b/test/DebugInfo/shadowcopy-linetable.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - func markUsed(_ t: T) {} diff --git a/test/DebugInfo/sil_combine.sil b/test/DebugInfo/sil_combine.sil index 4f555bd0d04b4..a8ede98677bf3 100644 --- a/test/DebugInfo/sil_combine.sil +++ b/test/DebugInfo/sil_combine.sil @@ -1,5 +1,6 @@ // RUN: %target-sil-opt -sil-verify-all -sil-combine %s | %FileCheck %s -// RUN: %target-swift-frontend -g -O -emit-ir -primary-file %s | %FileCheck --check-prefix=CHECK-IR %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -g -O -emit-ir -primary-file %s | %FileCheck --check-prefix=CHECK-IR %s +// RUN: %target-swift-frontend -g -O -emit-ir -primary-file %s sil_stage canonical diff --git a/test/DebugInfo/struct_resilience.swift b/test/DebugInfo/struct_resilience.swift index 237d962a21883..96cdbddf1b3d5 100644 --- a/test/DebugInfo/struct_resilience.swift +++ b/test/DebugInfo/struct_resilience.swift @@ -6,8 +6,10 @@ // RUN: -emit-module-path=%t/resilient_struct.swiftmodule \ // RUN: -module-name=resilient_struct %S/../Inputs/resilient_struct.swift // -// RUN: %target-swift-frontend -g -I %t -emit-ir -enable-library-evolution %s \ +// RUN: %target-swift-frontend %use_no_opaque_pointers -g -I %t -emit-ir -enable-library-evolution %s \ // RUN: -o - | %FileCheck %s +// RUN: %target-swift-frontend -g -I %t -emit-ir -enable-library-evolution %s \ +// RUN: -o - // import resilient_struct diff --git a/test/DebugInfo/structs.swift b/test/DebugInfo/structs.swift index f280172c856b1..00321ff86397a 100644 --- a/test/DebugInfo/structs.swift +++ b/test/DebugInfo/structs.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - // Capture the pointer size from type Int // CHECK: %TSi = type <{ i[[PTRSIZE:[0-9]+]] }> diff --git a/test/DebugInfo/subscript.swift b/test/DebugInfo/subscript.swift new file mode 100644 index 0000000000000..7b1d944ab3f3a --- /dev/null +++ b/test/DebugInfo/subscript.swift @@ -0,0 +1,14 @@ +// RUN: %target-swift-frontend %s -Onone -emit-ir -g -o - -parse-as-library -module-name a | %FileCheck %s +public protocol P {} +public class C : P {} +public struct S {} +public extension S { + subscript(_ val: T, _ type : T.Type = T.self) -> T? { return nil } +} + +public func f() { + S()[0] +} +// CHECK: !DISubprogram(name: "deinit" +// CHECK: !DISubprogram(name: "init" +// CHECK: !DISubprogram(name: "subscript diff --git a/test/DebugInfo/typearg.swift b/test/DebugInfo/typearg.swift index 44fff48570b82..4e471cb51ffbd 100644 --- a/test/DebugInfo/typearg.swift +++ b/test/DebugInfo/typearg.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - protocol AProtocol { func f() -> String diff --git a/test/DebugInfo/uninitialized.swift b/test/DebugInfo/uninitialized.swift index ae4f34bacf34e..55e828153f7b0 100644 --- a/test/DebugInfo/uninitialized.swift +++ b/test/DebugInfo/uninitialized.swift @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend %s -c -emit-ir -g -o - | %FileCheck %s -// RUN: %target-swift-frontend %s -O -c -emit-ir -g -o - | %FileCheck %s --check-prefix=OPT +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -c -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -c -emit-ir -g -o - +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -O -c -emit-ir -g -o - | %FileCheck %s --check-prefix=OPT +// RUN: %target-swift-frontend %s -O -c -emit-ir -g -o - class MyClass {} // CHECK-LABEL: define {{.*}} @"$s13uninitialized1fyyF" diff --git a/test/DebugInfo/variadic-generics-count.swift b/test/DebugInfo/variadic-generics-count.swift index 55d58124476b7..0f4cb79db204b 100644 --- a/test/DebugInfo/variadic-generics-count.swift +++ b/test/DebugInfo/variadic-generics-count.swift @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -emit-ir %s -g -o - \ +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s -g -o - \ // RUN: -parse-as-library -module-name a -disable-availability-checking | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s -g -o - \ +// RUN: -parse-as-library -module-name a -disable-availability-checking public func f1(ts: repeat each T) { // CHECK: define {{.*}} @"$s1a2f12tsyxxQp_tRvzlF"(%swift.opaque** {{.*}}, i{{32|64}} [[COUNT1_1:.*]], %swift.type** {{.*}}) diff --git a/test/DebugInfo/variadic-generics.swift b/test/DebugInfo/variadic-generics.swift index b56b811047ce9..ba4b3c3325e36 100644 --- a/test/DebugInfo/variadic-generics.swift +++ b/test/DebugInfo/variadic-generics.swift @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -emit-ir %s -g -o - \ +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s -g -o - \ // RUN: -parse-as-library -module-name a | %IRGenFileCheck %s +// RUN: %target-swift-frontend -emit-ir %s -g -o - \ +// RUN: -parse-as-library -module-name a public func foo(args: repeat each T) { // CHECK: define {{.*}} @"$s1a3foo4argsyxxQp_tRvzlF" diff --git a/test/DebugInfo/weak-self-capture.swift b/test/DebugInfo/weak-self-capture.swift index 0d4931e600e47..6c5235eb5b875 100644 --- a/test/DebugInfo/weak-self-capture.swift +++ b/test/DebugInfo/weak-self-capture.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -g -o - | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - public class ClosureMaker { var a : Int diff --git a/test/Distributed/distributed_actor_accessor_section_elf.swift b/test/Distributed/distributed_actor_accessor_section_elf.swift index 47a624b2cde62..46f466812e1da 100644 --- a/test/Distributed/distributed_actor_accessor_section_elf.swift +++ b/test/Distributed/distributed_actor_accessor_section_elf.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend-emit-module -emit-module-path %t/FakeDistributedActorSystems.swiftmodule -module-name FakeDistributedActorSystems -disable-availability-checking %S/Inputs/FakeDistributedActorSystems.swift -// RUN: %target-swift-frontend -emit-irgen -module-name distributed_actor_accessors -disable-availability-checking -I %t 2>&1 %s | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-irgen -module-name distributed_actor_accessors -disable-availability-checking -I %t 2>&1 %s | %IRGenFileCheck %s +// RUN: %target-swift-frontend -emit-irgen -module-name distributed_actor_accessors -disable-availability-checking -I %t 2>&1 %s // UNSUPPORTED: back_deploy_concurrency // REQUIRES: concurrency diff --git a/test/Distributed/distributed_actor_accessor_section_macho.swift b/test/Distributed/distributed_actor_accessor_section_macho.swift index 5dffb0a56ebad..69e900629cb36 100644 --- a/test/Distributed/distributed_actor_accessor_section_macho.swift +++ b/test/Distributed/distributed_actor_accessor_section_macho.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend-emit-module -emit-module-path %t/FakeDistributedActorSystems.swiftmodule -module-name FakeDistributedActorSystems -disable-availability-checking %S/Inputs/FakeDistributedActorSystems.swift -// RUN: %target-swift-frontend -emit-irgen -module-name distributed_actor_accessors -disable-availability-checking -I %t 2>&1 %s | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-irgen -module-name distributed_actor_accessors -disable-availability-checking -I %t 2>&1 %s | %IRGenFileCheck %s +// RUN: %target-swift-frontend -emit-irgen -module-name distributed_actor_accessors -disable-availability-checking -I %t 2>&1 %s // UNSUPPORTED: back_deploy_concurrency // REQUIRES: concurrency diff --git a/test/Distributed/distributed_actor_accessor_thunks_64bit.swift b/test/Distributed/distributed_actor_accessor_thunks_64bit.swift index 86b153d43a6b0..0c1eb255c859d 100644 --- a/test/Distributed/distributed_actor_accessor_thunks_64bit.swift +++ b/test/Distributed/distributed_actor_accessor_thunks_64bit.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend-emit-module -emit-module-path %t/FakeDistributedActorSystems.swiftmodule -module-name FakeDistributedActorSystems -disable-availability-checking %S/Inputs/FakeDistributedActorSystems.swift -// RUN: %target-swift-frontend -module-name distributed_actor_accessors -emit-irgen -disable-availability-checking -I %t 2>&1 %s | %IRGenFileCheck %s -check-prefix CHECK-%target-import-type +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name distributed_actor_accessors -emit-irgen -disable-availability-checking -I %t 2>&1 %s | %IRGenFileCheck %s -check-prefix CHECK-%target-import-type +// RUN: %target-swift-frontend -module-name distributed_actor_accessors -emit-irgen -disable-availability-checking -I %t 2>&1 %s // UNSUPPORTED: back_deploy_concurrency // REQUIRES: concurrency diff --git a/test/Distributed/distributed_actor_layout.swift b/test/Distributed/distributed_actor_layout.swift index c3e012727bd3d..0da08829e79cc 100644 --- a/test/Distributed/distributed_actor_layout.swift +++ b/test/Distributed/distributed_actor_layout.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend-emit-module -emit-module-path %t/FakeDistributedActorSystems.swiftmodule -module-name FakeDistributedActorSystems -disable-availability-checking %S/Inputs/FakeDistributedActorSystems.swift -// RUN: %target-swift-frontend -emit-irgen -module-name distributed_actor_accessors -disable-availability-checking -I %t 2>&1 %s | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-irgen -module-name distributed_actor_accessors -disable-availability-checking -I %t 2>&1 %s | %IRGenFileCheck %s +// RUN: %target-swift-frontend -emit-irgen -module-name distributed_actor_accessors -disable-availability-checking -I %t 2>&1 %s // UNSUPPORTED: back_deploy_concurrency // REQUIRES: concurrency diff --git a/test/Distributed/distributed_actor_thunk_doesnt_leak_class_arguments.swift b/test/Distributed/distributed_actor_thunk_doesnt_leak_class_arguments.swift index 8e4dbfc8f2c3b..f391af153bd6d 100644 --- a/test/Distributed/distributed_actor_thunk_doesnt_leak_class_arguments.swift +++ b/test/Distributed/distributed_actor_thunk_doesnt_leak_class_arguments.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend-emit-module -emit-module-path %t/FakeDistributedActorSystems.swiftmodule -module-name FakeDistributedActorSystems -disable-availability-checking %S/Inputs/FakeDistributedActorSystems.swift -// RUN: %target-swift-frontend -module-name no_to_arg_leaks -emit-irgen -disable-availability-checking -I %t 2>&1 %s | %IRGenFileCheck %s -check-prefix CHECK-%target-import-type +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name no_to_arg_leaks -emit-irgen -disable-availability-checking -I %t 2>&1 %s | %IRGenFileCheck %s -check-prefix CHECK-%target-import-type +// RUN: %target-swift-frontend -module-name no_to_arg_leaks -emit-irgen -disable-availability-checking -I %t 2>&1 %s // UNSUPPORTED: back_deploy_concurrency // REQUIRES: concurrency diff --git a/test/Driver/options-interpreter.swift b/test/Driver/options-interpreter.swift index c5b0598ea59f1..38c29f601343a 100644 --- a/test/Driver/options-interpreter.swift +++ b/test/Driver/options-interpreter.swift @@ -58,6 +58,9 @@ // CHECK-COMPLEX-DAG: DYLD_FRAMEWORK_PATH=/foo/:/bar/:/abc/{{$| }} // CHECK-COMPLEX-DAG: DYLD_LIBRARY_PATH={{/foo2/:/bar2/:[^:]+/lib/swift/macosx:/sdkroot/usr/lib/swift($| )}} +// RUN: %swift_driver_plain -sdk /sdk -### -target aarch64-unknown-linux-gnu %s | %FileCheck -check-prefix=CHECK-RUNTIME-LIBRARY-PATH %s +// CHECK-RUNTIME-LIBRARY-PATH-NOT: # LD_LIBRARY_PATH=/sdk/usr/lib/swift/linux:/sdk/usr/lib/swift + // RUN: %swift_driver_plain -sdk "" -### -target x86_64-unknown-linux-gnu -L/foo/ %s | %FileCheck -check-prefix=CHECK-L-LINUX${LD_LIBRARY_PATH+_LAX} %s // CHECK-L-LINUX: # LD_LIBRARY_PATH={{/foo/:[^:]+/lib/swift/linux$}} // CHECK-L-LINUX_LAX: # LD_LIBRARY_PATH={{/foo/:[^:]+/lib/swift/linux($|:)}} diff --git a/test/IRGen/ELF-remove-autolink-section.swift b/test/IRGen/ELF-remove-autolink-section.swift index 4745077eeec70..9ce5d1bace7fa 100644 --- a/test/IRGen/ELF-remove-autolink-section.swift +++ b/test/IRGen/ELF-remove-autolink-section.swift @@ -1,4 +1,5 @@ -// RUN: %swiftc_driver -emit-ir %s -o - -Xfrontend -disable-implicit-concurrency-module-import -Xfrontend -disable-implicit-string-processing-module-import | %FileCheck %s -check-prefix ELF +// RUN: %swiftc_driver %use_no_opaque_pointers -emit-ir %s -o - -Xfrontend -disable-implicit-concurrency-module-import -Xfrontend -disable-implicit-string-processing-module-import | %FileCheck %s -check-prefix ELF +// RUN: %swiftc_driver -emit-ir %s -o - -Xfrontend -disable-implicit-concurrency-module-import -Xfrontend -disable-implicit-string-processing-module-import // Check that the swift auto link section is available in the object file. // RUN: %swiftc_driver -c %s -o %t -Xfrontend -disable-implicit-concurrency-module-import diff --git a/test/IRGen/TestABIInaccessible.swift b/test/IRGen/TestABIInaccessible.swift index d0ff435bebe46..7a316d40d83cc 100644 --- a/test/IRGen/TestABIInaccessible.swift +++ b/test/IRGen/TestABIInaccessible.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -disable-type-layout -module-name main -I %t -emit-ir -primary-file %s %S/Inputs/ABIInaccessible.swift | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout -module-name main -I %t -emit-ir -primary-file %s %S/Inputs/ABIInaccessible.swift | %FileCheck %s +// RUN: %target-swift-frontend -disable-type-layout -module-name main -I %t -emit-ir -primary-file %s %S/Inputs/ABIInaccessible.swift public struct AnotherType { init(_ t: T) { diff --git a/test/IRGen/UseObjCMethod.swift b/test/IRGen/UseObjCMethod.swift index efb5dd333fbee..46ee5703c0df6 100644 --- a/test/IRGen/UseObjCMethod.swift +++ b/test/IRGen/UseObjCMethod.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -import-objc-header %S/Inputs/StaticInline.h %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -import-objc-header %S/Inputs/StaticInline.h %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -import-objc-header %S/Inputs/StaticInline.h %s -emit-ir // REQUIRES: objc_interop import Foundation diff --git a/test/IRGen/abitypes.swift b/test/IRGen/abitypes.swift index d09c7887ec305..10dd3ecc144bc 100644 --- a/test/IRGen/abitypes.swift +++ b/test/IRGen/abitypes.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/abi %s -emit-ir -enable-objc-interop | %FileCheck -check-prefix=%target-cpu-%target-os-abi %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers -I %S/Inputs/abi %s -emit-ir -enable-objc-interop | %FileCheck -check-prefix=%target-cpu-%target-os-abi %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/abi %s -emit-ir -enable-objc-interop // FIXME: rdar://problem/19648117 Needs splitting objc parts out // XFAIL: OS=linux-gnu, OS=windows-msvc, OS=openbsd, OS=linux-android, OS=linux-androideabi diff --git a/test/IRGen/access_markers.sil b/test/IRGen/access_markers.sil index 44046752d1b93..86a4d3d5a750c 100644 --- a/test/IRGen/access_markers.sil +++ b/test/IRGen/access_markers.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -swift-version 4 -enforce-exclusivity=checked %s -emit-ir | %FileCheck %s --check-prefix=CHECK +// RUN: %target-swift-frontend %use_no_opaque_pointers -swift-version 4 -enforce-exclusivity=checked %s -emit-ir | %FileCheck %s --check-prefix=CHECK +// RUN: %target-swift-frontend -swift-version 4 -enforce-exclusivity=checked %s -emit-ir sil_stage canonical diff --git a/test/IRGen/access_type_metadata_by_mangled_name.swift b/test/IRGen/access_type_metadata_by_mangled_name.swift index a0800e5109f74..282d0e28866c3 100644 --- a/test/IRGen/access_type_metadata_by_mangled_name.swift +++ b/test/IRGen/access_type_metadata_by_mangled_name.swift @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -emit-ir -parse-stdlib %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-endian -// RUN: %target-swift-frontend -emit-ir -disable-concrete-type-metadata-mangled-name-accessors -parse-stdlib %s | %FileCheck %s --check-prefix=DISABLED +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -parse-stdlib %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-endian +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -disable-concrete-type-metadata-mangled-name-accessors -parse-stdlib %s | %FileCheck %s --check-prefix=DISABLED +// RUN: %target-swift-frontend -emit-ir -parse-stdlib %s +// RUN: %target-swift-frontend -emit-ir -disable-concrete-type-metadata-mangled-name-accessors -parse-stdlib %s // DISABLED-NOT: __swift_instantiateConcreteTypeFromMangledName // DISABLED-NOT: MD" = {{.*}} global diff --git a/test/IRGen/actor_class.swift b/test/IRGen/actor_class.swift index 06820eb647f3f..a49041f9e1eaf 100644 --- a/test/IRGen/actor_class.swift +++ b/test/IRGen/actor_class.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s -swift-version 5 -disable-availability-checking | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s -swift-version 5 -disable-availability-checking | %IRGenFileCheck %s +// RUN: %target-swift-frontend -emit-ir %s -swift-version 5 -disable-availability-checking // REQUIRES: concurrency diff --git a/test/IRGen/actor_class_objc.swift b/test/IRGen/actor_class_objc.swift index 70a725a450fd1..c8a8373ad82b5 100644 --- a/test/IRGen/actor_class_objc.swift +++ b/test/IRGen/actor_class_objc.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s -swift-version 5 -target %target-cpu-apple-macosx12.0 | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s -swift-version 5 -target %target-cpu-apple-macosx12.0 | %IRGenFileCheck %s +// RUN: %target-swift-frontend -emit-ir %s -swift-version 5 -target %target-cpu-apple-macosx12.0 // REQUIRES: concurrency // REQUIRES: objc_interop // REQUIRES: OS=macosx diff --git a/test/IRGen/actor_class_objc_backdeploy.swift b/test/IRGen/actor_class_objc_backdeploy.swift index ebde4487c6913..9527540a2e756 100644 --- a/test/IRGen/actor_class_objc_backdeploy.swift +++ b/test/IRGen/actor_class_objc_backdeploy.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s -swift-version 5 -target %target-cpu-apple-macosx11.0 -module-name actor_class_objc | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s -swift-version 5 -target %target-cpu-apple-macosx11.0 -module-name actor_class_objc | %IRGenFileCheck %s +// RUN: %target-swift-frontend -emit-ir %s -swift-version 5 -target %target-cpu-apple-macosx11.0 -module-name actor_class_objc // REQUIRES: concurrency // REQUIRES: objc_interop // REQUIRES: OS=macosx diff --git a/test/IRGen/alignment.sil b/test/IRGen/alignment.sil index 41383b108d4b0..8bab3b8d2ec1c 100644 --- a/test/IRGen/alignment.sil +++ b/test/IRGen/alignment.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s import Swift import Builtin diff --git a/test/IRGen/alloc.sil b/test/IRGen/alloc.sil index 192d497f6ae28..8e2b80d409888 100644 --- a/test/IRGen/alloc.sil +++ b/test/IRGen/alloc.sil @@ -1,9 +1,10 @@ -// RUN: %swift -disable-legacy-type-info -target x86_64-apple-macosx10.9 -module-name main %s -emit-ir -o - | %FileCheck %s -// RUN: %swift -disable-legacy-type-info -target i386-apple-ios7.0 %s -module-name main -emit-ir -o - | %FileCheck %s -// RUN: %swift -disable-legacy-type-info -target x86_64-apple-ios7.0 %s -module-name main -emit-ir -o - | %FileCheck %s -// RUN: %swift -disable-legacy-type-info -target armv7-apple-ios7.0 %s -module-name main -emit-ir -o - | %FileCheck %s -// RUN: %swift -disable-legacy-type-info -target arm64-apple-ios7.0 %s -module-name main -emit-ir -o - | %FileCheck %s -// RUN: %swift -disable-legacy-type-info -target x86_64-unknown-linux-gnu %s -disable-objc-interop -module-name main -emit-ir -o - | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target x86_64-apple-macosx10.9 -module-name main %s -emit-ir -o - | %FileCheck %s +// RUN: %swift -disable-legacy-type-info -target x86_64-apple-macosx10.9 -module-name main %s -emit-ir -o - +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target i386-apple-ios7.0 %s -module-name main -emit-ir -o - | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target x86_64-apple-ios7.0 %s -module-name main -emit-ir -o - | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target armv7-apple-ios7.0 %s -module-name main -emit-ir -o - | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target arm64-apple-ios7.0 %s -module-name main -emit-ir -o - | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target x86_64-unknown-linux-gnu %s -disable-objc-interop -module-name main -emit-ir -o - | %FileCheck %s // REQUIRES: CODEGENERATOR=X86 // REQUIRES: CODEGENERATOR=ARM diff --git a/test/IRGen/alloc_stack.swift b/test/IRGen/alloc_stack.swift index d68f594251ed8..c6b880e328ec4 100644 --- a/test/IRGen/alloc_stack.swift +++ b/test/IRGen/alloc_stack.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/archetype_resilience.sil b/test/IRGen/archetype_resilience.sil index b0cf1fdcf80cd..2b4caa81e090d 100644 --- a/test/IRGen/archetype_resilience.sil +++ b/test/IRGen/archetype_resilience.sil @@ -4,7 +4,8 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_enum.swiftmodule -module-name=resilient_enum -I %t %S/../Inputs/resilient_enum.swift -// RUN: %target-swift-frontend -disable-type-layout -I %t -emit-ir -enable-library-evolution %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout -I %t -emit-ir -enable-library-evolution %s | %FileCheck %s +// RUN: %target-swift-frontend -disable-type-layout -I %t -emit-ir -enable-library-evolution %s sil_stage canonical diff --git a/test/IRGen/argument_attrs.sil b/test/IRGen/argument_attrs.sil index cee3a37225d30..ff17815eb6f35 100644 --- a/test/IRGen/argument_attrs.sil +++ b/test/IRGen/argument_attrs.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s import Builtin diff --git a/test/IRGen/associated_type_witness.swift b/test/IRGen/associated_type_witness.swift index 46b0a9968b07b..c71e15bef4b05 100644 --- a/test/IRGen/associated_type_witness.swift +++ b/test/IRGen/associated_type_witness.swift @@ -1,8 +1,10 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir > %t.ll +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir > %t.ll +// RUN: %target-swift-frontend -primary-file %s -emit-ir // RUN: %FileCheck %s -check-prefix=GLOBAL < %t.ll // RUN: %FileCheck %s < %t.ll -// RUN: %target-swift-frontend -primary-file %s -emit-ir -wmo -num-threads 1 > %t.ll.wmo +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -wmo -num-threads 1 > %t.ll.wmo +// RUN: %target-swift-frontend -primary-file %s -emit-ir -wmo -num-threads 1 // RUN: %FileCheck %s -check-prefix=GLOBAL < %t.ll.wmo // RUN: %FileCheck %s < %t.ll.wmo // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/associated_types.swift b/test/IRGen/associated_types.swift index 350e27714236a..b49211415a9a1 100644 --- a/test/IRGen/associated_types.swift +++ b/test/IRGen/associated_types.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -primary-file %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -primary-file %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -emit-ir -primary-file %s // REQUIRES: CPU=i386 || CPU=x86_64 diff --git a/test/IRGen/async.swift b/test/IRGen/async.swift index a86f6e03e8ccf..de9b4a951cba7 100644 --- a/test/IRGen/async.swift +++ b/test/IRGen/async.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir -disable-availability-checking | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -disable-availability-checking | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend -primary-file %s -emit-ir -disable-availability-checking // RUN: %target-swift-frontend -primary-file %s -emit-ir -disable-availability-checking -enable-library-evolution // REQUIRES: concurrency diff --git a/test/IRGen/async/builtin_executor.sil b/test/IRGen/async/builtin_executor.sil index 8cc81e8414c99..b9590009abe45 100644 --- a/test/IRGen/async/builtin_executor.sil +++ b/test/IRGen/async/builtin_executor.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -module-name=test -disable-llvm-optzns -disable-swift-specific-llvm-optzns -emit-ir -sil-verify-all | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -module-name=test -disable-llvm-optzns -disable-swift-specific-llvm-optzns -emit-ir -sil-verify-all | %IRGenFileCheck %s +// RUN: %target-swift-frontend -primary-file %s -module-name=test -disable-llvm-optzns -disable-swift-specific-llvm-optzns -emit-ir -sil-verify-all // REQUIRES: concurrency // rdar://106849189 move-only types should be supported in freestanding mode diff --git a/test/IRGen/async/builtins.sil b/test/IRGen/async/builtins.sil index 8d677ec0dbf27..cb62bcbbe363a 100644 --- a/test/IRGen/async/builtins.sil +++ b/test/IRGen/async/builtins.sil @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -enable-objc-interop -primary-file %s -emit-ir -sil-verify-all | %FileCheck %s -DINT=i%target-ptrsize --check-prefixes=CHECK,CHECK-objc,CHECK-%target-ptrsize -// RUN: %target-swift-frontend -disable-objc-interop -primary-file %s -emit-ir -sil-verify-all | %FileCheck %s -DINT=i%target-ptrsize --check-prefixes=CHECK,CHECK-native,CHECK-%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -primary-file %s -emit-ir -sil-verify-all | %FileCheck %s -DINT=i%target-ptrsize --check-prefixes=CHECK,CHECK-objc,CHECK-%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-objc-interop -primary-file %s -emit-ir -sil-verify-all | %FileCheck %s -DINT=i%target-ptrsize --check-prefixes=CHECK,CHECK-native,CHECK-%target-ptrsize +// RUN: %target-swift-frontend -enable-objc-interop -primary-file %s -emit-ir -sil-verify-all +// RUN: %target-swift-frontend -disable-objc-interop -primary-file %s -emit-ir -sil-verify-all // REQUIRES: concurrency // XFAIL: CPU=arm64e diff --git a/test/IRGen/async/class_resilience.swift b/test/IRGen/async/class_resilience.swift index 6e6e8df509024..2a556a23036a3 100644 --- a/test/IRGen/async/class_resilience.swift +++ b/test/IRGen/async/class_resilience.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -disable-availability-checking -enable-library-evolution -emit-module-path=%t/resilient_class.swiftmodule -module-name=resilient_class %S/Inputs/resilient_class.swift -// RUN: %target-swift-frontend -I %t -emit-ir -disable-availability-checking -enable-library-evolution %s | %FileCheck -check-prefix CHECK -check-prefix CHECK-%target-cpu -check-prefix CHECK-%target-import-type %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir -disable-availability-checking -enable-library-evolution %s | %FileCheck -check-prefix CHECK -check-prefix CHECK-%target-cpu -check-prefix CHECK-%target-import-type %s +// RUN: %target-swift-frontend -I %t -emit-ir -disable-availability-checking -enable-library-evolution %s // REQUIRES: concurrency import resilient_class diff --git a/test/IRGen/async/default_actor.swift b/test/IRGen/async/default_actor.swift index a886a41de4e1c..a145d7a6f4a1d 100644 --- a/test/IRGen/async/default_actor.swift +++ b/test/IRGen/async/default_actor.swift @@ -1,5 +1,6 @@ // RUN: %empty-directory(%t) -// RUN: %target-swift-frontend -I %t -emit-ir -disable-availability-checking -enable-library-evolution %s | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir -disable-availability-checking -enable-library-evolution %s | %IRGenFileCheck %s +// RUN: %target-swift-frontend -I %t -emit-ir -disable-availability-checking -enable-library-evolution %s // REQUIRES: concurrency // CHECK: @"$s13default_actor1ACMn" = hidden constant diff --git a/test/IRGen/async/get_async_continuation.sil b/test/IRGen/async/get_async_continuation.sil index 04461694c98a6..9008835f5f2e3 100644 --- a/test/IRGen/async/get_async_continuation.sil +++ b/test/IRGen/async/get_async_continuation.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -g -enable-objc-interop -primary-file %s -emit-ir -sil-verify-all -disable-llvm-optzns -disable-swift-specific-llvm-optzns | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -g -enable-objc-interop -primary-file %s -emit-ir -sil-verify-all -disable-llvm-optzns -disable-swift-specific-llvm-optzns | %IRGenFileCheck %s +// RUN: %target-swift-frontend -g -enable-objc-interop -primary-file %s -emit-ir -sil-verify-all -disable-llvm-optzns -disable-swift-specific-llvm-optzns // RUN: %target-swift-frontend -enable-objc-interop -primary-file %s -emit-ir -sil-verify-all // REQUIRES: concurrency diff --git a/test/IRGen/async/hop_to_executor.sil b/test/IRGen/async/hop_to_executor.sil index 5c9dcc0b4a837..b8a19e2231adc 100644 --- a/test/IRGen/async/hop_to_executor.sil +++ b/test/IRGen/async/hop_to_executor.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -module-name=test -disable-llvm-optzns -disable-swift-specific-llvm-optzns -emit-ir -sil-verify-all | %IRGenFileCheck %s -check-prefix CHECK-%target-abi +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -module-name=test -disable-llvm-optzns -disable-swift-specific-llvm-optzns -emit-ir -sil-verify-all | %IRGenFileCheck %s -check-prefix CHECK-%target-abi +// RUN: %target-swift-frontend -primary-file %s -module-name=test -disable-llvm-optzns -disable-swift-specific-llvm-optzns -emit-ir -sil-verify-all // REQUIRES: concurrency diff --git a/test/IRGen/async/partial_apply.sil b/test/IRGen/async/partial_apply.sil index 2d625f5129515..259377ed796ad 100644 --- a/test/IRGen/async/partial_apply.sil +++ b/test/IRGen/async/partial_apply.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -g -emit-module -enable-library-evolution -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../../Inputs/resilient_struct.swift -// RUN: %target-swift-frontend -g -I %t -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -g -I %t -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend -g -I %t -emit-ir %s // REQUIRES: concurrency diff --git a/test/IRGen/async/protocol_resilience.swift b/test/IRGen/async/protocol_resilience.swift index d44e2780ed337..8b60cbaa1ff07 100644 --- a/test/IRGen/async/protocol_resilience.swift +++ b/test/IRGen/async/protocol_resilience.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -disable-availability-checking -g -enable-library-evolution -emit-module-path=%t/resilient_protocol.swiftmodule -module-name=resilient_protocol %S/Inputs/resilient_protocol.swift -// RUN: %target-swift-frontend -I %t -emit-ir -disable-availability-checking -g -enable-library-evolution %s | %FileCheck -check-prefix CHECK -check-prefix CHECK-%target-cpu -check-prefix CHECK-%target-import-type %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir -disable-availability-checking -g -enable-library-evolution %s | %FileCheck -check-prefix CHECK -check-prefix CHECK-%target-cpu -check-prefix CHECK-%target-import-type %s +// RUN: %target-swift-frontend -I %t -emit-ir -disable-availability-checking -g -enable-library-evolution %s // REQUIRES: concurrency import resilient_protocol diff --git a/test/IRGen/async/run-call-dynamic-void_to_void.swift b/test/IRGen/async/run-call-dynamic-void_to_void.swift index c0ec326dc0417..5a40eaf9f7eeb 100644 --- a/test/IRGen/async/run-call-dynamic-void_to_void.swift +++ b/test/IRGen/async/run-call-dynamic-void_to_void.swift @@ -1,5 +1,6 @@ // RUN: %empty-directory(%t) -// RUN: %target-build-swift -Xfrontend -disable-availability-checking -g %s -emit-ir -parse-as-library -module-name main | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift %use_no_opaque_pointers -Xfrontend -disable-availability-checking -g %s -emit-ir -parse-as-library -module-name main | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift -Xfrontend -disable-availability-checking -g %s -emit-ir -parse-as-library -module-name main // RUN: %target-build-swift -Xfrontend -disable-availability-checking -g %s -parse-as-library -module-name main -o %t/main %target-rpath(%t) // RUN: %target-codesign %t/main // RUN: %target-run %t/main | %FileCheck %s diff --git a/test/IRGen/async/run-call-resilient-classinstance-void-to-void.sil b/test/IRGen/async/run-call-resilient-classinstance-void-to-void.sil index 2f8ad6adbd345..efb619b48a409 100644 --- a/test/IRGen/async/run-call-resilient-classinstance-void-to-void.sil +++ b/test/IRGen/async/run-call-resilient-classinstance-void-to-void.sil @@ -3,7 +3,8 @@ // RUN: %target-codesign %t/%target-library-name(PrintShims) // RUN: %target-build-swift-dylib(%t/%target-library-name(ResilientClass)) %S/Inputs/class-1instance-void_to_void.swift -Xfrontend -disable-availability-checking -g -module-name ResilientClass -emit-module -emit-module-path %t/ResilientClass.swiftmodule // RUN: %target-codesign %t/%target-library-name(ResilientClass) -// RUN: %target-build-swift -Xfrontend -disable-availability-checking -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim -lResilientClass | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift %use_no_opaque_pointers -Xfrontend -disable-availability-checking -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim -lResilientClass | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift -Xfrontend -disable-availability-checking -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim -lResilientClass // RUN: %target-build-swift -Xfrontend -disable-availability-checking -g -parse-sil %s -module-name main -o %t/main -I %t -L %t -lPrintShims -lResilientClass %target-rpath(%t) // RUN: %target-codesign %t/main // RUN: %target-run %t/main %t/%target-library-name(PrintShims) %t/%target-library-name(ResilientClass) | %FileCheck %s diff --git a/test/IRGen/async/run-call-struct_five_bools-to-void.sil b/test/IRGen/async/run-call-struct_five_bools-to-void.sil index 1c08d152531c0..94597a91e4191 100644 --- a/test/IRGen/async/run-call-struct_five_bools-to-void.sil +++ b/test/IRGen/async/run-call-struct_five_bools-to-void.sil @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift-dylib(%t/%target-library-name(PrintShims)) %S/../../Inputs/print-shims.swift -module-name PrintShims -emit-module -emit-module-path %t/PrintShims.swiftmodule // RUN: %target-codesign %t/%target-library-name(PrintShims) -// RUN: %target-build-swift -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift %use_no_opaque_pointers -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim // RUN: %target-build-swift -g -parse-sil %s -module-name main -o %t/main -I %t -L %t -lPrintShims %target-rpath(%t) // RUN: %target-codesign %t/main // RUN: %target-run %t/main %t/%target-library-name(PrintShims) | %FileCheck %s diff --git a/test/IRGen/async/run-call-void-throws-to-int-throwing.sil b/test/IRGen/async/run-call-void-throws-to-int-throwing.sil index 253f174a3f749..46eaf949de3bb 100644 --- a/test/IRGen/async/run-call-void-throws-to-int-throwing.sil +++ b/test/IRGen/async/run-call-void-throws-to-int-throwing.sil @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift-dylib(%t/%target-library-name(PrintShims)) %S/../../Inputs/print-shims.swift -module-name PrintShims -emit-module -emit-module-path %t/PrintShims.swiftmodule // RUN: %target-codesign %t/%target-library-name(PrintShims) -// RUN: %target-build-swift -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift %use_no_opaque_pointers -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim // RUN: %target-build-swift -g -parse-sil %s -module-name main -o %t/main -I %t -L %t -lPrintShims %target-rpath(%t) // RUN: %target-codesign %t/main // RUN: %target-run %t/main %t/%target-library-name(PrintShims) | %FileCheck %s diff --git a/test/IRGen/async/run-call-void-throws-to-int-throwing_call-async-nothrow_call-sync-throw.sil b/test/IRGen/async/run-call-void-throws-to-int-throwing_call-async-nothrow_call-sync-throw.sil index 17d86e8d71123..95976bfbaeff1 100644 --- a/test/IRGen/async/run-call-void-throws-to-int-throwing_call-async-nothrow_call-sync-throw.sil +++ b/test/IRGen/async/run-call-void-throws-to-int-throwing_call-async-nothrow_call-sync-throw.sil @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift-dylib(%t/%target-library-name(PrintShims)) %S/../../Inputs/print-shims.swift -module-name PrintShims -emit-module -emit-module-path %t/PrintShims.swiftmodule // RUN: %target-codesign %t/%target-library-name(PrintShims) -// RUN: %target-build-swift -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift %use_no_opaque_pointers -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim // RUN: %target-build-swift -g -parse-sil %s -module-name main -o %t/main -I %t -L %t -lPrintShims %target-rpath(%t) // RUN: %target-codesign %t/main // RUN: %target-run %t/main %t/%target-library-name(PrintShims) | %FileCheck %s diff --git a/test/IRGen/async/run-call-void-throws-to-int-throwing_call-async-throw.sil b/test/IRGen/async/run-call-void-throws-to-int-throwing_call-async-throw.sil index 7b3a9caa6b456..022af8cdf0fbc 100644 --- a/test/IRGen/async/run-call-void-throws-to-int-throwing_call-async-throw.sil +++ b/test/IRGen/async/run-call-void-throws-to-int-throwing_call-async-throw.sil @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift-dylib(%t/%target-library-name(PrintShims)) %S/../../Inputs/print-shims.swift -module-name PrintShims -emit-module -emit-module-path %t/PrintShims.swiftmodule // RUN: %target-codesign %t/%target-library-name(PrintShims) -// RUN: %target-build-swift -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift %use_no_opaque_pointers -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim // RUN: %target-build-swift -g -parse-sil %s -module-name main -o %t/main -I %t -L %t -lPrintShims %target-rpath(%t) // RUN: %target-codesign %t/main // RUN: %target-run %t/main %t/%target-library-name(PrintShims) | %FileCheck %s diff --git a/test/IRGen/async/run-call-void-throws-to-int-throwing_call-sync-nothrow_call-async-throw.sil b/test/IRGen/async/run-call-void-throws-to-int-throwing_call-sync-nothrow_call-async-throw.sil index 551049c7dbb1f..1f7c71236058e 100644 --- a/test/IRGen/async/run-call-void-throws-to-int-throwing_call-sync-nothrow_call-async-throw.sil +++ b/test/IRGen/async/run-call-void-throws-to-int-throwing_call-sync-nothrow_call-async-throw.sil @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift-dylib(%t/%target-library-name(PrintShims)) %S/../../Inputs/print-shims.swift -module-name PrintShims -emit-module -emit-module-path %t/PrintShims.swiftmodule // RUN: %target-codesign %t/%target-library-name(PrintShims) -// RUN: %target-build-swift -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift %use_no_opaque_pointers -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim // RUN: %target-build-swift -g -parse-sil %s -module-name main -o %t/main -I %t -L %t -lPrintShims %target-rpath(%t) // RUN: %target-codesign %t/main // RUN: %target-run %t/main %t/%target-library-name(PrintShims) | %FileCheck %s diff --git a/test/IRGen/async/run-call-void-throws-to-int-throwing_call-sync-throw.sil b/test/IRGen/async/run-call-void-throws-to-int-throwing_call-sync-throw.sil index a3e8e29ac098f..3347508b46b29 100644 --- a/test/IRGen/async/run-call-void-throws-to-int-throwing_call-sync-throw.sil +++ b/test/IRGen/async/run-call-void-throws-to-int-throwing_call-sync-throw.sil @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift-dylib(%t/%target-library-name(PrintShims)) %S/../../Inputs/print-shims.swift -module-name PrintShims -emit-module -emit-module-path %t/PrintShims.swiftmodule // RUN: %target-codesign %t/%target-library-name(PrintShims) -// RUN: %target-build-swift -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift %use_no_opaque_pointers -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim // RUN: %target-build-swift -g -parse-sil %s -module-name main -o %t/main -I %t -L %t -lPrintShims %target-rpath(%t) // RUN: %target-codesign %t/main // RUN: %target-run %t/main %t/%target-library-name(PrintShims) | %FileCheck %s diff --git a/test/IRGen/async/run-call-void-to-int64.swift b/test/IRGen/async/run-call-void-to-int64.swift index 525610e23fa09..c40de03393a74 100644 --- a/test/IRGen/async/run-call-void-to-int64.swift +++ b/test/IRGen/async/run-call-void-to-int64.swift @@ -1,5 +1,6 @@ // RUN: %empty-directory(%t) -// RUN: %target-build-swift -Xfrontend -disable-availability-checking -g %s -parse-as-library -module-name main -emit-ir | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift %use_no_opaque_pointers -Xfrontend -disable-availability-checking -g %s -parse-as-library -module-name main -emit-ir | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift -Xfrontend -disable-availability-checking -g %s -parse-as-library -module-name main -emit-ir // RUN: %target-build-swift -Xfrontend -disable-availability-checking -g %s -parse-as-library -module-name main -o %t/main // RUN: %target-codesign %t/main // RUN: %target-run %t/main | %FileCheck %s diff --git a/test/IRGen/async/run-thintothick-int64-to-void.sil b/test/IRGen/async/run-thintothick-int64-to-void.sil index 1c6a192d1008a..343219def61af 100644 --- a/test/IRGen/async/run-thintothick-int64-to-void.sil +++ b/test/IRGen/async/run-thintothick-int64-to-void.sil @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift-dylib(%t/%target-library-name(PrintShims)) %S/../../Inputs/print-shims.swift -module-name PrintShims -emit-module -emit-module-path %t/PrintShims.swiftmodule // RUN: %target-codesign %t/%target-library-name(PrintShims) -// RUN: %target-build-swift -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift %use_no_opaque_pointers -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim | %FileCheck %s --check-prefix=CHECK-LL +// RUN: %target-build-swift -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim // RUN: %target-build-swift -g -parse-sil %s -module-name main -o %t/main -I %t -L %t -lPrintShims %target-rpath(%t) // RUN: %target-codesign %t/main // RUN: %target-run %t/main %t/%target-library-name(PrintShims) | %FileCheck %s diff --git a/test/IRGen/async/unreachable.swift b/test/IRGen/async/unreachable.swift index 78509adbf7a88..ea1b14465298a 100644 --- a/test/IRGen/async/unreachable.swift +++ b/test/IRGen/async/unreachable.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -g -emit-ir -disable-availability-checking -disable-llvm-optzns -disable-swift-specific-llvm-optzns | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -g -emit-ir -disable-availability-checking -disable-llvm-optzns -disable-swift-specific-llvm-optzns | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -g -emit-ir -disable-availability-checking -disable-llvm-optzns -disable-swift-specific-llvm-optzns // REQUIRES: concurrency // CHECK: call i1 (i8*, i1, ...) @llvm.coro.end.async diff --git a/test/IRGen/async_dynamic_replacement.swift b/test/IRGen/async_dynamic_replacement.swift index 453e654c4cb99..183c457525302 100644 --- a/test/IRGen/async_dynamic_replacement.swift +++ b/test/IRGen/async_dynamic_replacement.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -disable-availability-checking -disable-objc-interop | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -disable-availability-checking -disable-objc-interop | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -disable-availability-checking -disable-objc-interop // REQUIRES: concurrency diff --git a/test/IRGen/autolink-coff-force-link.swift b/test/IRGen/autolink-coff-force-link.swift index da0cf7173eb6f..fd216d87dfa1e 100644 --- a/test/IRGen/autolink-coff-force-link.swift +++ b/test/IRGen/autolink-coff-force-link.swift @@ -2,13 +2,17 @@ // RUN: %swift -target i686--windows-msvc -parse-stdlib -autolink-force-load -module-name swiftMSVCRT -module-link-name swiftMSVCRT -emit-module -o %t/swiftMSVCRT.swiftmodule %S/../Inputs/empty.swift -// RUN: %swift -target i686--windows-msvc -parse-as-library -parse-stdlib -autolink-force-load -module-name autolink -module-link-name autolink -emit-ir -o - %s -I%t | %FileCheck %s -// RUN: %swift -target i686--windows-msvc -parse-as-library -parse-stdlib -autolink-force-load -module-name autolink -module-link-name autolink -S -o - %s -I%t | %FileCheck %s -check-prefix CHECK-ASM-MSC +// RUN: %swift %use_no_opaque_pointers -target i686--windows-msvc -parse-as-library -parse-stdlib -autolink-force-load -module-name autolink -module-link-name autolink -emit-ir -o - %s -I%t | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -target i686--windows-msvc -parse-as-library -parse-stdlib -autolink-force-load -module-name autolink -module-link-name autolink -S -o - %s -I%t | %FileCheck %s -check-prefix CHECK-ASM-MSC +// RUN: %swift -target i686--windows-msvc -parse-as-library -parse-stdlib -autolink-force-load -module-name autolink -module-link-name autolink -emit-ir -o - %s -I%t +// RUN: %swift -target i686--windows-msvc -parse-as-library -parse-stdlib -autolink-force-load -module-name autolink -module-link-name autolink -S -o - %s -I%t // RUN: %swift -target i686--windows-itanium -parse-stdlib -autolink-force-load -module-name swiftMSVCRT -module-link-name swiftMSVCRT -emit-module -o %t/swiftMSVCRT.swiftmodule %S/../Inputs/empty.swift -// RUN: %swift -target i686--windows-itanium -parse-as-library -parse-stdlib -autolink-force-load -module-name autolink -module-link-name autolink -emit-ir -o - %s -I%t | %FileCheck %s -// RUN: %swift -target i686--windows-itanium -parse-as-library -parse-stdlib -autolink-force-load -module-name autolink -module-link-name autolink -S -o - %s -I%t | %FileCheck %s -check-prefix CHECK-ASM-GNU +// RUN: %swift %use_no_opaque_pointers -target i686--windows-itanium -parse-as-library -parse-stdlib -autolink-force-load -module-name autolink -module-link-name autolink -emit-ir -o - %s -I%t | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -target i686--windows-itanium -parse-as-library -parse-stdlib -autolink-force-load -module-name autolink -module-link-name autolink -S -o - %s -I%t | %FileCheck %s -check-prefix CHECK-ASM-GNU +// RUN: %swift -target i686--windows-itanium -parse-as-library -parse-stdlib -autolink-force-load -module-name autolink -module-link-name autolink -emit-ir -o - %s -I%t +// RUN: %swift -target i686--windows-itanium -parse-as-library -parse-stdlib -autolink-force-load -module-name autolink -module-link-name autolink -S -o - %s -I%t // REQUIRES: OS=windows-msvc diff --git a/test/IRGen/autolink-coff-x86.swift b/test/IRGen/autolink-coff-x86.swift index 2f81ed7e9ade5..53e1fcb3c20d7 100644 --- a/test/IRGen/autolink-coff-x86.swift +++ b/test/IRGen/autolink-coff-x86.swift @@ -1,8 +1,10 @@ // RUN: %empty-directory(%t) // RUN: %swift -target x86_64--windows-gnu -parse-as-library -disable-legacy-type-info -parse-stdlib -emit-module-path %t/module.swiftmodule -module-name module -module-link-name module %s -// RUN: %swift -target x86_64--windows-gnu -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name autolink -I %t -D MAIN_MODULE -emit-ir -o - %s | %FileCheck %s -check-prefix CHECK-GNU-IR -// RUN: %swift -target x86_64--windows-gnu -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name autolink -I %t -D MAIN_MODULE -S -o - %s | %FileCheck %s -check-prefix CHECK-GNU-ASM +// RUN: %swift %use_no_opaque_pointers -target x86_64--windows-gnu -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name autolink -I %t -D MAIN_MODULE -emit-ir -o - %s | %FileCheck %s -check-prefix CHECK-GNU-IR +// RUN: %swift %use_no_opaque_pointers -target x86_64--windows-gnu -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name autolink -I %t -D MAIN_MODULE -emit-ir -o - %s | %FileCheck %s -check-prefix CHECK-GNU-IR +// RUN: %swift -target x86_64--windows-gnu -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name autolink -I %t -D MAIN_MODULE -S -o - %s +// RUN: %swift -target x86_64--windows-gnu -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name autolink -I %t -D MAIN_MODULE -S -o - %s // REQUIRES: CODEGENERATOR=X86 diff --git a/test/IRGen/autolink_elf.swift b/test/IRGen/autolink_elf.swift index 6f03e6365cc37..afbfd0d9501b3 100644 --- a/test/IRGen/autolink_elf.swift +++ b/test/IRGen/autolink_elf.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %swift -disable-legacy-type-info -target x86_64-unknown-linux-gnu -emit-module -parse-stdlib -o %t -module-name Empty -module-link-name swiftEmpty -public-autolink-library anotherLib %S/../Inputs/empty.swift -// RUN: %swift -disable-legacy-type-info -target x86_64-unknown-linux-gnu %s -I %t -parse-stdlib -disable-objc-interop -module-name main -emit-ir -o - | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target x86_64-unknown-linux-gnu %s -I %t -parse-stdlib -disable-objc-interop -module-name main -emit-ir -o - | %FileCheck %s +// RUN: %swift -disable-legacy-type-info -target x86_64-unknown-linux-gnu %s -I %t -parse-stdlib -disable-objc-interop -module-name main -emit-ir -o - // REQUIRES: CODEGENERATOR=X86 diff --git a/test/IRGen/autorelease.sil b/test/IRGen/autorelease.sil index 09fbf729c6477..ad583b560faf4 100644 --- a/test/IRGen/autorelease.sil +++ b/test/IRGen/autorelease.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -emit-ir | %FileCheck -check-prefix CHECK -check-prefix CHECK-%target-ptrsize -check-prefix %target-cpu -DINT=i%target-ptrsize %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers %s -emit-ir | %FileCheck -check-prefix CHECK -check-prefix CHECK-%target-ptrsize -check-prefix %target-cpu -DINT=i%target-ptrsize %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -emit-ir // rdar://16565958 diff --git a/test/IRGen/big_types_corner_cases.sil b/test/IRGen/big_types_corner_cases.sil index 03509b267ac44..988e6f18648a3 100644 --- a/test/IRGen/big_types_corner_cases.sil +++ b/test/IRGen/big_types_corner_cases.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %S/Inputs/abi %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir // REQUIRES: CPU=x86_64 // REQUIRES: OS=macosx diff --git a/test/IRGen/big_types_corner_cases.swift b/test/IRGen/big_types_corner_cases.swift index b9d57d537c646..4b51e46b33409 100644 --- a/test/IRGen/big_types_corner_cases.swift +++ b/test/IRGen/big_types_corner_cases.swift @@ -1,6 +1,7 @@ // XFAIL: CPU=powerpc64le // XFAIL: CPU=s390x -// RUN: %target-swift-frontend -disable-type-layout %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend -disable-type-layout %s -emit-ir // REQUIRES: optimized_stdlib // UNSUPPORTED: CPU=powerpc64le diff --git a/test/IRGen/big_types_corner_cases_as_library.swift b/test/IRGen/big_types_corner_cases_as_library.swift index fd1e02d175e46..1c361e5fccede 100644 --- a/test/IRGen/big_types_corner_cases_as_library.swift +++ b/test/IRGen/big_types_corner_cases_as_library.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -disable-type-layout %s -emit-ir -parse-as-library | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout %s -emit-ir -parse-as-library | %FileCheck %s +// RUN: %target-swift-frontend -disable-type-layout %s -emit-ir -parse-as-library public struct BigStruct { var i0 : Int32 = 0 diff --git a/test/IRGen/big_types_corner_cases_tiny.swift b/test/IRGen/big_types_corner_cases_tiny.swift index d05f6bc109ab8..1126e3d075bb4 100644 --- a/test/IRGen/big_types_corner_cases_tiny.swift +++ b/test/IRGen/big_types_corner_cases_tiny.swift @@ -1,5 +1,6 @@ -// RUN: %target-swift-frontend -primary-file %s %S/big_types_corner_cases.swift -emit-ir | %FileCheck %s --check-prefix=CHECK +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s %S/big_types_corner_cases.swift -emit-ir | %FileCheck %s --check-prefix=CHECK +// RUN: %target-swift-frontend -primary-file %s %S/big_types_corner_cases.swift -emit-ir // REQUIRES: optimized_stdlib // DO NOT ADD ANY MORE CODE TO THIS FILE! diff --git a/test/IRGen/big_types_tests.sil b/test/IRGen/big_types_tests.sil index f29342051ab4c..2437d7678aa3f 100644 --- a/test/IRGen/big_types_tests.sil +++ b/test/IRGen/big_types_tests.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir -sil-verify-all | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %S/Inputs/abi %s -emit-ir -sil-verify-all | %FileCheck %s +// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir -sil-verify-all // REQUIRES: CPU=x86_64 // REQUIRES: OS=macosx diff --git a/test/IRGen/bitcast.sil b/test/IRGen/bitcast.sil index 53f29cb7208da..83640b918fe4a 100644 --- a/test/IRGen/bitcast.sil +++ b/test/IRGen/bitcast.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir| %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir| %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir // REQUIRES: CPU=i386 || CPU=x86_64 diff --git a/test/IRGen/boxed_existential.sil b/test/IRGen/boxed_existential.sil index aa37aa1a32b25..1b723bfa9ae88 100644 --- a/test/IRGen/boxed_existential.sil +++ b/test/IRGen/boxed_existential.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-runtime +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-runtime +// RUN: %target-swift-frontend %s -emit-ir import Swift diff --git a/test/IRGen/bridge_object_arm64.sil b/test/IRGen/bridge_object_arm64.sil index f69a336f0c0e6..b27c64cf7a84a 100644 --- a/test/IRGen/bridge_object_arm64.sil +++ b/test/IRGen/bridge_object_arm64.sil @@ -1,4 +1,5 @@ -// RUN: %swift -module-name bridge_object -emit-ir -disable-legacy-type-info -target arm64-apple-ios8.0 %s | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -module-name bridge_object -emit-ir -disable-legacy-type-info -target arm64-apple-ios8.0 %s | %FileCheck %s +// RUN: %swift -module-name bridge_object -emit-ir -disable-legacy-type-info -target arm64-apple-ios8.0 %s // REQUIRES: CODEGENERATOR=AArch64 diff --git a/test/IRGen/bridge_object_armv7.sil b/test/IRGen/bridge_object_armv7.sil index 7b772825f7aaa..e73cda815a51b 100644 --- a/test/IRGen/bridge_object_armv7.sil +++ b/test/IRGen/bridge_object_armv7.sil @@ -1,4 +1,5 @@ -// RUN: %swift -module-name bridge_object -emit-ir -target armv7-apple-ios8.0 -disable-legacy-type-info %s | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -module-name bridge_object -emit-ir -target armv7-apple-ios8.0 -disable-legacy-type-info %s | %FileCheck %s +// RUN: %swift -module-name bridge_object -emit-ir -target armv7-apple-ios8.0 -disable-legacy-type-info %s // REQUIRES: CODEGENERATOR=ARM diff --git a/test/IRGen/bridge_object_x86_64.sil b/test/IRGen/bridge_object_x86_64.sil index 61932a676202d..b39d72b259958 100644 --- a/test/IRGen/bridge_object_x86_64.sil +++ b/test/IRGen/bridge_object_x86_64.sil @@ -1,4 +1,5 @@ -// RUN: %swift -module-name bridge_object -emit-ir -disable-legacy-type-info -target x86_64-apple-macosx10.9 %s | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -module-name bridge_object -emit-ir -disable-legacy-type-info -target x86_64-apple-macosx10.9 %s | %FileCheck %s +// RUN: %swift -module-name bridge_object -emit-ir -disable-legacy-type-info -target x86_64-apple-macosx10.9 %s // REQUIRES: CODEGENERATOR=X86 diff --git a/test/IRGen/builtin_conflict.sil b/test/IRGen/builtin_conflict.sil index c1ded65d0eea4..4b7206762ef34 100644 --- a/test/IRGen/builtin_conflict.sil +++ b/test/IRGen/builtin_conflict.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -parse-sil %s -parse-stdlib -Xllvm -sil-disable-pass=simplification | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -parse-sil %s -parse-stdlib -Xllvm -sil-disable-pass=simplification | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir -parse-sil %s -parse-stdlib -Xllvm -sil-disable-pass=simplification import Builtin import Swift diff --git a/test/IRGen/builtin_isConcrete.sil b/test/IRGen/builtin_isConcrete.sil index a760a5fe5c63a..b7d5174f933d5 100644 --- a/test/IRGen/builtin_isConcrete.sil +++ b/test/IRGen/builtin_isConcrete.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -parse-sil %s -module-name Swift -parse-stdlib | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -parse-sil %s -module-name Swift -parse-stdlib | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir -parse-sil %s -module-name Swift -parse-stdlib import Builtin diff --git a/test/IRGen/builtins.swift b/test/IRGen/builtins.swift index a2213cf95bb34..458c0f8173a37 100644 --- a/test/IRGen/builtins.swift +++ b/test/IRGen/builtins.swift @@ -1,5 +1,6 @@ -// RUN: %target-swift-frontend -module-name builtins -parse-stdlib -Xllvm -sil-disable-pass=target-constant-folding -disable-access-control -primary-file %s -emit-ir -o - -disable-objc-attr-requires-foundation-module | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name builtins -parse-stdlib -Xllvm -sil-disable-pass=target-constant-folding -disable-access-control -primary-file %s -emit-ir -o - -disable-objc-attr-requires-foundation-module | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime +// RUN: %target-swift-frontend -module-name builtins -parse-stdlib -Xllvm -sil-disable-pass=target-constant-folding -disable-access-control -primary-file %s -emit-ir -o - -disable-objc-attr-requires-foundation-module // REQUIRES: CPU=x86_64 || CPU=arm64 || CPU=arm64e diff --git a/test/IRGen/builtins_objc.swift b/test/IRGen/builtins_objc.swift index 73c495b8170fa..eafef6bc85526 100644 --- a/test/IRGen/builtins_objc.swift +++ b/test/IRGen/builtins_objc.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -parse-stdlib -primary-file %s -emit-ir > %t.ir +// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-stdlib -primary-file %s -emit-ir > %t.ir +// RUN: %target-swift-frontend -parse-stdlib -primary-file %s -emit-ir // RUN: %FileCheck %s --input-file=%t.ir // REQUIRES: executable_test diff --git a/test/IRGen/c_function_pointer.sil b/test/IRGen/c_function_pointer.sil index 7b0f0c2fcd47e..72bca03b11561 100644 --- a/test/IRGen/c_function_pointer.sil +++ b/test/IRGen/c_function_pointer.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -emit-ir %s import Swift diff --git a/test/IRGen/c_functions.swift b/test/IRGen/c_functions.swift index cac7c58604343..d56a58259e820 100644 --- a/test/IRGen/c_functions.swift +++ b/test/IRGen/c_functions.swift @@ -1,5 +1,6 @@ // RUN: %empty-directory(%t) -// RUN: %target-swift-frontend -enable-objc-interop -disable-objc-attr-requires-foundation-module -import-objc-header %S/Inputs/c_functions.h -primary-file %s -emit-ir | %FileCheck %s -check-prefix CHECK -check-prefix %target-cpu -check-prefix %target-abi-%target-cpu +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -disable-objc-attr-requires-foundation-module -import-objc-header %S/Inputs/c_functions.h -primary-file %s -emit-ir | %FileCheck %s -check-prefix CHECK -check-prefix %target-cpu -check-prefix %target-abi-%target-cpu +// RUN: %target-swift-frontend -enable-objc-interop -disable-objc-attr-requires-foundation-module -import-objc-header %S/Inputs/c_functions.h -primary-file %s -emit-ir // This is deliberately not a SIL test so that we can test SILGen too. diff --git a/test/IRGen/c_layout.sil b/test/IRGen/c_layout.sil index ac8f10be4e6c6..40aef01c571e6 100644 --- a/test/IRGen/c_layout.sil +++ b/test/IRGen/c_layout.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-cpu -check-prefix CHECK-%target-abi-%target-cpu -check-prefix CHECK-%target-sdk-name-%target-cpu +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %S/Inputs/abi %s -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-cpu -check-prefix CHECK-%target-abi-%target-cpu -check-prefix CHECK-%target-sdk-name-%target-cpu +// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir sil_stage canonical import c_layout diff --git a/test/IRGen/casts.sil b/test/IRGen/casts.sil index dc8c96d995501..5dffaaed2c657 100644 --- a/test/IRGen/casts.sil +++ b/test/IRGen/casts.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module // REQUIRES: CPU=i386 || CPU=x86_64 diff --git a/test/IRGen/cf.sil b/test/IRGen/cf.sil index 1e5d2e4acf133..691446ff47ecf 100644 --- a/test/IRGen/cf.sil +++ b/test/IRGen/cf.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/chex.py < %s > %t/cf.sil -// RUN: %target-swift-frontend -enable-objc-interop -sdk %S/Inputs %t/cf.sil -emit-ir -import-cf-types | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %t/cf.sil -DINT=i%target-ptrsize -check-prefix CHECK-%target-import-type -check-prefix CHECK-%target-import-type-%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -sdk %S/Inputs %t/cf.sil -emit-ir -import-cf-types | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %t/cf.sil -DINT=i%target-ptrsize -check-prefix CHECK-%target-import-type -check-prefix CHECK-%target-import-type-%target-ptrsize +// RUN: %target-swift-frontend -enable-objc-interop -sdk %S/Inputs %t/cf.sil -emit-ir -import-cf-types // REQUIRES: CPU=i386 || CPU=x86_64 diff --git a/test/IRGen/clang_inline.swift b/test/IRGen/clang_inline.swift index bb1fbba8061c2..c1506114647fb 100644 --- a/test/IRGen/clang_inline.swift +++ b/test/IRGen/clang_inline.swift @@ -1,10 +1,12 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend -enable-objc-interop -sdk %S/Inputs -primary-file %s -O -disable-sil-perf-optzns -disable-llvm-optzns -emit-ir -Xcc -fstack-protector -I %t | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -sdk %S/Inputs -primary-file %s -O -disable-sil-perf-optzns -disable-llvm-optzns -emit-ir -Xcc -fstack-protector -I %t | %FileCheck %s +// RUN: %target-swift-frontend -enable-objc-interop -sdk %S/Inputs -primary-file %s -O -disable-sil-perf-optzns -disable-llvm-optzns -emit-ir -Xcc -fstack-protector -I %t // RUN: %empty-directory(%t/Empty.framework/Modules/Empty.swiftmodule) // RUN: %target-swift-frontend -emit-module-path %t/Empty.framework/Modules/Empty.swiftmodule/%target-swiftmodule-name %S/../Inputs/empty.swift -module-name Empty -I %t -// RUN: %target-swift-frontend -sdk %S/Inputs -primary-file %s -I %t -F %t -DIMPORT_EMPTY -O -disable-sil-perf-optzns -disable-llvm-optzns -emit-ir -Xcc -fstack-protector -enable-objc-interop | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -sdk %S/Inputs -primary-file %s -I %t -F %t -DIMPORT_EMPTY -O -disable-sil-perf-optzns -disable-llvm-optzns -emit-ir -Xcc -fstack-protector -enable-objc-interop | %FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -primary-file %s -I %t -F %t -DIMPORT_EMPTY -O -disable-sil-perf-optzns -disable-llvm-optzns -emit-ir -Xcc -fstack-protector -enable-objc-interop // REQUIRES: CPU=i386 || CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/IRGen/clang_inline_reverse.swift b/test/IRGen/clang_inline_reverse.swift index d816c8ae3d860..522d11f912c1b 100644 --- a/test/IRGen/clang_inline_reverse.swift +++ b/test/IRGen/clang_inline_reverse.swift @@ -2,7 +2,8 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend -sdk %S/Inputs -primary-file %s -enable-objc-interop -emit-ir -module-name clang_inline -I %t | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -sdk %S/Inputs -primary-file %s -enable-objc-interop -emit-ir -module-name clang_inline -I %t | %FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -primary-file %s -enable-objc-interop -emit-ir -module-name clang_inline -I %t // REQUIRES: CPU=i386 || CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/IRGen/class.sil b/test/IRGen/class.sil index 9835044249759..2c779919dbca4 100644 --- a/test/IRGen/class.sil +++ b/test/IRGen/class.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-%target-import-type +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -emit-ir %s | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-%target-import-type +// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/class_bounded_generics.swift b/test/IRGen/class_bounded_generics.swift index 3ed961432b07b..eccf6390d3c38 100644 --- a/test/IRGen/class_bounded_generics.swift +++ b/test/IRGen/class_bounded_generics.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -module-name class_bounded_generics -enable-objc-interop -emit-ir -primary-file %s -disable-objc-attr-requires-foundation-module | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name class_bounded_generics -enable-objc-interop -emit-ir -primary-file %s -disable-objc-attr-requires-foundation-module | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -module-name class_bounded_generics -enable-objc-interop -emit-ir -primary-file %s -disable-objc-attr-requires-foundation-module // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/class_constraint.sil b/test/IRGen/class_constraint.sil index d404d8e204cca..698c542b9635b 100644 --- a/test/IRGen/class_constraint.sil +++ b/test/IRGen/class_constraint.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir -primary-file %s protocol P {} class A : P {} diff --git a/test/IRGen/class_field_other_module.swift b/test/IRGen/class_field_other_module.swift index 75f8578c345c5..8272b499e2826 100644 --- a/test/IRGen/class_field_other_module.swift +++ b/test/IRGen/class_field_other_module.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -emit-module-path=%t/other_class.swiftmodule %S/Inputs/other_class.swift -// RUN: %target-swift-frontend -I %t -emit-ir -O -enforce-exclusivity=unchecked %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir -O -enforce-exclusivity=unchecked %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -I %t -emit-ir -O -enforce-exclusivity=unchecked %s import other_class diff --git a/test/IRGen/class_isa_pointers.sil b/test/IRGen/class_isa_pointers.sil index dafb5c5531bd4..ad1a1afbe05bc 100644 --- a/test/IRGen/class_isa_pointers.sil +++ b/test/IRGen/class_isa_pointers.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/IRGen/class_resilience.sil b/test/IRGen/class_resilience.sil index 84fbd12eed59a..48d02e66818bb 100644 --- a/test/IRGen/class_resilience.sil +++ b/test/IRGen/class_resilience.sil @@ -1,8 +1,10 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_class.swiftmodule -module-name=resilient_class %S/../Inputs/resilient_class.swift -I %t -// RUN: %target-swift-frontend -enable-objc-interop -I %t -emit-ir -enable-library-evolution %s | %FileCheck %s --check-prefixes=CHECK,CHECK-objc -// RUN: %target-swift-frontend -disable-objc-interop -I %t -emit-ir -enable-library-evolution %s | %FileCheck %s --check-prefixes=CHECK,CHECK-native +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -I %t -emit-ir -enable-library-evolution %s | %FileCheck %s --check-prefixes=CHECK,CHECK-objc +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-objc-interop -I %t -emit-ir -enable-library-evolution %s | %FileCheck %s --check-prefixes=CHECK,CHECK-native +// RUN: %target-swift-frontend -enable-objc-interop -I %t -emit-ir -enable-library-evolution %s +// RUN: %target-swift-frontend -disable-objc-interop -I %t -emit-ir -enable-library-evolution %s // RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution -O %s // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/class_resilience.swift b/test/IRGen/class_resilience.swift index 5800ee4bd2205..d2cf6578fb44a 100644 --- a/test/IRGen/class_resilience.swift +++ b/test/IRGen/class_resilience.swift @@ -3,8 +3,10 @@ // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_enum.swiftmodule -module-name=resilient_enum -I %t %S/../Inputs/resilient_enum.swift // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_class.swiftmodule -module-name=resilient_class -I %t %S/../Inputs/resilient_class.swift -// RUN: %target-swift-frontend -enable-objc-interop -I %t -emit-ir -enable-library-evolution %t/class_resilience.swift | %FileCheck %t/class_resilience.swift --check-prefixes=CHECK,CHECK-objc,CHECK-objc%target-ptrsize,CHECK-%target-ptrsize,CHECK-%target-cpu,CHECK-%target-import-type-objc-STABLE-ABI-%target-mandates-stable-abi,CHECK-%target-sdk-name -DINT=i%target-ptrsize -D#MDWORDS=7 -D#MDSIZE32=52 -D#MDSIZE64=80 -D#WORDSIZE=%target-alignment -// RUN: %target-swift-frontend -disable-objc-interop -I %t -emit-ir -enable-library-evolution %t/class_resilience.swift | %FileCheck %t/class_resilience.swift --check-prefixes=CHECK,CHECK-native,CHECK-native%target-ptrsize,CHECK-%target-ptrsize,CHECK-%target-cpu,CHECK-native-STABLE-ABI-%target-mandates-stable-abi,CHECK-%target-sdk-name -DINT=i%target-ptrsize -D#MDWORDS=4 -D#MDSIZE32=40 -D#MDSIZE64=56 -D#WORDSIZE=%target-alignment +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -I %t -emit-ir -enable-library-evolution %t/class_resilience.swift | %FileCheck %t/class_resilience.swift --check-prefixes=CHECK,CHECK-objc,CHECK-objc%target-ptrsize,CHECK-%target-ptrsize,CHECK-%target-cpu,CHECK-%target-import-type-objc-STABLE-ABI-%target-mandates-stable-abi,CHECK-%target-sdk-name -DINT=i%target-ptrsize -D#MDWORDS=7 -D#MDSIZE32=52 -D#MDSIZE64=80 -D#WORDSIZE=%target-alignment +// RUN: %target-swift-frontend -enable-objc-interop -I %t -emit-ir -enable-library-evolution %t/class_resilience.swift +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-objc-interop -I %t -emit-ir -enable-library-evolution %t/class_resilience.swift | %FileCheck %t/class_resilience.swift --check-prefixes=CHECK,CHECK-native,CHECK-native%target-ptrsize,CHECK-%target-ptrsize,CHECK-%target-cpu,CHECK-native-STABLE-ABI-%target-mandates-stable-abi,CHECK-%target-sdk-name -DINT=i%target-ptrsize -D#MDWORDS=4 -D#MDSIZE32=40 -D#MDSIZE64=56 -D#WORDSIZE=%target-alignment +// RUN: %target-swift-frontend -disable-objc-interop -I %t -emit-ir -enable-library-evolution %t/class_resilience.swift // RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution -O %t/class_resilience.swift // CHECK: @"$s16class_resilience26ClassWithResilientPropertyC1s16resilient_struct4SizeVvpWvd" = hidden global [[INT]] 0 diff --git a/test/IRGen/class_resilience_objc.swift b/test/IRGen/class_resilience_objc.swift index 459d4465033d1..9c4b38b4ee1a6 100644 --- a/test/IRGen/class_resilience_objc.swift +++ b/test/IRGen/class_resilience_objc.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_objc_class.swiftmodule -module-name=resilient_objc_class %S/../Inputs/resilient_objc_class.swift -I %t -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %t -enable-library-evolution -emit-ir -o - -primary-file %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers -I %t -enable-library-evolution -emit-ir -o - -primary-file %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %t -enable-library-evolution -emit-ir -o - -primary-file %s // This is XFAILed on these targets because they're 32-bit but support tagged pointers. // The test is cloned as class_resilience_objc_armv7k.swift for them. diff --git a/test/IRGen/class_resilience_thunks.swift b/test/IRGen/class_resilience_thunks.swift index eb74903da47d1..407e39439998a 100644 --- a/test/IRGen/class_resilience_thunks.swift +++ b/test/IRGen/class_resilience_thunks.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_class_thunks.swiftmodule -module-name=resilient_class_thunks %S/../Inputs/resilient_class_thunks.swift -// RUN: %target-swift-frontend -I %t -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend -I %t -emit-ir %s // RUN: %target-swift-frontend -I %t -emit-ir -O %s // CHECK: %swift.type = type { [[INT:i32|i64]] } diff --git a/test/IRGen/class_stack_alloc.sil b/test/IRGen/class_stack_alloc.sil index 37fc8a6731198..32225659b6265 100644 --- a/test/IRGen/class_stack_alloc.sil +++ b/test/IRGen/class_stack_alloc.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -stack-promotion-limit 48 -Onone -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -stack-promotion-limit 48 -Onone -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -stack-promotion-limit 48 -Onone -emit-ir %s import Builtin import Swift diff --git a/test/IRGen/class_update_callback_with_fixed_layout.sil b/test/IRGen/class_update_callback_with_fixed_layout.sil index a02ec04c2ba80..65b07457545cb 100644 --- a/test/IRGen/class_update_callback_with_fixed_layout.sil +++ b/test/IRGen/class_update_callback_with_fixed_layout.sil @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift -// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %s -read-legacy-type-info-path=%S/Inputs/legacy_type_info/a.yaml | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir -enable-library-evolution %s -read-legacy-type-info-path=%S/Inputs/legacy_type_info/a.yaml | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %s -read-legacy-type-info-path=%S/Inputs/legacy_type_info/a.yaml // RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution -O %s -read-legacy-type-info-path=%S/Inputs/legacy_type_info/a.yaml // Verify that this feature works with the VFS. diff --git a/test/IRGen/class_update_callback_with_stub.swift b/test/IRGen/class_update_callback_with_stub.swift index 68de49da0d959..70efdbf07bce6 100644 --- a/test/IRGen/class_update_callback_with_stub.swift +++ b/test/IRGen/class_update_callback_with_stub.swift @@ -3,7 +3,8 @@ // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_struct.swiftmodule -I %t %S/../Inputs/resilient_struct.swift // RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -emit-module-path %t/resilient_class.swiftmodule -enable-library-evolution %S/../Inputs/resilient_class.swift // RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -emit-module-path %t/resilient_objc_class.swiftmodule -enable-library-evolution %S/../Inputs/resilient_objc_class.swift -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -I %t -emit-ir -enable-library-evolution -target %target-next-stable-abi-triple %s > %t/out +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers -I %t -emit-ir -enable-library-evolution -target %target-next-stable-abi-triple %s > %t/out +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -I %t -emit-ir -enable-library-evolution -target %target-next-stable-abi-triple %s // RUN: %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-runtime -DINT=i%target-ptrsize < %t/out // RUN: %FileCheck %s --check-prefix=NEGATIVE < %t/out diff --git a/test/IRGen/class_update_callback_without_fixed_layout.sil b/test/IRGen/class_update_callback_without_fixed_layout.sil index 13d7ea315b37b..6138b38895b7d 100644 --- a/test/IRGen/class_update_callback_without_fixed_layout.sil +++ b/test/IRGen/class_update_callback_without_fixed_layout.sil @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift -// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %s -target %target-pre-stable-abi-triple | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-OLD --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-OLD-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir -enable-library-evolution %s -target %target-pre-stable-abi-triple | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-OLD --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-OLD-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %s -target %target-pre-stable-abi-triple // RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution -O %s -target %target-pre-stable-abi-triple // REQUIRES: objc_interop diff --git a/test/IRGen/class_update_callback_without_fixed_layout_stable_abi.sil b/test/IRGen/class_update_callback_without_fixed_layout_stable_abi.sil index 1afdce5f73de7..03c8fe7dabe3f 100644 --- a/test/IRGen/class_update_callback_without_fixed_layout_stable_abi.sil +++ b/test/IRGen/class_update_callback_without_fixed_layout_stable_abi.sil @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift -// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %S/class_update_callback_without_fixed_layout.sil -target %target-stable-abi-triple | %FileCheck %S/class_update_callback_without_fixed_layout.sil --check-prefix=CHECK --check-prefix=CHECK-NEW --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-NEW-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir -enable-library-evolution %S/class_update_callback_without_fixed_layout.sil -target %target-stable-abi-triple | %FileCheck %S/class_update_callback_without_fixed_layout.sil --check-prefix=CHECK --check-prefix=CHECK-NEW --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-NEW-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %S/class_update_callback_without_fixed_layout.sil -target %target-stable-abi-triple // RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution -O %S/class_update_callback_without_fixed_layout.sil -target %target-stable-abi-triple // REQUIRES: objc_interop diff --git a/test/IRGen/class_with_stub_initializers.swift b/test/IRGen/class_with_stub_initializers.swift index 80aac7bfb118f..4c1cc0b330101 100644 --- a/test/IRGen/class_with_stub_initializers.swift +++ b/test/IRGen/class_with_stub_initializers.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir // REQUIRES: objc_interop diff --git a/test/IRGen/closure.swift b/test/IRGen/closure.swift index 6c99299cba4ae..eb3b5b6e29f39 100644 --- a/test/IRGen/closure.swift +++ b/test/IRGen/closure.swift @@ -1,6 +1,7 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s -// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CAPTURE -// RUN: %target-swift-frontend -primary-file %s -O -emit-ir | %FileCheck %s --check-prefix=OPT +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CAPTURE +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -O -emit-ir | %FileCheck %s --check-prefix=OPT // REQUIRES: PTRSIZE=64 diff --git a/test/IRGen/concrete_inherits_generic_base.swift b/test/IRGen/concrete_inherits_generic_base.swift index 24f01cb197daf..7ef747516b933 100644 --- a/test/IRGen/concrete_inherits_generic_base.swift +++ b/test/IRGen/concrete_inherits_generic_base.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -module-name foo -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name foo -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -module-name foo -emit-ir %s // CHECK: %swift.type = type { [[INT]] } diff --git a/test/IRGen/conditional-dead-strip-ir.swift b/test/IRGen/conditional-dead-strip-ir.swift index fabb68a988c00..0807e810a5719 100644 --- a/test/IRGen/conditional-dead-strip-ir.swift +++ b/test/IRGen/conditional-dead-strip-ir.swift @@ -2,7 +2,8 @@ // enum, protocol, and protocol conformance records as conditionally removable // via !llvm.used.conditional metadata. -// RUN: %target-build-swift -Xfrontend -conditional-runtime-records -Xfrontend -disable-objc-interop %s -emit-ir -o - | %FileCheck %s +// RUN: %target-build-swift %use_no_opaque_pointers -Xfrontend -conditional-runtime-records -Xfrontend -disable-objc-interop %s -emit-ir -o - | %FileCheck %s +// RUN: %target-build-swift -Xfrontend -conditional-runtime-records -Xfrontend -disable-objc-interop %s -emit-ir -o - public protocol TheProtocol { } diff --git a/test/IRGen/conditional_conformances.swift b/test/IRGen/conditional_conformances.swift index 7e41923027dd7..28ae22f52d592 100644 --- a/test/IRGen/conditional_conformances.swift +++ b/test/IRGen/conditional_conformances.swift @@ -1,7 +1,13 @@ -// RUN: %target-swift-frontend -disable-generic-metadata-prespecialization -emit-ir %S/../Inputs/conditional_conformance_basic_conformances.swift | %FileCheck %S/../Inputs/conditional_conformance_basic_conformances.swift --check-prefix=CHECK --check-prefix=CHECK-STABLE-ABI-%target-mandates-stable-abi -// RUN: %target-swift-frontend -disable-generic-metadata-prespecialization -emit-ir %S/../Inputs/conditional_conformance_with_assoc.swift | %FileCheck %S/../Inputs/conditional_conformance_with_assoc.swift --check-prefix=CHECK --check-prefix=CHECK-STABLE-ABI-%target-mandates-stable-abi -// RUN: %target-swift-frontend -disable-generic-metadata-prespecialization -emit-ir %S/../Inputs/conditional_conformance_subclass.swift | %FileCheck %S/../Inputs/conditional_conformance_subclass.swift --check-prefix=CHECK --check-prefix=CHECK-STABLE-ABI-%target-mandates-stable-abi -// RUN: %target-swift-frontend -disable-generic-metadata-prespecialization -emit-ir %S/../Inputs/conditional_conformance_recursive.swift | %FileCheck %S/../Inputs/conditional_conformance_recursive.swift --check-prefix=CHECK --check-prefix=CHECK-STABLE-ABI-%target-mandates-stable-abi +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-generic-metadata-prespecialization -emit-ir %S/../Inputs/conditional_conformance_basic_conformances.swift | %FileCheck %S/../Inputs/conditional_conformance_basic_conformances.swift --check-prefix=CHECK --check-prefix=CHECK-STABLE-ABI-%target-mandates-stable-abi +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-generic-metadata-prespecialization -emit-ir %S/../Inputs/conditional_conformance_with_assoc.swift | %FileCheck %S/../Inputs/conditional_conformance_with_assoc.swift --check-prefix=CHECK --check-prefix=CHECK-STABLE-ABI-%target-mandates-stable-abi +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-generic-metadata-prespecialization -emit-ir %S/../Inputs/conditional_conformance_subclass.swift | %FileCheck %S/../Inputs/conditional_conformance_subclass.swift --check-prefix=CHECK --check-prefix=CHECK-STABLE-ABI-%target-mandates-stable-abi +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-generic-metadata-prespecialization -emit-ir %S/../Inputs/conditional_conformance_recursive.swift | %FileCheck %S/../Inputs/conditional_conformance_recursive.swift --check-prefix=CHECK --check-prefix=CHECK-STABLE-ABI-%target-mandates-stable-abi + +// RUN: %target-swift-frontend -disable-generic-metadata-prespecialization -emit-ir %S/../Inputs/conditional_conformance_basic_conformances.swift +// RUN: %target-swift-frontend -disable-generic-metadata-prespecialization -emit-ir %S/../Inputs/conditional_conformance_with_assoc.swift +// RUN: %target-swift-frontend -disable-generic-metadata-prespecialization -emit-ir %S/../Inputs/conditional_conformance_subclass.swift +// RUN: %target-swift-frontend -disable-generic-metadata-prespecialization -emit-ir %S/../Inputs/conditional_conformance_recursive.swift + // Too many pointer-sized integers in the IR // REQUIRES: PTRSIZE=64 diff --git a/test/IRGen/conditional_conformances_class_with_defaulted_method.swift b/test/IRGen/conditional_conformances_class_with_defaulted_method.swift index 536ed8b80ad4e..c463c59d1034c 100644 --- a/test/IRGen/conditional_conformances_class_with_defaulted_method.swift +++ b/test/IRGen/conditional_conformances_class_with_defaulted_method.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s -module-name x | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s -module-name x | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s -module-name x // rdar://problem/40078863 - witness signatures get adjusted and the // ProtocolConformances accompanying them did not, resulting in an extra witness diff --git a/test/IRGen/conditional_conformances_future.swift b/test/IRGen/conditional_conformances_future.swift index 03df2b2f64380..6121f8e879bbd 100644 --- a/test/IRGen/conditional_conformances_future.swift +++ b/test/IRGen/conditional_conformances_future.swift @@ -1,7 +1,12 @@ -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir %S/../Inputs/conditional_conformance_basic_conformances.swift | %FileCheck %S/../Inputs/conditional_conformance_basic_conformances_future.swift -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=%target-os -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir %S/../Inputs/conditional_conformance_with_assoc.swift | %FileCheck %S/../Inputs/conditional_conformance_with_assoc_future.swift -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=CHECK-STABLE-ABI-%target-mandates-stable-abi -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir %S/../Inputs/conditional_conformance_subclass.swift | %FileCheck %S/../Inputs/conditional_conformance_subclass_future.swift -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=CHECK-STABLE-ABI-%target-mandates-stable-abi -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir %S/../Inputs/conditional_conformance_recursive.swift | %FileCheck %S/../Inputs/conditional_conformance_recursive.swift -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=CHECK-STABLE-ABI-%target-mandates-stable-abi +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %S/../Inputs/conditional_conformance_basic_conformances.swift | %FileCheck %S/../Inputs/conditional_conformance_basic_conformances_future.swift -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=%target-os +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %S/../Inputs/conditional_conformance_with_assoc.swift | %FileCheck %S/../Inputs/conditional_conformance_with_assoc_future.swift -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=CHECK-STABLE-ABI-%target-mandates-stable-abi +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %S/../Inputs/conditional_conformance_subclass.swift | %FileCheck %S/../Inputs/conditional_conformance_subclass_future.swift -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=CHECK-STABLE-ABI-%target-mandates-stable-abi +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %S/../Inputs/conditional_conformance_recursive.swift | %FileCheck %S/../Inputs/conditional_conformance_recursive.swift -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=CHECK-STABLE-ABI-%target-mandates-stable-abi + +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir %S/../Inputs/conditional_conformance_basic_conformances.swift +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir %S/../Inputs/conditional_conformance_with_assoc.swift +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir %S/../Inputs/conditional_conformance_subclass.swift +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir %S/../Inputs/conditional_conformance_recursive.swift // Too many pointer-sized integers in the IR // REQUIRES: PTRSIZE=64 diff --git a/test/IRGen/conditional_conformances_gettypemetdatabyname.swift b/test/IRGen/conditional_conformances_gettypemetdatabyname.swift index a194e081a7a01..5ce41aa8a6e8f 100644 --- a/test/IRGen/conditional_conformances_gettypemetdatabyname.swift +++ b/test/IRGen/conditional_conformances_gettypemetdatabyname.swift @@ -1,7 +1,10 @@ -// RUN: %target-swift-frontend -disable-generic-metadata-prespecialization -target %target-cpu-apple-macosx10.15.4 -emit-ir %S/../Inputs/conditional_conformance_basic_conformances.swift | %FileCheck %S/../Inputs/conditional_conformance_basic_conformances.swift --check-prefix=TYPEBYNAME -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %target-cpu-apple-macosx99.99 -emit-ir %S/../Inputs/conditional_conformance_basic_conformances.swift | %FileCheck %S/../Inputs/conditional_conformance_basic_conformances.swift --check-prefix=TYPEBYNAME_PRESPECIALIZED -// RUN: %target-swift-frontend -target %target-cpu-apple-macosx10.15.4 -emit-ir %S/../Inputs/conditional_conformance_basic_conformances.swift | %FileCheck %S/../Inputs/conditional_conformance_basic_conformances.swift --check-prefix=CHECK --check-prefix=CHECK-STABLE-ABI-TRUE +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-generic-metadata-prespecialization -target %target-cpu-apple-macosx10.15.4 -emit-ir %S/../Inputs/conditional_conformance_basic_conformances.swift | %FileCheck %S/../Inputs/conditional_conformance_basic_conformances.swift --check-prefix=TYPEBYNAME +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %target-cpu-apple-macosx99.99 -emit-ir %S/../Inputs/conditional_conformance_basic_conformances.swift | %FileCheck %S/../Inputs/conditional_conformance_basic_conformances.swift --check-prefix=TYPEBYNAME_PRESPECIALIZED +// RUN: %target-swift-frontend %use_no_opaque_pointers -target %target-cpu-apple-macosx10.15.4 -emit-ir %S/../Inputs/conditional_conformance_basic_conformances.swift | %FileCheck %S/../Inputs/conditional_conformance_basic_conformances.swift --check-prefix=CHECK --check-prefix=CHECK-STABLE-ABI-TRUE +// RUN: %target-swift-frontend -disable-generic-metadata-prespecialization -target %target-cpu-apple-macosx10.15.4 -emit-ir %S/../Inputs/conditional_conformance_basic_conformances.swift +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %target-cpu-apple-macosx99.99 -emit-ir %S/../Inputs/conditional_conformance_basic_conformances.swift +// RUN: %target-swift-frontend -target %target-cpu-apple-macosx10.15.4 -emit-ir %S/../Inputs/conditional_conformance_basic_conformances.swift // Too many pointer-sized integers in the IR // REQUIRES: PTRSIZE=64 diff --git a/test/IRGen/conformance_access_path.swift b/test/IRGen/conformance_access_path.swift index 223de555d55f9..10a928328a079 100644 --- a/test/IRGen/conformance_access_path.swift +++ b/test/IRGen/conformance_access_path.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir > %t.ll +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir > %t.ll +// RUN: %target-swift-frontend -primary-file %s -emit-ir // RUN: %FileCheck %s < %t.ll diff --git a/test/IRGen/conformance_resilience.swift b/test/IRGen/conformance_resilience.swift index 20ed53182b6c2..c27a765d360ba 100644 --- a/test/IRGen/conformance_resilience.swift +++ b/test/IRGen/conformance_resilience.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -static -enable-library-evolution -emit-module-path=%t/resilient_protocol.swiftmodule -module-name=resilient_protocol %S/../Inputs/resilient_protocol.swift -// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir -enable-library-evolution %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %s // RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution -O %s import resilient_protocol diff --git a/test/IRGen/dead_method.swift b/test/IRGen/dead_method.swift index 1c31093657717..55ec4c91a4de1 100644 --- a/test/IRGen/dead_method.swift +++ b/test/IRGen/dead_method.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -O | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -O | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %s -emit-ir -O // Test to make sure that methods removed by dead code elimination still appear // in the vtable in both the nominal type descriptor and class metadata. diff --git a/test/IRGen/dependent_reabstraction.swift b/test/IRGen/dependent_reabstraction.swift index f8a77405c8ee2..a019216f06c51 100644 --- a/test/IRGen/dependent_reabstraction.swift +++ b/test/IRGen/dependent_reabstraction.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s func markUsed(_ t: T) {} diff --git a/test/IRGen/deserialize-clang-importer-witness-tables.swift b/test/IRGen/deserialize-clang-importer-witness-tables.swift index 1615700021ad3..ad3fc2ec4c7b4 100644 --- a/test/IRGen/deserialize-clang-importer-witness-tables.swift +++ b/test/IRGen/deserialize-clang-importer-witness-tables.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -swift-version 4 -emit-module -o %t/regex.swiftmodule %S/Inputs/deserialize-clang-importer-witness-tables/regex.swift -// RUN: %target-swift-frontend -swift-version 4 -emit-ir %s -I %t | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -swift-version 4 -emit-ir %s -I %t | %FileCheck %s +// RUN: %target-swift-frontend -swift-version 4 -emit-ir %s -I %t // REQUIRES: objc_interop import regex diff --git a/test/IRGen/disable-instantiation-cache.swift b/test/IRGen/disable-instantiation-cache.swift index 59e8cd356c133..aa8cfa5d7458e 100644 --- a/test/IRGen/disable-instantiation-cache.swift +++ b/test/IRGen/disable-instantiation-cache.swift @@ -1,6 +1,9 @@ // RUN: %empty-directory(%t) -// RUN: %target-swift-frontend -module-name main %s -emit-ir | %FileCheck %s --check-prefix=CHECK-CACHE -// RUN: %target-swift-frontend -module-name main %s -emit-ir -disable-preallocated-instantiation-caches | %FileCheck %s --check-prefix=CHECK-NOCACHE +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name main %s -emit-ir | %FileCheck %s --check-prefix=CHECK-CACHE +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name main %s -emit-ir -disable-preallocated-instantiation-caches | %FileCheck %s --check-prefix=CHECK-NOCACHE +// RUN: %target-swift-frontend -module-name main %s -emit-ir +// RUN: %target-swift-frontend -module-name main %s -emit-ir -disable-preallocated-instantiation-caches + public class Generic { public func m1(t: T) -> T { return t } diff --git a/test/IRGen/dllexport.swift b/test/IRGen/dllexport.swift index 3fcc5a365e64c..031614531914a 100644 --- a/test/IRGen/dllexport.swift +++ b/test/IRGen/dllexport.swift @@ -1,5 +1,8 @@ -// RUN: %swift -target thumbv7--windows-itanium -emit-ir -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name dllexport %s -o - | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-NO-OPT -// RUN: %swift -target thumbv7--windows-itanium -O -emit-ir -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name dllexport %s -o - | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-OPT +// RUN: %swift %use_no_opaque_pointers -target thumbv7--windows-itanium -emit-ir -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name dllexport %s -o - | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-NO-OPT +// RUN: %swift %use_no_opaque_pointers -target thumbv7--windows-itanium -O -emit-ir -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name dllexport %s -o - | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-OPT +// RUN: %swift -target thumbv7--windows-itanium -emit-ir -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name dllexport %s -o - +// RUN: %swift -target thumbv7--windows-itanium -O -emit-ir -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name dllexport %s -o - + // REQUIRES: CODEGENERATOR=ARM diff --git a/test/IRGen/dllimport.swift b/test/IRGen/dllimport.swift index 5fe5a98f79b57..5d78dfbdaf4fc 100644 --- a/test/IRGen/dllimport.swift +++ b/test/IRGen/dllimport.swift @@ -1,5 +1,7 @@ -// RUN: %swift -Xllvm -sil-disable-pass=GenericSpecializer -target thumbv7--windows-itanium -emit-ir -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name dllimport %s -o - -enable-source-import -I %S | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-NO-OPT -// RUN: %swift -Xllvm -sil-disable-pass=GenericSpecializer -target thumbv7--windows-itanium -O -emit-ir -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name dllimport -primary-file %s -o - -enable-source-import -I %S | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-OPT +// RUN: %swift %use_no_opaque_pointers -Xllvm -sil-disable-pass=GenericSpecializer -target thumbv7--windows-itanium -emit-ir -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name dllimport %s -o - -enable-source-import -I %S | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-NO-OPT +// RUN: %swift -Xllvm -sil-disable-pass=GenericSpecializer -target thumbv7--windows-itanium -emit-ir -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name dllimport %s -o - -enable-source-import -I %S +// RUN: %swift %use_no_opaque_pointers -Xllvm -sil-disable-pass=GenericSpecializer -target thumbv7--windows-itanium -O -emit-ir -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name dllimport -primary-file %s -o - -enable-source-import -I %S | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-OPT +// RUN: %swift -Xllvm -sil-disable-pass=GenericSpecializer -target thumbv7--windows-itanium -O -emit-ir -parse-as-library -disable-legacy-type-info -parse-stdlib -module-name dllimport -primary-file %s -o - -enable-source-import -I %S // REQUIRES: CODEGENERATOR=ARM diff --git a/test/IRGen/dynamic_cast.sil b/test/IRGen/dynamic_cast.sil index ef8ed262b24f8..bfeeaca6887d8 100644 --- a/test/IRGen/dynamic_cast.sil +++ b/test/IRGen/dynamic_cast.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -emit-ir %s // REQUIRES: CPU=i386 || CPU=x86_64 diff --git a/test/IRGen/dynamic_init.sil b/test/IRGen/dynamic_init.sil index 1d063ff981d25..39d5ec867e8c3 100644 --- a/test/IRGen/dynamic_init.sil +++ b/test/IRGen/dynamic_init.sil @@ -1,5 +1,8 @@ -// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s --check-prefixes=CHECK,CHECK-objc -// RUN: %target-swift-frontend -disable-objc-interop -emit-ir %s | %FileCheck %s --check-prefixes=CHECK,CHECK-native +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -emit-ir %s | %FileCheck %s --check-prefixes=CHECK,CHECK-objc +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-objc-interop -emit-ir %s | %FileCheck %s --check-prefixes=CHECK,CHECK-native +// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s +// RUN: %target-swift-frontend -disable-objc-interop -emit-ir %s + // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/dynamic_lookup.sil b/test/IRGen/dynamic_lookup.sil index 50dcca3fd2ed5..b0e3482ad790f 100644 --- a/test/IRGen/dynamic_lookup.sil +++ b/test/IRGen/dynamic_lookup.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s // REQUIRES: CPU=i386 || CPU=x86_64 diff --git a/test/IRGen/dynamic_replaceable.sil b/test/IRGen/dynamic_replaceable.sil index 15cb46788d38f..a16acdacc02b9 100644 --- a/test/IRGen/dynamic_replaceable.sil +++ b/test/IRGen/dynamic_replaceable.sil @@ -1,5 +1,8 @@ -// RUN: %target-swift-frontend %s -emit-ir -disable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=COMPAT -// RUN: %target-swift-frontend %s -emit-ir -disable-objc-interop -target x86_64-apple-macosx10.15 | %FileCheck %s --check-prefix=CHECK --check-prefix=NONCOMPAT +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -disable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=COMPAT +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -disable-objc-interop -target x86_64-apple-macosx10.15 | %FileCheck %s --check-prefix=CHECK --check-prefix=NONCOMPAT +// RUN: %target-swift-frontend %s -emit-ir -disable-objc-interop +// RUN: %target-swift-frontend %s -emit-ir -disable-objc-interop -target x86_64-apple-macosx10.15 + // REQUIRES: objc_interop diff --git a/test/IRGen/dynamic_replaceable_coroutine.swift b/test/IRGen/dynamic_replaceable_coroutine.swift index 262b37807b95c..4470f53f8f6b8 100644 --- a/test/IRGen/dynamic_replaceable_coroutine.swift +++ b/test/IRGen/dynamic_replaceable_coroutine.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -module-name A -enable-implicit-dynamic -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name A -enable-implicit-dynamic -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -module-name A -enable-implicit-dynamic -emit-ir %s extension Int { diff --git a/test/IRGen/dynamic_replaceable_opaque_return.swift b/test/IRGen/dynamic_replaceable_opaque_return.swift index 5c1c74ffc5e58..618d16ee1ee7b 100644 --- a/test/IRGen/dynamic_replaceable_opaque_return.swift +++ b/test/IRGen/dynamic_replaceable_opaque_return.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -disable-availability-checking -module-name A -swift-version 5 -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-availability-checking -module-name A -swift-version 5 -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -disable-availability-checking -module-name A -swift-version 5 -primary-file %s -emit-ir // The arm64e test is in ptrauth-dynamic_replaceable.sil. // UNSUPPORTED: CPU=arm64e diff --git a/test/IRGen/dynamic_self.sil b/test/IRGen/dynamic_self.sil index 8773300fb7c97..18e46524add90 100644 --- a/test/IRGen/dynamic_self.sil +++ b/test/IRGen/dynamic_self.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s // REQUIRES: CPU=i386 || CPU=x86_64 diff --git a/test/IRGen/dynamic_self_cast.swift b/test/IRGen/dynamic_self_cast.swift index 6e817da34695a..92be3653b85b3 100644 --- a/test/IRGen/dynamic_self_cast.swift +++ b/test/IRGen/dynamic_self_cast.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -disable-objc-interop %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -disable-objc-interop %s | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir -disable-objc-interop %s // Note: -disable-objc-interop is used to give consistent results on Darwin // and Linux, avoiding differences like %swift.refcounted -vs- %objc_object, diff --git a/test/IRGen/dynamic_self_metadata.swift b/test/IRGen/dynamic_self_metadata.swift index df29b25f428e8..acd18fd325e34 100644 --- a/test/IRGen/dynamic_self_metadata.swift +++ b/test/IRGen/dynamic_self_metadata.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -disable-generic-metadata-prespecialization %s -emit-ir -parse-as-library | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-generic-metadata-prespecialization %s -emit-ir -parse-as-library | %FileCheck %s +// RUN: %target-swift-frontend -disable-generic-metadata-prespecialization %s -emit-ir -parse-as-library // UNSUPPORTED: OS=windows-msvc // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/dynamic_self_metadata_future.swift b/test/IRGen/dynamic_self_metadata_future.swift index 96e4fe5526a6f..2ba71f973744f 100644 --- a/test/IRGen/dynamic_self_metadata_future.swift +++ b/test/IRGen/dynamic_self_metadata_future.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -prespecialize-generic-metadata %s -target %module-target-future -emit-ir -parse-as-library | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata %s -target %module-target-future -emit-ir -parse-as-library | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend -prespecialize-generic-metadata %s -target %module-target-future -emit-ir -parse-as-library // REQUIRES: VENDOR=apple || OS=linux-gnu diff --git a/test/IRGen/eager-class-initialization-stable-abi.swift b/test/IRGen/eager-class-initialization-stable-abi.swift index 68352ff236ea4..8f40538d2cf58 100644 --- a/test/IRGen/eager-class-initialization-stable-abi.swift +++ b/test/IRGen/eager-class-initialization-stable-abi.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %S/eager-class-initialization.swift -target %target-stable-abi-triple -emit-ir | %FileCheck %S/eager-class-initialization.swift -DINT=i%target-ptrsize --check-prefix=CHECK +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers %S/eager-class-initialization.swift -target %target-stable-abi-triple -emit-ir | %FileCheck %S/eager-class-initialization.swift -DINT=i%target-ptrsize --check-prefix=CHECK +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %S/eager-class-initialization.swift -target %target-stable-abi-triple -emit-ir // REQUIRES: objc_interop // REQUIRES: swift_stable_abi diff --git a/test/IRGen/eager-class-initialization.swift b/test/IRGen/eager-class-initialization.swift index d1cbaac3b228b..85f60d48ed48c 100644 --- a/test/IRGen/eager-class-initialization.swift +++ b/test/IRGen/eager-class-initialization.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -emit-ir -target %target-pre-stable-abi-triple | %FileCheck %s -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=CHECK-OLD +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers %s -emit-ir -target %target-pre-stable-abi-triple | %FileCheck %s -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=CHECK-OLD +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -emit-ir -target %target-pre-stable-abi-triple // REQUIRES: objc_interop // UNSUPPORTED: swift_only_stable_abi diff --git a/test/IRGen/empty_enum.swift b/test/IRGen/empty_enum.swift index 7939283519f05..4d0a2c5e03c54 100644 --- a/test/IRGen/empty_enum.swift +++ b/test/IRGen/empty_enum.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir // CHECK: @"$s10empty_enum6JamaisOMf" = // CHECK-SAME: {{@"\$sytWV"|i8\*\* getelementptr inbounds \(%swift.enum_vwtable, %swift.enum_vwtable\* @"\$s10empty_enum6JamaisOWV", i32 0, i32 0\)}} diff --git a/test/IRGen/enum.sil b/test/IRGen/enum.sil index fc30759bfe910..ea690cbb83867 100644 --- a/test/IRGen/enum.sil +++ b/test/IRGen/enum.sil @@ -1,7 +1,9 @@ // #if directives don't work with SIL keywords, therefore please put ObjC tests // in `enum_objc.sil`. -// RUN: %target-swift-frontend %s -Xllvm -sil-disable-pass=simplification -disable-type-layout -disable-generic-metadata-prespecialization -disable-generic-metadata-prespecialization -gnone -emit-ir -disable-diagnostic-passes -enable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-objc --check-prefix=CHECK-objc-%target-ptrsize --check-prefix=CHECK-objc-%target-ptrsize-simulator-%target-is-simulator -DWORD=i%target-ptrsize -// RUN: %target-swift-frontend %s -Xllvm -sil-disable-pass=simplification -disable-type-layout -disable-generic-metadata-prespecialization -gnone -emit-ir -disable-diagnostic-passes -disable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-native --check-prefix=CHECK-native-%target-ptrsize -DWORD=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -Xllvm -sil-disable-pass=simplification -disable-type-layout -disable-generic-metadata-prespecialization -disable-generic-metadata-prespecialization -gnone -emit-ir -disable-diagnostic-passes -enable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-objc --check-prefix=CHECK-objc-%target-ptrsize --check-prefix=CHECK-objc-%target-ptrsize-simulator-%target-is-simulator -DWORD=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -Xllvm -sil-disable-pass=simplification -disable-type-layout -disable-generic-metadata-prespecialization -gnone -emit-ir -disable-diagnostic-passes -disable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-native --check-prefix=CHECK-native-%target-ptrsize -DWORD=i%target-ptrsize +// RUN: %target-swift-frontend %s -Xllvm -sil-disable-pass=simplification -disable-type-layout -disable-generic-metadata-prespecialization -disable-generic-metadata-prespecialization -gnone -emit-ir -disable-diagnostic-passes -enable-objc-interop +// RUN: %target-swift-frontend %s -Xllvm -sil-disable-pass=simplification -disable-type-layout -disable-generic-metadata-prespecialization -gnone -emit-ir -disable-diagnostic-passes -disable-objc-interop // REQUIRES: CPU=i386 || CPU=x86_64 diff --git a/test/IRGen/enum_32_bit.sil b/test/IRGen/enum_32_bit.sil index 0661027e26ca4..d471e8f949b1b 100644 --- a/test/IRGen/enum_32_bit.sil +++ b/test/IRGen/enum_32_bit.sil @@ -1,5 +1,7 @@ -// RUN: %swift -disable-legacy-type-info -target i386-apple-ios7 %s -gnone -emit-ir | %FileCheck %s -// RUN: %swift -disable-legacy-type-info -target armv7-apple-ios7 %s -gnone -emit-ir | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target i386-apple-ios7 %s -gnone -emit-ir | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target armv7-apple-ios7 %s -gnone -emit-ir | %FileCheck %s +// RUN: %swift -disable-legacy-type-info -target i386-apple-ios7 %s -gnone -emit-ir +// RUN: %swift -disable-legacy-type-info -target armv7-apple-ios7 %s -gnone -emit-ir // REQUIRES: CODEGENERATOR=X86 // REQUIRES: CODEGENERATOR=ARM diff --git a/test/IRGen/enum_derived.swift b/test/IRGen/enum_derived.swift index 22c7fc82892fc..1710d73f3928d 100644 --- a/test/IRGen/enum_derived.swift +++ b/test/IRGen/enum_derived.swift @@ -1,7 +1,10 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -module-name def_enum -o %t %S/Inputs/def_enum.swift -// RUN: %target-swift-frontend -I %t -O -primary-file %s -emit-ir | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-NORMAL %s -// RUN: %target-swift-frontend -I %t -O -primary-file %s -enable-testing -emit-ir | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-TESTABLE %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -O -primary-file %s -emit-ir | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-NORMAL %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -O -primary-file %s -enable-testing -emit-ir | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-TESTABLE %s +// RUN: %target-swift-frontend -I %t -O -primary-file %s -emit-ir +// RUN: %target-swift-frontend -I %t -O -primary-file %s -enable-testing -emit-ir + import def_enum diff --git a/test/IRGen/enum_dynamic_multi_payload.sil b/test/IRGen/enum_dynamic_multi_payload.sil index f4f4888c29fd6..55ff3eb499796 100644 --- a/test/IRGen/enum_dynamic_multi_payload.sil +++ b/test/IRGen/enum_dynamic_multi_payload.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -disable-type-layout %s -gnone -emit-ir -I %S/Inputs | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout %s -gnone -emit-ir -I %S/Inputs | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -disable-type-layout %s -gnone -emit-ir -I %S/Inputs import Builtin diff --git a/test/IRGen/enum_function.sil b/test/IRGen/enum_function.sil index 8329c82ccbf6d..b8df000b09c92 100644 --- a/test/IRGen/enum_function.sil +++ b/test/IRGen/enum_function.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -gnone -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -gnone -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend -primary-file %s -gnone -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/enum_future.sil b/test/IRGen/enum_future.sil index 556a5a9dbe487..6814d3f5c944c 100644 --- a/test/IRGen/enum_future.sil +++ b/test/IRGen/enum_future.sil @@ -1,7 +1,9 @@ // #if directives don't work with SIL keywords, therefore please put ObjC tests // in `enum_objc.sil`. -// RUN: %target-swift-frontend -disable-type-layout -prespecialize-generic-metadata %s -Xllvm -sil-disable-pass=simplification -target %module-target-future -gnone -emit-ir -disable-diagnostic-passes -enable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-objc --check-prefix=CHECK-objc-%target-ptrsize --check-prefix=CHECK-objc-%target-ptrsize-simulator-%target-is-simulator -DWORD=i%target-ptrsize -// RUN: %target-swift-frontend -disable-type-layout -prespecialize-generic-metadata %s -Xllvm -sil-disable-pass=simplification -target %module-target-future -gnone -emit-ir -disable-diagnostic-passes -disable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-native --check-prefix=CHECK-native-%target-ptrsize -DWORD=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout -prespecialize-generic-metadata %s -Xllvm -sil-disable-pass=simplification -target %module-target-future -gnone -emit-ir -disable-diagnostic-passes -enable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-objc --check-prefix=CHECK-objc-%target-ptrsize --check-prefix=CHECK-objc-%target-ptrsize-simulator-%target-is-simulator -DWORD=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout -prespecialize-generic-metadata %s -Xllvm -sil-disable-pass=simplification -target %module-target-future -gnone -emit-ir -disable-diagnostic-passes -disable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-native --check-prefix=CHECK-native-%target-ptrsize -DWORD=i%target-ptrsize +// RUN: %target-swift-frontend -disable-type-layout -prespecialize-generic-metadata %s -Xllvm -sil-disable-pass=simplification -target %module-target-future -gnone -emit-ir -disable-diagnostic-passes -enable-objc-interop +// RUN: %target-swift-frontend -disable-type-layout -prespecialize-generic-metadata %s -Xllvm -sil-disable-pass=simplification -target %module-target-future -gnone -emit-ir -disable-diagnostic-passes -disable-objc-interop // REQUIRES: CPU=i386 || CPU=x86_64 // REQUIRES: VENDOR=apple || OS=linux-gnu diff --git a/test/IRGen/enum_objc.sil b/test/IRGen/enum_objc.sil index 478e55ea99509..87c8e9449c106 100644 --- a/test/IRGen/enum_objc.sil +++ b/test/IRGen/enum_objc.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -gnone -emit-ir -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-ptrsize-simulator-%target-is-simulator +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -gnone -emit-ir -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-ptrsize-simulator-%target-is-simulator +// RUN: %target-swift-frontend %s -gnone -emit-ir -disable-objc-attr-requires-foundation-module -enable-objc-interop // REQUIRES: CPU=i386 || CPU=x86_64 diff --git a/test/IRGen/enum_resilience.swift b/test/IRGen/enum_resilience.swift index 3f752ef15f515..3c07206493d1b 100644 --- a/test/IRGen/enum_resilience.swift +++ b/test/IRGen/enum_resilience.swift @@ -3,10 +3,13 @@ // RUN: %{python} %utils/chex.py < %s > %t/enum_resilience.swift // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift -// RUN: %target-swift-frontend -disable-type-layout -emit-ir -enable-library-evolution -module-name=resilient_enum -I %t %S/../Inputs/resilient_enum.swift | %FileCheck %t/enum_resilience.swift --check-prefix=ENUM_RES -// RUN: %target-swift-frontend -disable-type-layout -emit-ir -module-name=resilient_enum -I %t %S/../Inputs/resilient_enum.swift | %FileCheck %t/enum_resilience.swift --check-prefix=ENUM_NOT_RES +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout -emit-ir -enable-library-evolution -module-name=resilient_enum -I %t %S/../Inputs/resilient_enum.swift | %FileCheck %t/enum_resilience.swift --check-prefix=ENUM_RES +// RUN: %target-swift-frontend -disable-type-layout -emit-ir -enable-library-evolution -module-name=resilient_enum -I %t %S/../Inputs/resilient_enum.swift +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout -emit-ir -module-name=resilient_enum -I %t %S/../Inputs/resilient_enum.swift | %FileCheck %t/enum_resilience.swift --check-prefix=ENUM_NOT_RES +// RUN: %target-swift-frontend -disable-type-layout -emit-ir -module-name=resilient_enum -I %t %S/../Inputs/resilient_enum.swift // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_enum.swiftmodule -module-name=resilient_enum -I %t %S/../Inputs/resilient_enum.swift -// RUN: %target-swift-frontend -disable-type-layout -module-name enum_resilience -I %t -emit-ir -enable-library-evolution %s | %FileCheck %t/enum_resilience.swift -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-cpu +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout -module-name enum_resilience -I %t -emit-ir -enable-library-evolution %s | %FileCheck %t/enum_resilience.swift -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-cpu +// RUN: %target-swift-frontend -disable-type-layout -module-name enum_resilience -I %t -emit-ir -enable-library-evolution %s // RUN: %target-swift-frontend -module-name enum_resilience -I %t -emit-ir -enable-library-evolution -O %s import resilient_enum diff --git a/test/IRGen/enum_singleton.swift b/test/IRGen/enum_singleton.swift index ea3f69e716792..f64a07120c3b0 100644 --- a/test/IRGen/enum_singleton.swift +++ b/test/IRGen/enum_singleton.swift @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefix=CHECK -// RUN: %target-swift-frontend -emit-ir -O %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-OPT +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s --check-prefix=CHECK +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -O %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-OPT +// RUN: %target-swift-frontend -emit-ir %s +// RUN: %target-swift-frontend -emit-ir -O %s public enum Payload { case c1(Bool) diff --git a/test/IRGen/enum_switch_singleton_enum_in_optional.sil b/test/IRGen/enum_switch_singleton_enum_in_optional.sil index 42a3f464cf959..5a0b94f029da3 100644 --- a/test/IRGen/enum_switch_singleton_enum_in_optional.sil +++ b/test/IRGen/enum_switch_singleton_enum_in_optional.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s sil_stage canonical enum Optional { case some(T), none } diff --git a/test/IRGen/enum_value_semantics.sil b/test/IRGen/enum_value_semantics.sil index 337204f9d3755..b7167571232a6 100644 --- a/test/IRGen/enum_value_semantics.sil +++ b/test/IRGen/enum_value_semantics.sil @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend %s -disable-type-layout -disable-generic-metadata-prespecialization -gnone -emit-ir -enable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-objc --check-prefix=CHECK-objc-simulator-%target-is-simulator --check-prefix=CHECK-objc-%target-ptrsize --check-prefix=CHECK-%target-os --check-prefix=CHECK-objc-%target-os -// RUN: %target-swift-frontend %s -disable-type-layout -disable-generic-metadata-prespecialization -gnone -emit-ir -disable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-native --check-prefix=CHECK-native-%target-ptrsize --check-prefix=CHECK-%target-os --check-prefix=CHECK-native-%target-os +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -disable-type-layout -disable-generic-metadata-prespecialization -gnone -emit-ir -enable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-objc --check-prefix=CHECK-objc-simulator-%target-is-simulator --check-prefix=CHECK-objc-%target-ptrsize --check-prefix=CHECK-%target-os --check-prefix=CHECK-objc-%target-os +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -disable-type-layout -disable-generic-metadata-prespecialization -gnone -emit-ir -disable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-native --check-prefix=CHECK-native-%target-ptrsize --check-prefix=CHECK-%target-os --check-prefix=CHECK-native-%target-os +// RUN: %target-swift-frontend %s -disable-type-layout -disable-generic-metadata-prespecialization -gnone -emit-ir -enable-objc-interop +// RUN: %target-swift-frontend %s -disable-type-layout -disable-generic-metadata-prespecialization -gnone -emit-ir -disable-objc-interop // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/enum_value_semantics_future.sil b/test/IRGen/enum_value_semantics_future.sil index fd3485045d5fa..a89182f09c9bf 100644 --- a/test/IRGen/enum_value_semantics_future.sil +++ b/test/IRGen/enum_value_semantics_future.sil @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -disable-type-layout -prespecialize-generic-metadata %s -target %module-target-future -gnone -emit-ir -enable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-objc --check-prefix=CHECK-objc-simulator-%target-is-simulator --check-prefix=CHECK-objc-%target-ptrsize --check-prefix=CHECK-%target-os --check-prefix=CHECK-objc-%target-os -// RUN: %target-swift-frontend -disable-type-layout -prespecialize-generic-metadata %s -target %module-target-future -gnone -emit-ir -disable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-native --check-prefix=CHECK-native-%target-ptrsize --check-prefix=CHECK-%target-os --check-prefix=CHECK-native-%target-os +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout -prespecialize-generic-metadata %s -target %module-target-future -gnone -emit-ir -enable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-objc --check-prefix=CHECK-objc-simulator-%target-is-simulator --check-prefix=CHECK-objc-%target-ptrsize --check-prefix=CHECK-%target-os --check-prefix=CHECK-objc-%target-os +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout -prespecialize-generic-metadata %s -target %module-target-future -gnone -emit-ir -disable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-native --check-prefix=CHECK-native-%target-ptrsize --check-prefix=CHECK-%target-os --check-prefix=CHECK-native-%target-os +// RUN: %target-swift-frontend -disable-type-layout -prespecialize-generic-metadata %s -target %module-target-future -gnone -emit-ir -enable-objc-interop +// RUN: %target-swift-frontend -disable-type-layout -prespecialize-generic-metadata %s -target %module-target-future -gnone -emit-ir -disable-objc-interop // REQUIRES: CPU=x86_64 // REQUIRES: VENDOR=apple || OS=linux-gnu diff --git a/test/IRGen/enum_value_semantics_special_cases.sil b/test/IRGen/enum_value_semantics_special_cases.sil index f90b69fe70ceb..b841e6411c6fb 100644 --- a/test/IRGen/enum_value_semantics_special_cases.sil +++ b/test/IRGen/enum_value_semantics_special_cases.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -disable-type-layout %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime --check-prefix=CHECK-%target-runtime-simulator-%target-is-simulator +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime --check-prefix=CHECK-%target-runtime-simulator-%target-is-simulator +// RUN: %target-swift-frontend -disable-type-layout %s -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/enum_value_semantics_special_cases_objc.sil b/test/IRGen/enum_value_semantics_special_cases_objc.sil index 7d1f876e1815b..d253503d6014f 100644 --- a/test/IRGen/enum_value_semantics_special_cases_objc.sil +++ b/test/IRGen/enum_value_semantics_special_cases_objc.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -enable-objc-interop -disable-type-layout -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -enable-objc-interop -disable-type-layout -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %s -enable-objc-interop -disable-type-layout -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/error_self_conformance.sil b/test/IRGen/error_self_conformance.sil index f98082de507ec..4a4275280dcc1 100644 --- a/test/IRGen/error_self_conformance.sil +++ b/test/IRGen/error_self_conformance.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -emit-ir %s import Swift diff --git a/test/IRGen/errors.sil b/test/IRGen/errors.sil index 555735fc578b0..63d514f190c5b 100644 --- a/test/IRGen/errors.sil +++ b/test/IRGen/errors.sil @@ -1,6 +1,7 @@ // XFAIL: CPU=powerpc64le // XFAIL: CPU=s390x -// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime --check-prefix=CHECK-%target-cpu --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime --check-prefix=CHECK-%target-cpu --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend -primary-file %s -emit-ir sil_stage canonical diff --git a/test/IRGen/exact_self_class_metadata_peephole.swift b/test/IRGen/exact_self_class_metadata_peephole.swift index 9bc27c448ff64..83f2001e7f016 100644 --- a/test/IRGen/exact_self_class_metadata_peephole.swift +++ b/test/IRGen/exact_self_class_metadata_peephole.swift @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=ONONE -// RUN: %target-swift-frontend -O -disable-llvm-optzns -Xllvm -sil-disable-pass=FunctionSignatureOpts -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=O +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=ONONE +// RUN: %target-swift-frontend -emit-ir %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -O -disable-llvm-optzns -Xllvm -sil-disable-pass=FunctionSignatureOpts -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=O +// RUN: %target-swift-frontend -O -disable-llvm-optzns -Xllvm -sil-disable-pass=FunctionSignatureOpts -emit-ir %s @_silgen_name("useMetadata") func useMetadata(_: T.Type) diff --git a/test/IRGen/exactcast.sil b/test/IRGen/exactcast.sil index 555d519d3dc13..abcb9e2007353 100644 --- a/test/IRGen/exactcast.sil +++ b/test/IRGen/exactcast.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-%target-import-type +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -emit-ir %s | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-%target-import-type +// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/exclusivity.sil b/test/IRGen/exclusivity.sil index 33b22056b9c31..674dc228111b7 100644 --- a/test/IRGen/exclusivity.sil +++ b/test/IRGen/exclusivity.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -swift-version 4 -emit-ir -enforce-exclusivity=checked | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -swift-version 4 -emit-ir -enforce-exclusivity=checked | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s +// RUN: %target-swift-frontend %s -swift-version 4 -emit-ir -enforce-exclusivity=checked sil_stage canonical diff --git a/test/IRGen/existential_metatypes.sil b/test/IRGen/existential_metatypes.sil index 0422c7d92d538..403d45d898820 100644 --- a/test/IRGen/existential_metatypes.sil +++ b/test/IRGen/existential_metatypes.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -o - -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -o - -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir -o - -primary-file %s // REQUIRES: CPU=x86_64 sil_stage canonical diff --git a/test/IRGen/existential_shape_metadata.swift b/test/IRGen/existential_shape_metadata.swift index 8dfe3a719e88a..eba610f0920b8 100644 --- a/test/IRGen/existential_shape_metadata.swift +++ b/test/IRGen/existential_shape_metadata.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s -swift-version 5 -disable-availability-checking | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s -swift-version 5 -disable-availability-checking | %IRGenFileCheck %s +// RUN: %target-swift-frontend -emit-ir %s -swift-version 5 -disable-availability-checking // CHECK-LABEL: @"$sl26existential_shape_metadata2Q0_px1TRts_XPXGMq" = linkonce_odr hidden constant // CHECK-SAME: { i32 {{.*}}sub ([[INT]] ptrtoint (i8** @{{[0-9]+}} to [[INT]]) diff --git a/test/IRGen/existentials.sil b/test/IRGen/existentials.sil index ff0d3667fbe2c..921ee33f3b508 100644 --- a/test/IRGen/existentials.sil +++ b/test/IRGen/existentials.sil @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend %s -emit-ir -disable-objc-interop | %FileCheck %s -// RUN: %target-swift-frontend %s -emit-ir -disable-objc-interop -O | %FileCheck %s --check-prefix=OPT +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -disable-objc-interop | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -disable-objc-interop -O | %FileCheck %s --check-prefix=OPT +// RUN: %target-swift-frontend %s -emit-ir -disable-objc-interop +// RUN: %target-swift-frontend %s -emit-ir -disable-objc-interop -O // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/existentials_objc.sil b/test/IRGen/existentials_objc.sil index 4e9647bb9cd56..f75daa683575f 100644 --- a/test/IRGen/existentials_objc.sil +++ b/test/IRGen/existentials_objc.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend -disable-type-layout -sdk %S/Inputs -I %t %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout -sdk %S/Inputs -I %t %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -disable-type-layout -sdk %S/Inputs -I %t %s -emit-ir // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/IRGen/existentials_opaque_boxed.sil b/test/IRGen/existentials_opaque_boxed.sil index 3d8ed9cf9ede7..c42f350c976eb 100644 --- a/test/IRGen/existentials_opaque_boxed.sil +++ b/test/IRGen/existentials_opaque_boxed.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -disable-type-layout %s -emit-ir | %FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout %s -emit-ir | %FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -disable-type-layout %s -emit-ir sil_stage canonical diff --git a/test/IRGen/expressions.swift b/test/IRGen/expressions.swift index b0d99db6f562a..9eddc9634d7dd 100644 --- a/test/IRGen/expressions.swift +++ b/test/IRGen/expressions.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir -parse-stdlib -disable-access-control | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -parse-stdlib -disable-access-control | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -parse-stdlib -disable-access-control // REQUIRES: PTRSIZE=64 diff --git a/test/IRGen/fixed_layout_class.swift b/test/IRGen/fixed_layout_class.swift index 78fe1f20bfc17..99a2ccde8f2c6 100644 --- a/test/IRGen/fixed_layout_class.swift +++ b/test/IRGen/fixed_layout_class.swift @@ -4,7 +4,8 @@ // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_enum.swiftmodule -module-name=resilient_enum -I %t %S/../Inputs/resilient_enum.swift // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_class.swiftmodule -module-name=resilient_class -I %t %S/../Inputs/resilient_class.swift // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/fixed_layout_class.swiftmodule -module-name=fixed_layout_class -I %t %S/../Inputs/fixed_layout_class.swift -// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %t/class_resilience.swift | %FileCheck %t/class_resilience.swift --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-runtime -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir -enable-library-evolution %t/class_resilience.swift | %FileCheck %t/class_resilience.swift --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-runtime -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %t/class_resilience.swift // RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution -O %t/class_resilience.swift // This tests @_fixed_layout classes in resilient modules. diff --git a/test/IRGen/fixed_size_buffer_peepholes.sil b/test/IRGen/fixed_size_buffer_peepholes.sil index 7b9bc9b38d0fb..ab9656fcda118 100644 --- a/test/IRGen/fixed_size_buffer_peepholes.sil +++ b/test/IRGen/fixed_size_buffer_peepholes.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s import Builtin diff --git a/test/IRGen/fixlifetime.sil b/test/IRGen/fixlifetime.sil index cf5dd443126c5..9dce45180c464 100644 --- a/test/IRGen/fixlifetime.sil +++ b/test/IRGen/fixlifetime.sil @@ -1,6 +1,9 @@ -// RUN: %target-swift-frontend -parse-sil -emit-ir -disable-llvm-optzns -O %s | %FileCheck --check-prefix=CHECK-%target-runtime %s -// RUN: %target-swift-frontend -parse-sil -emit-ir -disable-llvm-optzns -Ounchecked %s | %FileCheck --check-prefix=CHECK-%target-runtime %s -// RUN: %target-swift-frontend -parse-sil -emit-ir -disable-llvm-optzns -Onone %s | %FileCheck --check-prefix=ONONE %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-sil -emit-ir -disable-llvm-optzns -O %s | %FileCheck --check-prefix=CHECK-%target-runtime %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-sil -emit-ir -disable-llvm-optzns -Ounchecked %s | %FileCheck --check-prefix=CHECK-%target-runtime %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-sil -emit-ir -disable-llvm-optzns -Onone %s | %FileCheck --check-prefix=ONONE %s +// RUN: %target-swift-frontend -parse-sil -emit-ir -disable-llvm-optzns -O %s +// RUN: %target-swift-frontend -parse-sil -emit-ir -disable-llvm-optzns -Ounchecked %s +// RUN: %target-swift-frontend -parse-sil -emit-ir -disable-llvm-optzns -Onone %s // REQUIRES: CPU=i386 || CPU=x86_64 diff --git a/test/IRGen/frozen_protocols.swift b/test/IRGen/frozen_protocols.swift index e3de260859d3f..6a11a4d3b2b66 100644 --- a/test/IRGen/frozen_protocols.swift +++ b/test/IRGen/frozen_protocols.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_protocol.swiftmodule -module-name=resilient_protocol %S/../Inputs/resilient_protocol.swift -// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir -enable-library-evolution %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %s // RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution -O %s import resilient_protocol diff --git a/test/IRGen/fulfillment.sil b/test/IRGen/fulfillment.sil index cb8b0b830a12d..e3362e019dbae 100644 --- a/test/IRGen/fulfillment.sil +++ b/test/IRGen/fulfillment.sil @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir -enable-objc-interop | %FileCheck %s --check-prefixes=CHECK,CHECK-objc -// RUN: %target-swift-frontend -primary-file %s -emit-ir -disable-objc-interop | %FileCheck %s --check-prefixes=CHECK,CHECK-native +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -enable-objc-interop | %FileCheck %s --check-prefixes=CHECK,CHECK-objc +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -disable-objc-interop | %FileCheck %s --check-prefixes=CHECK,CHECK-native +// RUN: %target-swift-frontend -primary-file %s -emit-ir -enable-objc-interop +// RUN: %target-swift-frontend -primary-file %s -emit-ir -disable-objc-interop // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/function_param_convention.sil b/test/IRGen/function_param_convention.sil index 454473aef34f5..e62bb79a4308c 100644 --- a/test/IRGen/function_param_convention.sil +++ b/test/IRGen/function_param_convention.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s -module-name Test | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s -module-name Test | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s -module-name Test import Builtin diff --git a/test/IRGen/function_types.sil b/test/IRGen/function_types.sil index 4f31537076fb0..271d0506acd0d 100644 --- a/test/IRGen/function_types.sil +++ b/test/IRGen/function_types.sil @@ -1,9 +1,10 @@ -// RUN: %swift -disable-legacy-type-info -target x86_64-apple-macosx10.9 -module-name function_types %s -emit-ir -o - | %FileCheck %s -// RUN: %swift -disable-legacy-type-info -target i386-apple-ios7.1 %s -module-name function_types -emit-ir -o - | %FileCheck %s -// RUN: %swift -disable-legacy-type-info -target x86_64-apple-ios7.1 %s -module-name function_types -emit-ir -o - | %FileCheck %s -// RUN: %swift -disable-legacy-type-info -target armv7-apple-ios7.1 %s -module-name function_types -emit-ir -o - | %FileCheck %s -// RUN: %swift -disable-legacy-type-info -target arm64-apple-ios7.1 %s -module-name function_types -emit-ir -o - | %FileCheck %s -// RUN: %swift -disable-legacy-type-info -target x86_64-unknown-linux-gnu -disable-objc-interop %s -module-name function_types -emit-ir -o - | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target x86_64-apple-macosx10.9 -module-name function_types %s -emit-ir -o - | %FileCheck %s +// RUN: %swift -disable-legacy-type-info -target x86_64-apple-macosx10.9 -module-name function_types %s -emit-ir -o - +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target i386-apple-ios7.1 %s -module-name function_types -emit-ir -o - | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target x86_64-apple-ios7.1 %s -module-name function_types -emit-ir -o - | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target armv7-apple-ios7.1 %s -module-name function_types -emit-ir -o - | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target arm64-apple-ios7.1 %s -module-name function_types -emit-ir -o - | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target x86_64-unknown-linux-gnu -disable-objc-interop %s -module-name function_types -emit-ir -o - | %FileCheck %s // REQUIRES: CODEGENERATOR=X86 // REQUIRES: CODEGENERATOR=ARM diff --git a/test/IRGen/generic_casts.swift b/test/IRGen/generic_casts.swift index 9cbff32b1d0c7..768e643ecd8b0 100644 --- a/test/IRGen/generic_casts.swift +++ b/test/IRGen/generic_casts.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module -target %target-swift-abi-5.8-triple | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-os +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers -primary-file %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module -target %target-swift-abi-5.8-triple | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-os +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module -target %target-swift-abi-5.8-triple // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/generic_class_anyobject.swift b/test/IRGen/generic_class_anyobject.swift index 2dae038c072cc..0de51970813a3 100644 --- a/test/IRGen/generic_class_anyobject.swift +++ b/test/IRGen/generic_class_anyobject.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -enable-objc-interop -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -enable-objc-interop -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -enable-objc-interop -emit-ir // REQUIRES: CPU=i386 || CPU=x86_64 diff --git a/test/IRGen/generic_classes.sil b/test/IRGen/generic_classes.sil index 52c9399ec3a63..c69345fd00725 100644 --- a/test/IRGen/generic_classes.sil +++ b/test/IRGen/generic_classes.sil @@ -1,8 +1,11 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/chex.py < %s > %t/generic_classes.sil -// RUN: %target-swift-frontend %t/generic_classes.sil -emit-ir -enable-objc-interop | %FileCheck %t/generic_classes.sil --check-prefixes=CHECK,CHECK-objc,CHECK-%target-import-type,CHECK-%target-import-type-objc -// RUN: %target-swift-frontend %t/generic_classes.sil -emit-ir -disable-objc-interop | %FileCheck %t/generic_classes.sil --check-prefixes=CHECK,CHECK-native,CHECK-%target-import-type -// RUN: %target-swift-frontend -Osize %t/generic_classes.sil -emit-ir | %FileCheck %t/generic_classes.sil --check-prefix=OSIZE +// RUN: %target-swift-frontend %use_no_opaque_pointers %t/generic_classes.sil -emit-ir -enable-objc-interop | %FileCheck %t/generic_classes.sil --check-prefixes=CHECK,CHECK-objc,CHECK-%target-import-type,CHECK-%target-import-type-objc +// RUN: %target-swift-frontend %use_no_opaque_pointers %t/generic_classes.sil -emit-ir -disable-objc-interop | %FileCheck %t/generic_classes.sil --check-prefixes=CHECK,CHECK-native,CHECK-%target-import-type +// RUN: %target-swift-frontend %use_no_opaque_pointers -Osize %t/generic_classes.sil -emit-ir | %FileCheck %t/generic_classes.sil --check-prefix=OSIZE +// RUN: %target-swift-frontend %t/generic_classes.sil -emit-ir -enable-objc-interop +// RUN: %target-swift-frontend %t/generic_classes.sil -emit-ir -disable-objc-interop +// RUN: %target-swift-frontend -Osize %t/generic_classes.sil -emit-ir // REQUIRES: PTRSIZE=64 diff --git a/test/IRGen/generic_metatypes.swift b/test/IRGen/generic_metatypes.swift index 5d477e2426d5a..eb3237aaa900b 100644 --- a/test/IRGen/generic_metatypes.swift +++ b/test/IRGen/generic_metatypes.swift @@ -1,15 +1,15 @@ -// RUN: %swift -disable-generic-metadata-prespecialization -module-name generic_metatypes -target x86_64-apple-macosx10.9 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s -// RUN: %swift -disable-generic-metadata-prespecialization -module-name generic_metatypes -target i386-apple-ios7.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-32 -DINT=i32 %s -// RUN: %swift -disable-generic-metadata-prespecialization -module-name generic_metatypes -target x86_64-apple-ios7.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s -// RUN: %swift -disable-generic-metadata-prespecialization -module-name generic_metatypes -target x86_64-apple-tvos9.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s -// RUN: %swift -disable-generic-metadata-prespecialization -module-name generic_metatypes -target i386-apple-watchos2.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-32 -DINT=i32 %s -// RUN: %swift -disable-generic-metadata-prespecialization -module-name generic_metatypes -target x86_64-unknown-linux-gnu -disable-objc-interop -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s - -// RUN: %swift -disable-generic-metadata-prespecialization -module-name generic_metatypes -target armv7-apple-ios7.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-32 -DINT=i32 %s -// RUN: %swift -disable-generic-metadata-prespecialization -module-name generic_metatypes -target arm64-apple-ios7.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s -// RUN: %swift -disable-generic-metadata-prespecialization -module-name generic_metatypes -target arm64-apple-tvos9.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s -// RUN: %swift -disable-generic-metadata-prespecialization -module-name generic_metatypes -target armv7k-apple-watchos2.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-32 -DINT=i32 %s +// RUN: %swift %use_no_opaque_pointers -disable-generic-metadata-prespecialization -module-name generic_metatypes -target x86_64-apple-macosx10.9 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s +// RUN: %swift %use_no_opaque_pointers -disable-generic-metadata-prespecialization -module-name generic_metatypes -target i386-apple-ios7.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-32 -DINT=i32 %s +// RUN: %swift %use_no_opaque_pointers -disable-generic-metadata-prespecialization -module-name generic_metatypes -target x86_64-apple-ios7.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s +// RUN: %swift %use_no_opaque_pointers -disable-generic-metadata-prespecialization -module-name generic_metatypes -target x86_64-apple-tvos9.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s +// RUN: %swift %use_no_opaque_pointers -disable-generic-metadata-prespecialization -module-name generic_metatypes -target i386-apple-watchos2.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-32 -DINT=i32 %s +// RUN: %swift %use_no_opaque_pointers -disable-generic-metadata-prespecialization -module-name generic_metatypes -target x86_64-unknown-linux-gnu -disable-objc-interop -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s + +// RUN: %swift %use_no_opaque_pointers -disable-generic-metadata-prespecialization -module-name generic_metatypes -target armv7-apple-ios7.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-32 -DINT=i32 %s +// RUN: %swift %use_no_opaque_pointers -disable-generic-metadata-prespecialization -module-name generic_metatypes -target arm64-apple-ios7.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s +// RUN: %swift %use_no_opaque_pointers -disable-generic-metadata-prespecialization -module-name generic_metatypes -target arm64-apple-tvos9.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s +// RUN: %swift %use_no_opaque_pointers -disable-generic-metadata-prespecialization -module-name generic_metatypes -target armv7k-apple-watchos2.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-32 -DINT=i32 %s // REQUIRES: CODEGENERATOR=X86 // REQUIRES: CODEGENERATOR=ARM diff --git a/test/IRGen/generic_metatypes_future.swift b/test/IRGen/generic_metatypes_future.swift index e4d919bc486d3..86e86bb15be00 100644 --- a/test/IRGen/generic_metatypes_future.swift +++ b/test/IRGen/generic_metatypes_future.swift @@ -1,13 +1,14 @@ -// RUN: %swift -prespecialize-generic-metadata -module-name generic_metatypes -target x86_64-apple-macosx99.99 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s -// RUN: %swift -prespecialize-generic-metadata -module-name generic_metatypes -target x86_64-apple-ios99.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s -// RUN: %swift -prespecialize-generic-metadata -module-name generic_metatypes -target x86_64-apple-tvos99.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s -// RUN: %swift -prespecialize-generic-metadata -module-name generic_metatypes -target i386-apple-watchos9.99 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-32 -DINT=i32 %s -// RUN: %swift -prespecialize-generic-metadata -module-name generic_metatypes -target x86_64-unknown-linux-gnu -disable-objc-interop -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s - -// RUN: %swift -prespecialize-generic-metadata -module-name generic_metatypes -target arm64-apple-ios99.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s -// RUN: %swift -prespecialize-generic-metadata -module-name generic_metatypes -target arm64-apple-tvos99.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s -// RUN: %swift -prespecialize-generic-metadata -module-name generic_metatypes -target armv7k-apple-watchos9.99 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-32 -DINT=i32 %s +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -module-name generic_metatypes -target x86_64-apple-macosx99.99 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s +// RUN: %swift -prespecialize-generic-metadata -module-name generic_metatypes -target x86_64-apple-macosx99.99 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -module-name generic_metatypes -target x86_64-apple-ios99.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -module-name generic_metatypes -target x86_64-apple-tvos99.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -module-name generic_metatypes -target i386-apple-watchos9.99 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-32 -DINT=i32 %s +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -module-name generic_metatypes -target x86_64-unknown-linux-gnu -disable-objc-interop -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s + +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -module-name generic_metatypes -target arm64-apple-ios99.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -module-name generic_metatypes -target arm64-apple-tvos99.0 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 -DINT=i64 %s +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -module-name generic_metatypes -target armv7k-apple-watchos9.99 -emit-ir -disable-legacy-type-info -parse-stdlib -primary-file %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-32 -DINT=i32 %s // REQUIRES: VENDOR=apple || OS=linux-gnu diff --git a/test/IRGen/generic_requirement_objc.sil b/test/IRGen/generic_requirement_objc.sil index 45c1139274471..99322aee3a12a 100644 --- a/test/IRGen/generic_requirement_objc.sil +++ b/test/IRGen/generic_requirement_objc.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir // REQUIRES: objc_interop diff --git a/test/IRGen/generic_structs.sil b/test/IRGen/generic_structs.sil index 84d0d78fca4b3..17b46280c3b2a 100644 --- a/test/IRGen/generic_structs.sil +++ b/test/IRGen/generic_structs.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/chex.py < %s > %t/generic_structs.sil -// RUN: %target-swift-frontend -disable-type-layout -disable-generic-metadata-prespecialization %t/generic_structs.sil -emit-ir | %FileCheck %t/generic_structs.sil +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout -disable-generic-metadata-prespecialization %t/generic_structs.sil -emit-ir | %FileCheck %t/generic_structs.sil +// RUN: %target-swift-frontend -disable-type-layout -disable-generic-metadata-prespecialization %t/generic_structs.sil -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/generic_structs_future.sil b/test/IRGen/generic_structs_future.sil index 0dfeddc521efe..0f3eaa4b8bab7 100644 --- a/test/IRGen/generic_structs_future.sil +++ b/test/IRGen/generic_structs_future.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/chex.py < %s > %t/generic_structs_future.sil -// RUN: %target-swift-frontend -disable-type-layout -prespecialize-generic-metadata -target %module-target-future %t/generic_structs_future.sil -emit-ir | %FileCheck %t/generic_structs_future.sil +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout -prespecialize-generic-metadata -target %module-target-future %t/generic_structs_future.sil -emit-ir | %FileCheck %t/generic_structs_future.sil +// RUN: %target-swift-frontend -disable-type-layout -prespecialize-generic-metadata -target %module-target-future %t/generic_structs_future.sil -emit-ir // REQUIRES: VENDOR=apple || OS=linux-gnu // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/generic_ternary.swift b/test/IRGen/generic_ternary.swift index eccef1217bd74..2b5b31c9c538e 100644 --- a/test/IRGen/generic_ternary.swift +++ b/test/IRGen/generic_ternary.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir // REQUIRES: CPU=i386 || CPU=x86_64 diff --git a/test/IRGen/generic_tuples.swift b/test/IRGen/generic_tuples.swift index 9d3a8037b9a32..01414c298e4b0 100644 --- a/test/IRGen/generic_tuples.swift +++ b/test/IRGen/generic_tuples.swift @@ -1,5 +1,6 @@ -// RUN: %target-swift-frontend -module-name generic_tuples -emit-ir -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name generic_tuples -emit-ir -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend -module-name generic_tuples -emit-ir -primary-file %s // Make sure that optimization passes don't choke on storage types for generic tuples // RUN: %target-swift-frontend -module-name generic_tuples -emit-ir -O %s diff --git a/test/IRGen/generic_types.swift b/test/IRGen/generic_types.swift index 07c2b6a4cd836..66a368e7ed23d 100644 --- a/test/IRGen/generic_types.swift +++ b/test/IRGen/generic_types.swift @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -enable-objc-interop %s -emit-ir | %FileCheck %s --check-prefixes=CHECK,CHECK-objc -// RUN: %target-swift-frontend -disable-objc-interop %s -emit-ir | %FileCheck %s --check-prefixes=CHECK,CHECK-native +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop %s -emit-ir | %FileCheck %s --check-prefixes=CHECK,CHECK-objc +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-objc-interop %s -emit-ir | %FileCheck %s --check-prefixes=CHECK,CHECK-native +// RUN: %target-swift-frontend -enable-objc-interop %s -emit-ir +// RUN: %target-swift-frontend -disable-objc-interop %s -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/generic_vtable.swift b/test/IRGen/generic_vtable.swift index 8a927526d0228..e78a8336b7180 100644 --- a/test/IRGen/generic_vtable.swift +++ b/test/IRGen/generic_vtable.swift @@ -1,7 +1,9 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/chex.py < %s > %t/generic_vtable.swift -// RUN: %target-swift-frontend -enable-objc-interop %t/generic_vtable.swift -emit-ir | %FileCheck %t/generic_vtable.swift --check-prefixes=CHECK,CHECK-objc,CHECK-objc%target-ptrsize,CHECK-%target-ptrsize,CHECK-%target-import-type,CHECK-%target-abi -DINT=i%target-ptrsize -// RUN: %target-swift-frontend -disable-objc-interop %t/generic_vtable.swift -emit-ir | %FileCheck %t/generic_vtable.swift --check-prefixes=CHECK,CHECK-native,CHECK-native%target-ptrsize,CHECK-%target-ptrsize,CHECK-%target-import-type,CHECK-%target-abi -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop %t/generic_vtable.swift -emit-ir | %FileCheck %t/generic_vtable.swift --check-prefixes=CHECK,CHECK-objc,CHECK-objc%target-ptrsize,CHECK-%target-ptrsize,CHECK-%target-import-type,CHECK-%target-abi -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-objc-interop %t/generic_vtable.swift -emit-ir | %FileCheck %t/generic_vtable.swift --check-prefixes=CHECK,CHECK-native,CHECK-native%target-ptrsize,CHECK-%target-ptrsize,CHECK-%target-import-type,CHECK-%target-abi -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -enable-objc-interop %t/generic_vtable.swift -emit-ir +// RUN: %target-swift-frontend -disable-objc-interop %t/generic_vtable.swift -emit-ir public class Base { public func m1() {} diff --git a/test/IRGen/global_actor_function_types.sil b/test/IRGen/global_actor_function_types.sil index f5cab8d3c4297..0b2ef2d24fbb0 100644 --- a/test/IRGen/global_actor_function_types.sil +++ b/test/IRGen/global_actor_function_types.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -o - -primary-file %s | %FileCheck %s --check-prefix CHECK --check-prefix CHECK-%target-cpu +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -o - -primary-file %s | %FileCheck %s --check-prefix CHECK --check-prefix CHECK-%target-cpu +// RUN: %target-swift-frontend -emit-ir -o - -primary-file %s // REQUIRES: concurrency import Swift diff --git a/test/IRGen/global_actor_function_types_backdeploy.sil b/test/IRGen/global_actor_function_types_backdeploy.sil index 60c16ccb23a84..d6b832e9bcf64 100644 --- a/test/IRGen/global_actor_function_types_backdeploy.sil +++ b/test/IRGen/global_actor_function_types_backdeploy.sil @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -target %target-cpu-apple-macos12 -emit-ir -o - -primary-file %s | %FileCheck %s --check-prefix CHECK-OS -// RUN: %target-swift-frontend -target %target-cpu-apple-macos11 -emit-ir -o - -primary-file %s | %FileCheck %s --check-prefix CHECK-BACKDEPLOY +// RUN: %target-swift-frontend %use_no_opaque_pointers -target %target-cpu-apple-macos12 -emit-ir -o - -primary-file %s | %FileCheck %s --check-prefix CHECK-OS +// RUN: %target-swift-frontend %use_no_opaque_pointers -target %target-cpu-apple-macos11 -emit-ir -o - -primary-file %s | %FileCheck %s --check-prefix CHECK-BACKDEPLOY +// RUN: %target-swift-frontend -target %target-cpu-apple-macos12 -emit-ir -o - -primary-file %s +// RUN: %target-swift-frontend -target %target-cpu-apple-macos11 -emit-ir -o - -primary-file %s // REQUIRES: concurrency // REQUIRES: OS=macosx diff --git a/test/IRGen/global_resilience.sil b/test/IRGen/global_resilience.sil index eccf0e8034199..c79abd3939275 100644 --- a/test/IRGen/global_resilience.sil +++ b/test/IRGen/global_resilience.sil @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend %S/../Inputs/resilient_struct.swift -enable-library-evolution -emit-module -emit-module-path %t/resilient_struct.swiftmodule -// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -enable-library-evolution -I %t -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -Xllvm -sil-disable-pass=simplification -enable-library-evolution -I %t -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -enable-library-evolution -I %t -emit-ir %s // RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -enable-library-evolution -I %t -emit-ir -O %s // CHECK: %swift.type = type { [[INT:i32|i64]] } diff --git a/test/IRGen/globals.swift b/test/IRGen/globals.swift index 4c84f3270eec9..f8a2c3ccea028 100644 --- a/test/IRGen/globals.swift +++ b/test/IRGen/globals.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -disable-availability-checking -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -disable-availability-checking -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -disable-availability-checking // REQUIRES: swift_in_compiler // REQUIRES: PTRSIZE=64 diff --git a/test/IRGen/has_symbol.swift b/test/IRGen/has_symbol.swift index 86cf4cc2616ff..1115fd650e43f 100644 --- a/test/IRGen/has_symbol.swift +++ b/test/IRGen/has_symbol.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -emit-module-path %t/has_symbol_helper.swiftmodule -parse-as-library %S/Inputs/has_symbol/has_symbol_helper.swift -enable-library-evolution -disable-availability-checking -// RUN: %target-swift-frontend -emit-irgen %s -I %t -I %S/Inputs/has_symbol -module-name test | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-irgen %s -I %t -I %S/Inputs/has_symbol -module-name test | %FileCheck %s +// RUN: %target-swift-frontend -emit-irgen %s -I %t -I %S/Inputs/has_symbol -module-name test // UNSUPPORTED: OS=windows-msvc diff --git a/test/IRGen/has_symbol_async.swift b/test/IRGen/has_symbol_async.swift index 5526872652f5a..fcf7f3ea5ebc2 100644 --- a/test/IRGen/has_symbol_async.swift +++ b/test/IRGen/has_symbol_async.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -emit-module-path %t/has_symbol_helper.swiftmodule -parse-as-library %S/Inputs/has_symbol/has_symbol_helper.swift -enable-library-evolution -disable-availability-checking -DCONCURRENCY -// RUN: %target-swift-frontend -emit-irgen %s -I %t -module-name test | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-irgen %s -I %t -module-name test | %FileCheck %s +// RUN: %target-swift-frontend -emit-irgen %s -I %t -module-name test // REQUIRES: concurrency // UNSUPPORTED: OS=windows-msvc diff --git a/test/IRGen/has_symbol_clang.swift b/test/IRGen/has_symbol_clang.swift index 161164885d42b..460f6855470db 100644 --- a/test/IRGen/has_symbol_clang.swift +++ b/test/IRGen/has_symbol_clang.swift @@ -1,5 +1,6 @@ // RUN: %empty-directory(%t) -// RUN: %target-swift-frontend -emit-irgen %s -I %t -I %S/Inputs/has_symbol -module-name test | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-irgen %s -I %t -I %S/Inputs/has_symbol -module-name test | %FileCheck %s +// RUN: %target-swift-frontend -emit-irgen %s -I %t -I %S/Inputs/has_symbol -module-name test // UNSUPPORTED: OS=windows-msvc diff --git a/test/IRGen/has_symbol_objc.swift b/test/IRGen/has_symbol_objc.swift index 28a7a57507a8e..28646d66dc40e 100644 --- a/test/IRGen/has_symbol_objc.swift +++ b/test/IRGen/has_symbol_objc.swift @@ -1,5 +1,6 @@ // RUN: %empty-directory(%t) -// RUN: %target-swift-frontend -emit-irgen %s -I %t -I %S/Inputs/has_symbol -module-name test | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-irgen %s -I %t -I %S/Inputs/has_symbol -module-name test | %FileCheck %s +// RUN: %target-swift-frontend -emit-irgen %s -I %t -I %S/Inputs/has_symbol -module-name test // REQUIRES: objc_interop diff --git a/test/IRGen/hermetic-seal-exec.swift b/test/IRGen/hermetic-seal-exec.swift index b05b23a6ae53b..42dfb16c312d5 100644 --- a/test/IRGen/hermetic-seal-exec.swift +++ b/test/IRGen/hermetic-seal-exec.swift @@ -3,7 +3,7 @@ // RUN: %empty-directory(%t) // (1) Build library swiftmodule -// RUN: %target-build-swift %s -DLIBRARY -module-name Library -experimental-hermetic-seal-at-link -lto=llvm-full %lto_flags \ +// RUN: %use_just_built_liblto %target-build-swift %s -DLIBRARY -module-name Library -experimental-hermetic-seal-at-link -lto=llvm-full %lto_flags \ // RUN: -Xfrontend -disable-reflection-metadata -Xfrontend -disable-reflection-names -Xfrontend -disable-objc-interop \ // RUN: -emit-library -static -o %t/libLibrary.a \ // RUN: -emit-module -emit-module-path %t/Library.swiftmodule @@ -12,7 +12,7 @@ // RUN: %llvm-nm %t/libLibrary.a | %FileCheck %s --check-prefix CHECK-NM-LIB // (3) Build client -// RUN: %target-build-swift %s -DCLIENT -parse-as-library -module-name Main -experimental-hermetic-seal-at-link -lto=llvm-full %lto_flags \ +// RUN: %use_just_built_liblto %target-build-swift %s -DCLIENT -parse-as-library -module-name Main -experimental-hermetic-seal-at-link -lto=llvm-full %lto_flags \ // RUN: -Xfrontend -disable-reflection-metadata -Xfrontend -disable-reflection-names -Xfrontend -disable-objc-interop \ // RUN: -I%t -L%t -lLibrary -o %t/main // RUN: %target-codesign %t/main diff --git a/test/IRGen/indexing.sil b/test/IRGen/indexing.sil index 492b348963dfb..7dfbb4159e7e9 100644 --- a/test/IRGen/indexing.sil +++ b/test/IRGen/indexing.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -Xllvm -sil-disable-pass=simplification -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -Xllvm -sil-disable-pass=simplification -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %s -Xllvm -sil-disable-pass=simplification -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/indirect_argument.sil b/test/IRGen/indirect_argument.sil index e318e9c3c4896..24a8deca56efe 100644 --- a/test/IRGen/indirect_argument.sil +++ b/test/IRGen/indirect_argument.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=OnoneSimplification %s -emit-ir | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-%target-ptrsize %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -Xllvm -sil-disable-pass=OnoneSimplification %s -emit-ir | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-%target-ptrsize %s +// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=OnoneSimplification %s -emit-ir // UNSUPPORTED: CPU=arm64_32 diff --git a/test/IRGen/indirect_return.swift b/test/IRGen/indirect_return.swift index ea91a2e3be3ca..94d42ddb31649 100644 --- a/test/IRGen/indirect_return.swift +++ b/test/IRGen/indirect_return.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir // REQUIRES: CPU=i386 || CPU=x86_64 diff --git a/test/IRGen/infinite_archetype.swift b/test/IRGen/infinite_archetype.swift index 9e7744fe55541..52857347ba58c 100644 --- a/test/IRGen/infinite_archetype.swift +++ b/test/IRGen/infinite_archetype.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir // REQUIRES: CPU=i386 || CPU=x86_64 diff --git a/test/IRGen/inout_noalias.sil b/test/IRGen/inout_noalias.sil index 08e0a4e195f34..274360c8da16d 100644 --- a/test/IRGen/inout_noalias.sil +++ b/test/IRGen/inout_noalias.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -parse-sil %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-sil %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -parse-sil %s -emit-ir import Swift diff --git a/test/IRGen/integer_literal.sil b/test/IRGen/integer_literal.sil index 2e9f78525ea59..b68429ec4e39d 100644 --- a/test/IRGen/integer_literal.sil +++ b/test/IRGen/integer_literal.sil @@ -1,4 +1,5 @@ -// RUN: %swift -target armv7-apple-ios10 -disable-legacy-type-info -module-name integer_literal %s -gnone -emit-ir | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -target armv7-apple-ios10 -disable-legacy-type-info -module-name integer_literal %s -gnone -emit-ir | %FileCheck %s +// RUN: %swift -target armv7-apple-ios10 -disable-legacy-type-info -module-name integer_literal %s -gnone -emit-ir // REQUIRES: CODEGENERATOR=ARM diff --git a/test/IRGen/ivar_destroyer.sil b/test/IRGen/ivar_destroyer.sil index 669ed461424df..5d39428237216 100644 --- a/test/IRGen/ivar_destroyer.sil +++ b/test/IRGen/ivar_destroyer.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-%target-import-type +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -emit-ir %s | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-%target-import-type +// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/keypath_witness_overrides.swift b/test/IRGen/keypath_witness_overrides.swift index 7e2b81bf72fde..bc7520f354c90 100644 --- a/test/IRGen/keypath_witness_overrides.swift +++ b/test/IRGen/keypath_witness_overrides.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -module-name protocol_overrides -emit-module -enable-library-evolution -emit-module-path=%t/protocol_overrides.swiftmodule %S/../SILGen/Inputs/protocol_overrides.swift -// RUN: %target-swift-frontend -module-name keypath_witness_overrides -emit-ir %s -I %t | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name keypath_witness_overrides -emit-ir %s -I %t | %FileCheck %s +// RUN: %target-swift-frontend -module-name keypath_witness_overrides -emit-ir %s -I %t import protocol_overrides diff --git a/test/IRGen/keypaths.sil b/test/IRGen/keypaths.sil index efee4b9078b4b..4c2db7b0ecfac 100644 --- a/test/IRGen/keypaths.sil +++ b/test/IRGen/keypaths.sil @@ -2,7 +2,8 @@ // RUN: %empty-directory(%t) // -- Convert constants to decimal constants that LLVM will print // RUN: %{python} %utils/chex.py < %s > %t/keypaths.sil -// RUN: %target-swift-frontend -module-name keypaths -emit-ir %s | %FileCheck %t/keypaths.sil --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-os +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name keypaths -emit-ir %s | %FileCheck %t/keypaths.sil --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-os +// RUN: %target-swift-frontend -module-name keypaths -emit-ir %s sil_stage canonical import Swift diff --git a/test/IRGen/keypaths_objc.sil b/test/IRGen/keypaths_objc.sil index 4e8cb200f4e6f..c9a585f00b9e0 100644 --- a/test/IRGen/keypaths_objc.sil +++ b/test/IRGen/keypaths_objc.sil @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/chex.py < %s > %t/keypaths_objc.sil -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir %t/keypaths_objc.sil | %FileCheck %t/keypaths_objc.sil --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers -emit-ir %t/keypaths_objc.sil | %FileCheck %t/keypaths_objc.sil --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir %t/keypaths_objc.sil // REQUIRES: objc_interop import Swift diff --git a/test/IRGen/lazy-root-conformance.swift b/test/IRGen/lazy-root-conformance.swift index 3ad5a2dc8dc4a..25c856c1426e7 100644 --- a/test/IRGen/lazy-root-conformance.swift +++ b/test/IRGen/lazy-root-conformance.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -DA -parse-as-library -parse-stdlib -module-name A %s -o %t/A.swiftmodule -// RUN: %target-swift-frontend -emit-ir -DB -I %t -parse-as-library -parse-stdlib -module-name B -o - %s | %FileCheck %s -check-prefix CHECK-%target-import-type +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -DB -I %t -parse-as-library -parse-stdlib -module-name B -o - %s | %FileCheck %s -check-prefix CHECK-%target-import-type +// RUN: %target-swift-frontend -emit-ir -DB -I %t -parse-as-library -parse-stdlib -module-name B -o - %s #if A public protocol P { diff --git a/test/IRGen/lazy_globals.swift b/test/IRGen/lazy_globals.swift index 16318a7fbac95..f72476dcd430b 100644 --- a/test/IRGen/lazy_globals.swift +++ b/test/IRGen/lazy_globals.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -parse-as-library -emit-ir -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-as-library -emit-ir -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend -parse-as-library -emit-ir -primary-file %s // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/lazy_multi_file.swift b/test/IRGen/lazy_multi_file.swift index 6b39a86fb0d5e..3a8cb9370fa66 100644 --- a/test/IRGen/lazy_multi_file.swift +++ b/test/IRGen/lazy_multi_file.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s %S/Inputs/lazy_multi_file_helper.swift -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s %S/Inputs/lazy_multi_file_helper.swift -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s %S/Inputs/lazy_multi_file_helper.swift -emit-ir // REQUIRES: CPU=i386 || CPU=x86_64 diff --git a/test/IRGen/lifetime.sil b/test/IRGen/lifetime.sil index e2a6ea160a58c..b52569ed23fd4 100644 --- a/test/IRGen/lifetime.sil +++ b/test/IRGen/lifetime.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -disable-debugger-shadow-copies -gnone -emit-ir %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-debugger-shadow-copies -gnone -emit-ir %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -disable-debugger-shadow-copies -gnone -emit-ir %s // CHECK: [[OPAQUE:%swift.opaque]] = type opaque // CHECK: [[TYPE:%swift.type]] = type diff --git a/test/IRGen/literals.sil b/test/IRGen/literals.sil index 24c2b9450780d..b3a83b8c78238 100644 --- a/test/IRGen/literals.sil +++ b/test/IRGen/literals.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/marker_protocol.swift b/test/IRGen/marker_protocol.swift index 32be4a06cf25c..cb4adbd8c4403 100644 --- a/test/IRGen/marker_protocol.swift +++ b/test/IRGen/marker_protocol.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir -o - | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -o - | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -o - // Marker protocols should have no ABI impact at all, so this source file checks // for the absence of symbols related to marker protocols. diff --git a/test/IRGen/meta_meta_type.swift b/test/IRGen/meta_meta_type.swift index a555f16860305..3db1f16c90abf 100644 --- a/test/IRGen/meta_meta_type.swift +++ b/test/IRGen/meta_meta_type.swift @@ -2,7 +2,8 @@ // RUN: %target-build-swift %s -o %t/a.out // RUN: %target-codesign %t/a.out // RUN: %target-run %t/a.out | %FileCheck %s -// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck -check-prefix=CHECKIR %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck -check-prefix=CHECKIR %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir // REQUIRES: executable_test protocol Proto { diff --git a/test/IRGen/metadata.swift b/test/IRGen/metadata.swift index 8ff058c33e5ba..6474639341c5e 100644 --- a/test/IRGen/metadata.swift +++ b/test/IRGen/metadata.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift -// RUN: %target-swift-frontend -module-name A -I %t %S/Inputs/metadata2.swift -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-os +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name A -I %t %S/Inputs/metadata2.swift -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-os +// RUN: %target-swift-frontend -module-name A -I %t %S/Inputs/metadata2.swift -primary-file %s -emit-ir import resilient_struct diff --git a/test/IRGen/metadata_dominance.swift b/test/IRGen/metadata_dominance.swift index 3f878c3dd4d5e..fc3cdaff63201 100644 --- a/test/IRGen/metadata_dominance.swift +++ b/test/IRGen/metadata_dominance.swift @@ -1,5 +1,8 @@ -// RUN: %target-swift-frontend -emit-ir -primary-file %s | %FileCheck %s -DINT=i%target-ptrsize -// RUN: %target-swift-frontend -O -emit-ir -primary-file %s | %FileCheck %s --check-prefix=CHECK-OPT -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -primary-file %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -O -emit-ir -primary-file %s | %FileCheck %s --check-prefix=CHECK-OPT -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -emit-ir -primary-file %s +// RUN: %target-swift-frontend -O -emit-ir -primary-file %s + func use_metadata(_ f: F) {} diff --git a/test/IRGen/metatype.sil b/test/IRGen/metatype.sil index e83fa70c61105..4615ea7883d55 100644 --- a/test/IRGen/metatype.sil +++ b/test/IRGen/metatype.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -sdk %S/Inputs -I %t -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -Xllvm -sil-disable-pass=simplification -sdk %S/Inputs -I %t -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -sdk %S/Inputs -I %t -emit-ir %s // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/IRGen/metatype_casts.sil b/test/IRGen/metatype_casts.sil index 0d18a18230f42..a729d3d7eae13 100644 --- a/test/IRGen/metatype_casts.sil +++ b/test/IRGen/metatype_casts.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -enable-objc-interop -emit-ir | %FileCheck %s -DINT=i%target-ptrsize -check-prefix CHECK -check-prefix CHECK-%target-import-type +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -enable-objc-interop -emit-ir | %FileCheck %s -DINT=i%target-ptrsize -check-prefix CHECK -check-prefix CHECK-%target-import-type +// RUN: %target-swift-frontend %s -enable-objc-interop -emit-ir // REQUIRES: CPU=i386 || CPU=x86_64 diff --git a/test/IRGen/mixed_mode_class_with_unimportable_fields.sil b/test/IRGen/mixed_mode_class_with_unimportable_fields.sil index c680476232ce2..d298319c5c822 100644 --- a/test/IRGen/mixed_mode_class_with_unimportable_fields.sil +++ b/test/IRGen/mixed_mode_class_with_unimportable_fields.sil @@ -1,7 +1,9 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -o %t/UsingObjCStuff.swiftmodule -module-name UsingObjCStuff -I %t -I %S/Inputs/mixed_mode -swift-version 4 %S/Inputs/mixed_mode/UsingObjCStuff.swift -// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -emit-ir -I %t -I %S/Inputs/mixed_mode -module-name main -swift-version 4 %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V5 --check-prefix=CHECK-V5-%target-ptrsize -DWORD=i%target-ptrsize -// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -emit-ir -I %t -I %S/Inputs/mixed_mode -module-name main -swift-version 5 %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V5 --check-prefix=CHECK-V5-%target-ptrsize -DWORD=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -Xllvm -sil-disable-pass=simplification -emit-ir -I %t -I %S/Inputs/mixed_mode -module-name main -swift-version 4 %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V5 --check-prefix=CHECK-V5-%target-ptrsize -DWORD=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -Xllvm -sil-disable-pass=simplification -emit-ir -I %t -I %S/Inputs/mixed_mode -module-name main -swift-version 5 %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-V5 --check-prefix=CHECK-V5-%target-ptrsize -DWORD=i%target-ptrsize +// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -emit-ir -I %t -I %S/Inputs/mixed_mode -module-name main -swift-version 4 %s +// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -emit-ir -I %t -I %S/Inputs/mixed_mode -module-name main -swift-version 5 %s // REQUIRES: objc_interop diff --git a/test/IRGen/mixed_mode_class_with_unimportable_fields.swift b/test/IRGen/mixed_mode_class_with_unimportable_fields.swift index d66fa163abf84..c99a97edb9862 100644 --- a/test/IRGen/mixed_mode_class_with_unimportable_fields.swift +++ b/test/IRGen/mixed_mode_class_with_unimportable_fields.swift @@ -1,7 +1,9 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -o %t/UsingObjCStuff.swiftmodule -module-name UsingObjCStuff -I %t -I %S/Inputs/mixed_mode -swift-version 5 %S/Inputs/mixed_mode/UsingObjCStuff.swift -// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/mixed_mode -module-name main -swift-version 4 %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-V4 -DWORD=i%target-ptrsize --check-prefix=CHECK-V4-STABLE-ABI-%target-mandates-stable-abi -// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/mixed_mode -module-name main -swift-version 5 %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-V5 -DWORD=i%target-ptrsize --check-prefix=CHECK-V5-STABLE-ABI-%target-mandates-stable-abi +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -I %t -I %S/Inputs/mixed_mode -module-name main -swift-version 4 %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-V4 -DWORD=i%target-ptrsize --check-prefix=CHECK-V4-STABLE-ABI-%target-mandates-stable-abi +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -I %t -I %S/Inputs/mixed_mode -module-name main -swift-version 5 %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-V5 -DWORD=i%target-ptrsize --check-prefix=CHECK-V5-STABLE-ABI-%target-mandates-stable-abi +// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/mixed_mode -module-name main -swift-version 4 %s +// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/mixed_mode -module-name main -swift-version 5 %s // REQUIRES: objc_interop diff --git a/test/IRGen/move_value.sil b/test/IRGen/move_value.sil index 95973ae86e413..6d13be40c9497 100644 --- a/test/IRGen/move_value.sil +++ b/test/IRGen/move_value.sil @@ -1,4 +1,5 @@ -// RUN: %swift -disable-legacy-type-info -target x86_64-apple-macosx10.9 -module-name main %s -emit-ir -o - | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target x86_64-apple-macosx10.9 -module-name main %s -emit-ir -o - | %FileCheck %s +// RUN: %swift -disable-legacy-type-info -target x86_64-apple-macosx10.9 -module-name main %s -emit-ir -o - // REQUIRES: CODEGENERATOR=X86 diff --git a/test/IRGen/moveonly_deinit.sil b/test/IRGen/moveonly_deinit.sil index 0261778157d77..6741ce5fac5c3 100644 --- a/test/IRGen/moveonly_deinit.sil +++ b/test/IRGen/moveonly_deinit.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/chex.py < %s > %t/moveonly_deinit.sil -// RUN: %target-swift-frontend -enable-experimental-feature MoveOnlyEnumDeinits -emit-ir %t/moveonly_deinit.sil | %FileCheck %t/moveonly_deinit.sil --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-experimental-feature MoveOnlyEnumDeinits -emit-ir %t/moveonly_deinit.sil | %FileCheck %t/moveonly_deinit.sil --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend -enable-experimental-feature MoveOnlyEnumDeinits -emit-ir %t/moveonly_deinit.sil // UNSUPPORTED: CPU=arm64e diff --git a/test/IRGen/moveonly_deinits.swift b/test/IRGen/moveonly_deinits.swift index 1a85a5cb8500e..fb42dbf30c3ff 100644 --- a/test/IRGen/moveonly_deinits.swift +++ b/test/IRGen/moveonly_deinits.swift @@ -1,5 +1,6 @@ // TODO: re-enable the simplification passes once rdar://104875010 is fixed -// RUN: %target-swift-emit-ir -enable-experimental-feature MoveOnlyEnumDeinits -Xllvm -sil-disable-pass=simplification %s | %FileCheck -check-prefix=IR %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers -enable-experimental-feature MoveOnlyEnumDeinits -Xllvm -sil-disable-pass=simplification %s | %FileCheck -check-prefix=IR %s +// RUN: %target-swift-emit-ir -enable-experimental-feature MoveOnlyEnumDeinits -Xllvm -sil-disable-pass=simplification %s // Test that makes sure that at IRGen time we properly handle conditional // releases for trivial and non-trivial move only types. The SIL/SILGen part of diff --git a/test/IRGen/moveonly_split_module_source_deinit.swift b/test/IRGen/moveonly_split_module_source_deinit.swift index 7b45a3cd765de..7df1120d6f528 100644 --- a/test/IRGen/moveonly_split_module_source_deinit.swift +++ b/test/IRGen/moveonly_split_module_source_deinit.swift @@ -1,7 +1,9 @@ // RUN: %empty-directory(%t) // RUN: %target-swiftc_driver -emit-module -module-name server -emit-module-path %t/server.swiftmodule %s %S/Inputs/moveonly_split_module_source_input.swift -// RUN: %target-swift-frontend -module-name server -primary-file %s %S/Inputs/moveonly_split_module_source_input.swift -emit-ir -emit-module-path %t/server.swiftmodule | %FileCheck %s -check-prefix=REFERRING_MODULE -// RUN: %target-swift-frontend -module-name server %s -primary-file %S/Inputs/moveonly_split_module_source_input.swift -emit-ir -emit-module-path %t/server.swiftmodule | %FileCheck %s -check-prefix=DEFINING_MODULE +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name server -primary-file %s %S/Inputs/moveonly_split_module_source_input.swift -emit-ir -emit-module-path %t/server.swiftmodule | %FileCheck %s -check-prefix=REFERRING_MODULE +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name server %s -primary-file %S/Inputs/moveonly_split_module_source_input.swift -emit-ir -emit-module-path %t/server.swiftmodule | %FileCheck %s -check-prefix=DEFINING_MODULE +// RUN: %target-swift-frontend -module-name server -primary-file %s %S/Inputs/moveonly_split_module_source_input.swift -emit-ir -emit-module-path %t/server.swiftmodule +// RUN: %target-swift-frontend -module-name server %s -primary-file %S/Inputs/moveonly_split_module_source_input.swift -emit-ir -emit-module-path %t/server.swiftmodule // Make sure we call the deinit through the value witness table in the other module. diff --git a/test/IRGen/multi_file_resilience.swift b/test/IRGen/multi_file_resilience.swift index e66ef712fcf67..98a1cb60d33cc 100644 --- a/test/IRGen/multi_file_resilience.swift +++ b/test/IRGen/multi_file_resilience.swift @@ -5,12 +5,14 @@ // RUN: -emit-module-path=%t/resilient_struct.swiftmodule \ // RUN: -module-name=resilient_struct %S/../Inputs/resilient_struct.swift -// RUN: %target-swift-frontend -module-name main -I %t -emit-ir -primary-file %s %S/Inputs/OtherModule.swift | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name main -I %t -emit-ir -primary-file %s %S/Inputs/OtherModule.swift | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -module-name main -I %t -emit-ir -primary-file %s %S/Inputs/OtherModule.swift // Check that we correctly handle resilience when parsing as SIL + SIB. // RUN: %target-swift-frontend -emit-sib -module-name main %S/Inputs/OtherModule.swift -I %t -o %t/other.sib // RUN: %target-swift-frontend -emit-silgen -module-name main -primary-file %s %S/Inputs/OtherModule.swift -I %t -o %t/main.sil -// RUN: %target-swift-frontend -emit-ir -module-name main -primary-file %t/main.sil %t/other.sib -I %t | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -module-name main -primary-file %t/main.sil %t/other.sib -I %t | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -emit-ir -module-name main -primary-file %t/main.sil %t/other.sib -I %t // This is a single-module version of the test case in // multi_module_resilience. diff --git a/test/IRGen/multi_module_resilience.swift b/test/IRGen/multi_module_resilience.swift index 4c1086753f176..233924dee6560 100644 --- a/test/IRGen/multi_module_resilience.swift +++ b/test/IRGen/multi_module_resilience.swift @@ -9,7 +9,8 @@ // RUN: -emit-module-path=%t/OtherModule.swiftmodule \ // RUN: -module-name=OtherModule %S/Inputs/OtherModule.swift -// RUN: %target-swift-frontend -module-name main -I %t -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name main -I %t -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -module-name main -I %t -emit-ir %s // rdar://39763787 diff --git a/test/IRGen/multi_payload_shifting.swift b/test/IRGen/multi_payload_shifting.swift index 8fd9419c7fa17..08d179ace92c1 100644 --- a/test/IRGen/multi_payload_shifting.swift +++ b/test/IRGen/multi_payload_shifting.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -enable-objc-interop -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -enable-objc-interop -primary-file %s -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/nested_generics.swift b/test/IRGen/nested_generics.swift index 44ac2ccba59b7..96e743d490ad5 100644 --- a/test/IRGen/nested_generics.swift +++ b/test/IRGen/nested_generics.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir > %t.txt +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir > %t.txt +// RUN: %target-swift-frontend %s -emit-ir // RUN: %FileCheck %s --check-prefix=CHECK < %t.txt // RUN: %FileCheck %s --check-prefix=CHECK-CONSTANTS < %t.txt diff --git a/test/IRGen/nested_types.sil b/test/IRGen/nested_types.sil index 1151a0a6cc8fd..0f47c6ada1c6c 100644 --- a/test/IRGen/nested_types.sil +++ b/test/IRGen/nested_types.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -emit-ir %s sil_stage canonical diff --git a/test/IRGen/newtype.swift b/test/IRGen/newtype.swift index f71fa6327865c..2f9afccf636de 100644 --- a/test/IRGen/newtype.swift +++ b/test/IRGen/newtype.swift @@ -1,9 +1,11 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t -I %S/../IDE/Inputs/custom-modules) %s -emit-ir > %t/out.ll +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t -I %S/../IDE/Inputs/custom-modules) %use_no_opaque_pointers %s -emit-ir > %t/out.ll +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t -I %S/../IDE/Inputs/custom-modules) %s -emit-ir // RUN: %FileCheck %s -DINT=i%target-ptrsize < %t/out.ll // RUN: %FileCheck %s -check-prefix=CHECK-CC -DINT=i%target-ptrsize < %t/out.ll -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t -I %S/../IDE/Inputs/custom-modules) %s -emit-ir -O | %FileCheck %s -check-prefix=OPT -DINT=i%target-ptrsize +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t -I %S/../IDE/Inputs/custom-modules) %use_no_opaque_pointers %s -emit-ir -O | %FileCheck %s -check-prefix=OPT -DINT=i%target-ptrsize +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t -I %S/../IDE/Inputs/custom-modules) %s -emit-ir -O import CoreFoundation import Foundation import Newtype diff --git a/test/IRGen/non_fixed_return.swift b/test/IRGen/non_fixed_return.swift index 0b80ef96e09c0..c07178c941573 100644 --- a/test/IRGen/non_fixed_return.swift +++ b/test/IRGen/non_fixed_return.swift @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s -// RUN: %target-swift-frontend -O -primary-file %s -emit-ir | %FileCheck %s --check-prefix=OPT +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -O -primary-file %s -emit-ir | %FileCheck %s --check-prefix=OPT +// RUN: %target-swift-frontend -primary-file %s -emit-ir +// RUN: %target-swift-frontend -O -primary-file %s -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/noreturn.swift b/test/IRGen/noreturn.swift index 36240950994d8..56f1d831ca9d3 100644 --- a/test/IRGen/noreturn.swift +++ b/test/IRGen/noreturn.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -module-name A -emit-ir -primary-file %s -import-objc-header %S/Inputs/noreturn.h | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name A -emit-ir -primary-file %s -import-objc-header %S/Inputs/noreturn.h | %FileCheck %s +// RUN: %target-swift-frontend -module-name A -emit-ir -primary-file %s -import-objc-header %S/Inputs/noreturn.h // CHECK-LABEL: define {{.*}} void @"$s1A018testDirectReturnNoC0yyF"() diff --git a/test/IRGen/objc.swift b/test/IRGen/objc.swift index 4e08621f6e93f..fb5c1087718c8 100644 --- a/test/IRGen/objc.swift +++ b/test/IRGen/objc.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -module-name objc -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers -module-name objc -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -module-name objc -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/IRGen/objc_alloc.sil b/test/IRGen/objc_alloc.sil index 10a0c97830dca..e9451c21122c2 100644 --- a/test/IRGen/objc_alloc.sil +++ b/test/IRGen/objc_alloc.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir // REQUIRES: CPU=i386 || CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/IRGen/objc_async_metadata.swift b/test/IRGen/objc_async_metadata.swift index 31617d8c70e20..e9f6737d893d1 100644 --- a/test/IRGen/objc_async_metadata.swift +++ b/test/IRGen/objc_async_metadata.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -disable-availability-checking %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers -disable-availability-checking %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -disable-availability-checking %s -emit-ir // REQUIRES: OS=macosx // REQUIRES: concurrency diff --git a/test/IRGen/objc_attr_NSManaged.sil b/test/IRGen/objc_attr_NSManaged.sil index 0a5fd0995eb44..7cc0e91cbd3e3 100644 --- a/test/IRGen/objc_attr_NSManaged.sil +++ b/test/IRGen/objc_attr_NSManaged.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir // REQUIRES: PTRSIZE=64 // REQUIRES: objc_interop diff --git a/test/IRGen/objc_block.sil b/test/IRGen/objc_block.sil index c88ddb7108924..f5783a4fbfdd8 100644 --- a/test/IRGen/objc_block.sil +++ b/test/IRGen/objc_block.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir sil_stage canonical diff --git a/test/IRGen/objc_block_storage.sil b/test/IRGen/objc_block_storage.sil index 5f1f8f9d8c469..5ca36c5ad87d4 100644 --- a/test/IRGen/objc_block_storage.sil +++ b/test/IRGen/objc_block_storage.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -gnone -enable-objc-interop -sdk %S/Inputs -I %t %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -Xllvm -sil-disable-pass=simplification -gnone -enable-objc-interop -sdk %S/Inputs -I %t %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -gnone -enable-objc-interop -sdk %S/Inputs -I %t %s -emit-ir // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/IRGen/objc_bridge.swift b/test/IRGen/objc_bridge.swift index f9b36d9c0bf95..48a7b0e04cb0b 100644 --- a/test/IRGen/objc_bridge.swift +++ b/test/IRGen/objc_bridge.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -emit-ir -primary-file %s | %FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-%target-ptrauth +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers -emit-ir -primary-file %s | %FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-%target-ptrauth +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -emit-ir -primary-file %s // REQUIRES: PTRSIZE=64 // REQUIRES: objc_interop diff --git a/test/IRGen/objc_casts.sil b/test/IRGen/objc_casts.sil index 0085cf382801c..32c2e9247329b 100644 --- a/test/IRGen/objc_casts.sil +++ b/test/IRGen/objc_casts.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir // REQUIRES: objc_interop diff --git a/test/IRGen/objc_class_empty_fields.swift b/test/IRGen/objc_class_empty_fields.swift index aff1d1cddb382..81c56663c4ef6 100644 --- a/test/IRGen/objc_class_empty_fields.swift +++ b/test/IRGen/objc_class_empty_fields.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -enable-objc-interop -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -enable-objc-interop -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend -primary-file %s -enable-objc-interop -emit-ir // https://github.com/apple/swift/issues/43667 diff --git a/test/IRGen/objc_class_export.swift b/test/IRGen/objc_class_export.swift index 14caf2360d38e..dbfec7d54d1ad 100644 --- a/test/IRGen/objc_class_export.swift +++ b/test/IRGen/objc_class_export.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend -sdk %S/Inputs -I %t -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -sdk %S/Inputs -I %t -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/IRGen/objc_class_property.swift b/test/IRGen/objc_class_property.swift index 1085689425479..8aa6931df2878 100644 --- a/test/IRGen/objc_class_property.swift +++ b/test/IRGen/objc_class_property.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/objc_dealloc.sil b/test/IRGen/objc_dealloc.sil index 2a41fbee8bf30..c1e8eedf05608 100644 --- a/test/IRGen/objc_dealloc.sil +++ b/test/IRGen/objc_dealloc.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/IRGen/objc_deprecated_objc_thunks.swift b/test/IRGen/objc_deprecated_objc_thunks.swift index e0e2ef4360ed4..1843c67bd5995 100644 --- a/test/IRGen/objc_deprecated_objc_thunks.swift +++ b/test/IRGen/objc_deprecated_objc_thunks.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir -disable-objc-attr-requires-foundation-module -enable-swift3-objc-inference -swift-version 4 | %FileCheck %s +// RUN: %target-swift-frontend %s %use_no_opaque_pointers -emit-ir -disable-objc-attr-requires-foundation-module -enable-swift3-objc-inference -swift-version 4 | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -disable-objc-attr-requires-foundation-module -enable-swift3-objc-inference -swift-version 4 // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop @@ -14,4 +15,4 @@ class ObjCSubclass : NSObject { // CHECK-LABEL: define internal void @"$s016objc_deprecated_A7_thunks12ObjCSubclassC3fooyyFTo"(%0* %0, i8* %1) // CHECK: entry: // CHECK: [[SELF:%[0-9]+]] = bitcast %0* %0 to %objc_object* -// CHECK-NEXT: call void @swift_objc_swift3ImplicitObjCEntrypoint(%objc_object* [[SELF]], i8* %1, i8* getelementptr inbounds ({{.*}}[[FILENAME_STR]]{{.*}}), i64 [[FILENAME_LENGTH:[0-9]+]], i64 11, i64 3, i8* {{.*}}) +// CHECK-NEXT: call void @swift_objc_swift3ImplicitObjCEntrypoint(%objc_object* [[SELF]], i8* %1, i8* getelementptr inbounds ({{.*}}[[FILENAME_STR]]{{.*}}), i64 [[FILENAME_LENGTH:[0-9]+]], i64 12, i64 3, i8* {{.*}}) diff --git a/test/IRGen/objc_direct.swift b/test/IRGen/objc_direct.swift index c98aeb7a74e60..ec1ea13211235 100644 --- a/test/IRGen/objc_direct.swift +++ b/test/IRGen/objc_direct.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir -import-objc-header %S/../Inputs/objc_direct.h -o - %s | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers -import-objc-header %S/../Inputs/objc_direct.h -o - %s | %FileCheck %s +// RUN: %target-swift-emit-ir -import-objc-header %S/../Inputs/objc_direct.h -o - %s // REQUIRES: objc_interop diff --git a/test/IRGen/objc_enum_multi_file.swift b/test/IRGen/objc_enum_multi_file.swift index e5b3c144b0c5e..657b4270d174c 100644 --- a/test/IRGen/objc_enum_multi_file.swift +++ b/test/IRGen/objc_enum_multi_file.swift @@ -1,8 +1,10 @@ // RUN: %empty-directory(%t) -// RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module -enable-objc-interop -module-name main -primary-file %s %S/Inputs/objc_enum_multi_file_helper.swift -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-objc-attr-requires-foundation-module -enable-objc-interop -module-name main -primary-file %s %S/Inputs/objc_enum_multi_file_helper.swift -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module -enable-objc-interop -module-name main -primary-file %s %S/Inputs/objc_enum_multi_file_helper.swift -emit-ir // RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module -enable-objc-interop -emit-module %S/Inputs/objc_enum_multi_file_helper.swift -o %t -// RUN: %target-swift-frontend -module-name main -primary-file %s -I %t -DIMPORT -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name main -primary-file %s -I %t -DIMPORT -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -module-name main -primary-file %s -I %t -DIMPORT -emit-ir #if IMPORT import objc_enum_multi_file_helper diff --git a/test/IRGen/objc_errors.sil b/test/IRGen/objc_errors.sil index 21313dd5745b1..c7ca4965ac79b 100644 --- a/test/IRGen/objc_errors.sil +++ b/test/IRGen/objc_errors.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir // REQUIRES: objc_interop diff --git a/test/IRGen/objc_extensions.swift b/test/IRGen/objc_extensions.swift index f12544d38c9ef..a7e9ec89f0539 100644 --- a/test/IRGen/objc_extensions.swift +++ b/test/IRGen/objc_extensions.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays // RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -disable-objc-attr-requires-foundation-module -emit-module %S/Inputs/objc_extension_base.swift -o %t -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir -g | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers -primary-file %s -emit-ir -g | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir -g // REQUIRES: CPU=x86_64 || CPU=arm64 // REQUIRES: objc_interop diff --git a/test/IRGen/objc_factory_method.sil b/test/IRGen/objc_factory_method.sil index add40959e1622..6e80d62fa2c08 100644 --- a/test/IRGen/objc_factory_method.sil +++ b/test/IRGen/objc_factory_method.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers -enable-objc-interop -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -emit-ir %s // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/objc_generic_class_convention.sil b/test/IRGen/objc_generic_class_convention.sil index 72a7a1f724f4d..ad5db8ed5bfcb 100644 --- a/test/IRGen/objc_generic_class_convention.sil +++ b/test/IRGen/objc_generic_class_convention.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -emit-ir // REQUIRES: objc_interop diff --git a/test/IRGen/objc_generic_class_metadata.sil b/test/IRGen/objc_generic_class_metadata.sil index 715b0b041aaa4..9733340bb9420 100644 --- a/test/IRGen/objc_generic_class_metadata.sil +++ b/test/IRGen/objc_generic_class_metadata.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -emit-ir // REQUIRES: objc_interop diff --git a/test/IRGen/objc_generic_class_stub.swift b/test/IRGen/objc_generic_class_stub.swift index 132f8d1f6e823..18aece075c6ae 100644 --- a/test/IRGen/objc_generic_class_stub.swift +++ b/test/IRGen/objc_generic_class_stub.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir // REQUIRES: objc_interop diff --git a/test/IRGen/objc_generic_protocol_conformance.swift b/test/IRGen/objc_generic_protocol_conformance.swift index cbfd4c5b68349..6dd62db9fbe61 100644 --- a/test/IRGen/objc_generic_protocol_conformance.swift +++ b/test/IRGen/objc_generic_protocol_conformance.swift @@ -1,5 +1,6 @@ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-silgen -primary-file %s -enable-objc-interop -import-objc-header %S/Inputs/objc_generic_protocol_conformance.h | %FileCheck --check-prefix=SIL %s -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir -primary-file %s -enable-objc-interop -import-objc-header %S/Inputs/objc_generic_protocol_conformance.h | %FileCheck --check-prefix=IR %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers -emit-ir -primary-file %s -enable-objc-interop -import-objc-header %S/Inputs/objc_generic_protocol_conformance.h | %FileCheck --check-prefix=IR %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir -primary-file %s -enable-objc-interop -import-objc-header %S/Inputs/objc_generic_protocol_conformance.h protocol P { func foo() diff --git a/test/IRGen/objc_globals.swift b/test/IRGen/objc_globals.swift index c4c988f4f8cee..4df2ffbf46c80 100644 --- a/test/IRGen/objc_globals.swift +++ b/test/IRGen/objc_globals.swift @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/abi %s -whole-module-optimization -emit-ir | %FileCheck %s -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/abi %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers -I %S/Inputs/abi %s -whole-module-optimization -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers -I %S/Inputs/abi %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/abi %s -whole-module-optimization -emit-ir +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/abi %s -emit-ir // // REQUIRES: objc_interop diff --git a/test/IRGen/objc_implementation.swift b/test/IRGen/objc_implementation.swift index c1e5b62f9549e..edd55fcf3bcd2 100644 --- a/test/IRGen/objc_implementation.swift +++ b/test/IRGen/objc_implementation.swift @@ -1,7 +1,8 @@ // Test doesn't pass on all platforms (rdar://101420862) // REQUIRES: OS=macosx -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/abi -F %clang-importer-sdk-path/frameworks %s -import-objc-header %S/Inputs/objc_implementation.h -emit-ir > %t.ir +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers -I %S/Inputs/abi -F %clang-importer-sdk-path/frameworks %s -import-objc-header %S/Inputs/objc_implementation.h -emit-ir > %t.ir +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs/abi -F %clang-importer-sdk-path/frameworks %s -import-objc-header %S/Inputs/objc_implementation.h -emit-ir // RUN: %FileCheck --input-file %t.ir %s // RUN: %FileCheck --input-file %t.ir --check-prefix NEGATIVE %s // REQUIRES: objc_interop diff --git a/test/IRGen/objc_methods.swift b/test/IRGen/objc_methods.swift index 08f18203e7fcf..1b3bdb66d29cc 100644 --- a/test/IRGen/objc_methods.swift +++ b/test/IRGen/objc_methods.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-os-abi %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-os-abi %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/IRGen/objc_ns_enum.swift b/test/IRGen/objc_ns_enum.swift index 133f4e47f9ce4..eda59dc33142d 100644 --- a/test/IRGen/objc_ns_enum.swift +++ b/test/IRGen/objc_ns_enum.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir > %t/out.txt +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers -primary-file %s -emit-ir > %t/out.txt +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir // RUN: %FileCheck %s -DINT=i%target-ptrsize < %t/out.txt // RUN: %FileCheck %s --check-prefix=NEGATIVE < %t/out.txt diff --git a/test/IRGen/objc_pointers.swift b/test/IRGen/objc_pointers.swift index 73beddef61f90..e6923cbf34331 100644 --- a/test/IRGen/objc_pointers.swift +++ b/test/IRGen/objc_pointers.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/IRGen/objc_properties.swift b/test/IRGen/objc_properties.swift index 76bad14906e12..d10187bd28c95 100644 --- a/test/IRGen/objc_properties.swift +++ b/test/IRGen/objc_properties.swift @@ -1,7 +1,9 @@ // This file is also used by objc_properties_ios.swift. -// RUN: %swift -target %target-cpu-apple-macosx10.11 %s -disable-target-os-checking -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-NEW %s -// RUN: %swift -target %target-cpu-apple-macosx10.10 %s -disable-target-os-checking -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-OLD %s +// RUN: %swift %use_no_opaque_pointers -target %target-cpu-apple-macosx10.11 %s -disable-target-os-checking -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-NEW %s +// RUN: %swift %use_no_opaque_pointers -target %target-cpu-apple-macosx10.10 %s -disable-target-os-checking -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-OLD %s +// RUN: %swift -target %target-cpu-apple-macosx10.11 %s -disable-target-os-checking -emit-ir -disable-objc-attr-requires-foundation-module +// RUN: %swift -target %target-cpu-apple-macosx10.10 %s -disable-target-os-checking -emit-ir -disable-objc-attr-requires-foundation-module // REQUIRES: OS=macosx // REQUIRES: objc_interop diff --git a/test/IRGen/objc_properties_imported.swift b/test/IRGen/objc_properties_imported.swift index 9c1e3bb0b7e4a..29968c76e5a3d 100644 --- a/test/IRGen/objc_properties_imported.swift +++ b/test/IRGen/objc_properties_imported.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -enable-source-import -emit-ir -o - -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers -enable-objc-interop -enable-source-import -emit-ir -o - -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -enable-source-import -emit-ir -o - -primary-file %s // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/objc_properties_ios.swift b/test/IRGen/objc_properties_ios.swift index 947480cb33078..6c4a3419d46d3 100644 --- a/test/IRGen/objc_properties_ios.swift +++ b/test/IRGen/objc_properties_ios.swift @@ -1,5 +1,8 @@ -// RUN: %swift -target x86_64-apple-ios9-simulator %S/objc_properties.swift -disable-target-os-checking -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-NEW %S/objc_properties.swift -// RUN: %swift -target x86_64-apple-ios8-simulator %S/objc_properties.swift -disable-target-os-checking -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-OLD %S/objc_properties.swift +// RUN: %swift %use_no_opaque_pointers -target x86_64-apple-ios9-simulator %S/objc_properties.swift -disable-target-os-checking -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-NEW %S/objc_properties.swift +// RUN: %swift %use_no_opaque_pointers -target x86_64-apple-ios8-simulator %S/objc_properties.swift -disable-target-os-checking -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-OLD %S/objc_properties.swift + +// RUN: %swift -target x86_64-apple-ios9-simulator %S/objc_properties.swift -disable-target-os-checking -emit-ir -disable-objc-attr-requires-foundation-module +// RUN: %swift -target x86_64-apple-ios8-simulator %S/objc_properties.swift -disable-target-os-checking -emit-ir -disable-objc-attr-requires-foundation-module // REQUIRES: OS=ios // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/objc_properties_jit.swift b/test/IRGen/objc_properties_jit.swift index b1f80f74652fb..3f04d03a994cb 100644 --- a/test/IRGen/objc_properties_jit.swift +++ b/test/IRGen/objc_properties_jit.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop %s -emit-ir -disable-objc-attr-requires-foundation-module -use-jit | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers -enable-objc-interop %s -emit-ir -disable-objc-attr-requires-foundation-module -use-jit | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop %s -emit-ir -disable-objc-attr-requires-foundation-module -use-jit import Foundation diff --git a/test/IRGen/objc_protocol_conversion.sil b/test/IRGen/objc_protocol_conversion.sil index 1e6581414a635..436c6e96d3a8f 100644 --- a/test/IRGen/objc_protocol_conversion.sil +++ b/test/IRGen/objc_protocol_conversion.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -sdk %S/Inputs -I %t %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/IRGen/objc_protocol_extended_method_types.swift b/test/IRGen/objc_protocol_extended_method_types.swift index 1373854018af4..e137aa61b373e 100644 --- a/test/IRGen/objc_protocol_extended_method_types.swift +++ b/test/IRGen/objc_protocol_extended_method_types.swift @@ -1,7 +1,9 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir | %FileCheck %s -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir -use-jit | %FileCheck -check-prefix=CHECK-JIT %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers %s -emit-ir -use-jit | %FileCheck -check-prefix=CHECK-JIT %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir -use-jit // REQUIRES: OS=macosx // REQUIRES: objc_interop diff --git a/test/IRGen/objc_protocol_vars.sil b/test/IRGen/objc_protocol_vars.sil index c102f3fc4fe21..079dc29ecb3f8 100644 --- a/test/IRGen/objc_protocol_vars.sil +++ b/test/IRGen/objc_protocol_vars.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -parse-as-library -emit-ir %s | %FileCheck %s --check-prefix=CHECK-%target-object-format +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers -enable-objc-interop -parse-as-library -emit-ir %s | %FileCheck %s --check-prefix=CHECK-%target-object-format +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -parse-as-library -emit-ir %s // It tests whether the vars @"\01l_OBJC_LABEL_PROTOCOL_$__TtP18objc_protocol_vars1T_" // and @"\01l_OBJC_PROTOCOL_REFERENCE_$__TtP18objc_protocol_vars1T_" are in llvm.used. diff --git a/test/IRGen/objc_protocols.swift b/test/IRGen/objc_protocols.swift index e772d86d911fa..5ce70e382348a 100644 --- a/test/IRGen/objc_protocols.swift +++ b/test/IRGen/objc_protocols.swift @@ -1,8 +1,10 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays // RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -emit-module -o %t %S/Inputs/objc_protocols_Bas.swift -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -target %target-swift-abi-5.8-triple > %t/out.ir -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -target %target-swift-abi-5.7-triple > %t/out.old.ir +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -target %target-swift-abi-5.8-triple > %t/out.ir +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -target %target-swift-abi-5.7-triple > %t/out.old.ir +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -target %target-swift-abi-5.8-triple +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -target %target-swift-abi-5.7-triple // RUN: %FileCheck --input-file=%t/out.ir %s --check-prefix=CHECK --check-prefix=CHECK-%target-os // RUN: %FileCheck --input-file=%t/out.old.ir %s --check-prefix=CHECK-OLD --check-prefix=CHECK-%target-os-OLD diff --git a/test/IRGen/objc_retainAutoreleasedReturnValue.swift b/test/IRGen/objc_retainAutoreleasedReturnValue.swift index 34f821c76f3d3..dd321cb83d96e 100644 --- a/test/IRGen/objc_retainAutoreleasedReturnValue.swift +++ b/test/IRGen/objc_retainAutoreleasedReturnValue.swift @@ -1,6 +1,8 @@ -// RUN: %target-swift-frontend -module-name objc_retainAutoreleasedReturnValue -import-objc-header %S/Inputs/StaticInline.h %s -emit-ir | %FileCheck %s -// RUN: %target-swift-frontend -module-name objc_retainAutoreleasedReturnValue -O -import-objc-header %S/Inputs/StaticInline.h %s -emit-ir | %FileCheck %s --check-prefix=OPT +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name objc_retainAutoreleasedReturnValue -import-objc-header %S/Inputs/StaticInline.h %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name objc_retainAutoreleasedReturnValue -O -import-objc-header %S/Inputs/StaticInline.h %s -emit-ir | %FileCheck %s --check-prefix=OPT +// RUN: %target-swift-frontend -module-name objc_retainAutoreleasedReturnValue -import-objc-header %S/Inputs/StaticInline.h %s -emit-ir +// RUN: %target-swift-frontend -module-name objc_retainAutoreleasedReturnValue -O -import-objc-header %S/Inputs/StaticInline.h %s -emit-ir // REQUIRES: objc_interop // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/objc_runtime_visible.sil b/test/IRGen/objc_runtime_visible.sil index a0c25119bc854..539328ddd8b06 100644 --- a/test/IRGen/objc_runtime_visible.sil +++ b/test/IRGen/objc_runtime_visible.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -enable-objc-interop -I %S/../Inputs/custom-modules %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -I %S/../Inputs/custom-modules %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -enable-objc-interop -I %S/../Inputs/custom-modules %s -emit-ir sil_stage raw diff --git a/test/IRGen/objc_selector.sil b/test/IRGen/objc_selector.sil index 454822867f07d..ca66f36d03f74 100644 --- a/test/IRGen/objc_selector.sil +++ b/test/IRGen/objc_selector.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s sil_stage canonical diff --git a/test/IRGen/objc_simd.sil b/test/IRGen/objc_simd.sil index 56c106ab65c3b..be3ba7eba1976 100644 --- a/test/IRGen/objc_simd.sil +++ b/test/IRGen/objc_simd.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir %s | %FileCheck %s --check-prefix=%target-cpu --check-prefix=%target-cpu-%target-sdk-name +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers -emit-ir %s | %FileCheck %s --check-prefix=%target-cpu --check-prefix=%target-cpu-%target-sdk-name +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir %s import Swift import simd diff --git a/test/IRGen/objc_structs.swift b/test/IRGen/objc_structs.swift index e2ac58e3ba07d..fd41f69022ad6 100644 --- a/test/IRGen/objc_structs.swift +++ b/test/IRGen/objc_structs.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/IRGen/objc_subclass.swift b/test/IRGen/objc_subclass.swift index a8a97434fd013..ba80a86b6797a 100644 --- a/test/IRGen/objc_subclass.swift +++ b/test/IRGen/objc_subclass.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %s +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir // REQUIRES: objc_interop diff --git a/test/IRGen/objc_subscripts.swift b/test/IRGen/objc_subscripts.swift index eba5a54cb2bce..a26017afc7b6a 100644 --- a/test/IRGen/objc_subscripts.swift +++ b/test/IRGen/objc_subscripts.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-%target-ptrauth +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-%target-ptrauth +// RUN: %target-swift-frontend -primary-file %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module // REQUIRES: PTRSIZE=64 diff --git a/test/IRGen/objc_super.swift b/test/IRGen/objc_super.swift index 246ad6fa8695d..9403c59118da2 100644 --- a/test/IRGen/objc_super.swift +++ b/test/IRGen/objc_super.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/IRGen/objc_type_encoding.swift b/test/IRGen/objc_type_encoding.swift index fbf3141490e9b..77d69f09bf9f0 100644 --- a/test/IRGen/objc_type_encoding.swift +++ b/test/IRGen/objc_type_encoding.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir -disable-objc-attr-requires-foundation-module -target %target-swift-abi-5.8-triple | %FileCheck %s -check-prefix=CHECK-%target-os +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers %s -emit-ir -disable-objc-attr-requires-foundation-module -target %target-swift-abi-5.8-triple | %FileCheck %s -check-prefix=CHECK-%target-os +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir -disable-objc-attr-requires-foundation-module -target %target-swift-abi-5.8-triple // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/IRGen/objc_typeof.swift b/test/IRGen/objc_typeof.swift index 4d103c8c13b1d..cedb639f87e7c 100644 --- a/test/IRGen/objc_typeof.swift +++ b/test/IRGen/objc_typeof.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir %s // REQUIRES: objc_interop import Foundation diff --git a/test/IRGen/objc_types_as_member.sil b/test/IRGen/objc_types_as_member.sil index 381b3528e4137..a737fdd9f5f60 100644 --- a/test/IRGen/objc_types_as_member.sil +++ b/test/IRGen/objc_types_as_member.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir // REQUIRES: objc_interop diff --git a/test/IRGen/opaque_result_type.swift b/test/IRGen/opaque_result_type.swift index adb5cf9e6a682..12fbda964ad72 100644 --- a/test/IRGen/opaque_result_type.swift +++ b/test/IRGen/opaque_result_type.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/chex.py < %s > %t/opaque_result_type.swift -// RUN: %target-swift-frontend -enable-experimental-named-opaque-types -enable-implicit-dynamic -disable-availability-checking -emit-ir %t/opaque_result_type.swift | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-NODEBUG %t/opaque_result_type.swift +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-experimental-named-opaque-types -enable-implicit-dynamic -disable-availability-checking -emit-ir %t/opaque_result_type.swift | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-NODEBUG %t/opaque_result_type.swift +// RUN: %target-swift-frontend -enable-experimental-named-opaque-types -enable-implicit-dynamic -disable-availability-checking -emit-ir %t/opaque_result_type.swift // rdar://76863553 // UNSUPPORTED: OS=watchos && CPU=x86_64 diff --git a/test/IRGen/opaque_result_type_associated_type_conformance_path.swift b/test/IRGen/opaque_result_type_associated_type_conformance_path.swift index c6e938912d33a..ad63059c0dd98 100644 --- a/test/IRGen/opaque_result_type_associated_type_conformance_path.swift +++ b/test/IRGen/opaque_result_type_associated_type_conformance_path.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -disable-availability-checking -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-availability-checking -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -disable-availability-checking -emit-ir %s protocol Butt { } diff --git a/test/IRGen/opaque_result_type_metadata_peephole.swift b/test/IRGen/opaque_result_type_metadata_peephole.swift index 92fff3e52ae88..375240c0694e3 100644 --- a/test/IRGen/opaque_result_type_metadata_peephole.swift +++ b/test/IRGen/opaque_result_type_metadata_peephole.swift @@ -1,7 +1,10 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -swift-version 5 -disable-availability-checking -static -enable-library-evolution -emit-module-path %t/opaque_result_type_metadata_external.swiftmodule %S/Inputs/opaque_result_type_metadata_external.swift -// RUN: %target-swift-frontend -swift-version 5 -disable-availability-checking -emit-ir -I %t %s | %FileCheck %s --check-prefix=CHECK --check-prefix=DEFAULT -// RUN: %target-swift-frontend -swift-version 5 -disable-availability-checking -emit-ir -I %t %s -enable-implicit-dynamic | %FileCheck %s --check-prefix=CHECK --check-prefix=IMPLICIT-DYNAMIC +// RUN: %target-swift-frontend %use_no_opaque_pointers -swift-version 5 -disable-availability-checking -emit-ir -I %t %s | %FileCheck %s --check-prefix=CHECK --check-prefix=DEFAULT +// RUN: %target-swift-frontend %use_no_opaque_pointers -swift-version 5 -disable-availability-checking -emit-ir -I %t %s -enable-implicit-dynamic | %FileCheck %s --check-prefix=CHECK --check-prefix=IMPLICIT-DYNAMIC +// RUN: %target-swift-frontend -swift-version 5 -disable-availability-checking -emit-ir -I %t %s +// RUN: %target-swift-frontend -swift-version 5 -disable-availability-checking -emit-ir -I %t %s -enable-implicit-dynamic + import opaque_result_type_metadata_external diff --git a/test/IRGen/opaque_result_type_substitution.swift b/test/IRGen/opaque_result_type_substitution.swift index 30ac930042904..4e990fe3fd735 100644 --- a/test/IRGen/opaque_result_type_substitution.swift +++ b/test/IRGen/opaque_result_type_substitution.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -disable-type-layout -enable-library-evolution -disable-availability-checking -emit-ir -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout -enable-library-evolution -disable-availability-checking -emit-ir -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend -disable-type-layout -enable-library-evolution -disable-availability-checking -emit-ir -primary-file %s public protocol E {} diff --git a/test/IRGen/opaque_result_with_conditional_availability.swift b/test/IRGen/opaque_result_with_conditional_availability.swift index 50e4a8f04dab5..bcdcbb1cafe48 100644 --- a/test/IRGen/opaque_result_with_conditional_availability.swift +++ b/test/IRGen/opaque_result_with_conditional_availability.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -target %target-cpu-apple-macosx10.15 -emit-module -emit-module-path=%t/opaque_result_with_conditional_availability_types.swiftmodule %S/Inputs/opaque_result_with_conditional_availability_types.swift // RUN: %target-build-swift -target %target-cpu-apple-macosx10.15 -c -parse-as-library -o %t/opaque_result_with_conditional_availability_types.o %S/Inputs/opaque_result_with_conditional_availability_types.swift -// RUN: %target-swift-frontend -target %target-cpu-apple-macosx10.15 -I%t -emit-ir %s -swift-version 5 | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -target %target-cpu-apple-macosx10.15 -I%t -emit-ir %s -swift-version 5 | %IRGenFileCheck %s +// RUN: %target-swift-frontend -target %target-cpu-apple-macosx10.15 -I%t -emit-ir %s -swift-version 5 // REQUIRES: OS=macosx import opaque_result_with_conditional_availability_types diff --git a/test/IRGen/opaque_values_irgen.sil b/test/IRGen/opaque_values_irgen.sil index dde802c65d0df..b1082006605e2 100644 --- a/test/IRGen/opaque_values_irgen.sil +++ b/test/IRGen/opaque_values_irgen.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -enable-sil-opaque-values -parse-stdlib -primary-file %s -emit-ir | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-sil-opaque-values -parse-stdlib -primary-file %s -emit-ir | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s +// RUN: %target-swift-frontend -enable-sil-opaque-values -parse-stdlib -primary-file %s -emit-ir import Builtin diff --git a/test/IRGen/open_boxed_existential.sil b/test/IRGen/open_boxed_existential.sil index 49f7ed849b868..8d9c310eaaf84 100644 --- a/test/IRGen/open_boxed_existential.sil +++ b/test/IRGen/open_boxed_existential.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-runtime +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-runtime +// RUN: %target-swift-frontend %s -emit-ir import Swift diff --git a/test/IRGen/original-defined-attr.swift b/test/IRGen/original-defined-attr.swift index 65ce1ce378152..d15acf33ef17a 100644 --- a/test/IRGen/original-defined-attr.swift +++ b/test/IRGen/original-defined-attr.swift @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -swift-version 4 -enforce-exclusivity=checked %s -emit-ir -module-name CurrentModule -D CURRENT_MODULE | %FileCheck %s --check-prefix=CHECK-COMMON --check-prefix=CHECK-CURRENT --check-prefix=CHECK-CURRENT-%target-ptrsize -// RUN: %target-swift-frontend -swift-version 4 -enforce-exclusivity=checked %s -emit-ir -module-name OriginalModule | %FileCheck %s --check-prefix=CHECK-COMMON --check-prefix=CHECK-ORIGINAL --check-prefix=CHECK-ORIGINAL-%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -swift-version 4 -enforce-exclusivity=checked %s -emit-ir -module-name CurrentModule -D CURRENT_MODULE | %FileCheck %s --check-prefix=CHECK-COMMON --check-prefix=CHECK-CURRENT --check-prefix=CHECK-CURRENT-%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -swift-version 4 -enforce-exclusivity=checked %s -emit-ir -module-name OriginalModule | %FileCheck %s --check-prefix=CHECK-COMMON --check-prefix=CHECK-ORIGINAL --check-prefix=CHECK-ORIGINAL-%target-ptrsize +// RUN: %target-swift-frontend -swift-version 4 -enforce-exclusivity=checked %s -emit-ir -module-name CurrentModule -D CURRENT_MODULE +// RUN: %target-swift-frontend -swift-version 4 -enforce-exclusivity=checked %s -emit-ir -module-name OriginalModule // REQUIRES: OS=macosx #if CURRENT_MODULE diff --git a/test/IRGen/outlined_copy_addr.swift b/test/IRGen/outlined_copy_addr.swift index c648b236f89f8..216a76f147f3c 100644 --- a/test/IRGen/outlined_copy_addr.swift +++ b/test/IRGen/outlined_copy_addr.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -disable-type-layout -emit-ir -module-name outcopyaddr -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout -emit-ir -module-name outcopyaddr -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend -disable-type-layout -emit-ir -module-name outcopyaddr -primary-file %s public protocol BaseProt { } diff --git a/test/IRGen/pack_metadata_marker_inserter.sil b/test/IRGen/pack_metadata_marker_inserter.sil index a8eefd5e2af3f..83b6aeceb1781 100644 --- a/test/IRGen/pack_metadata_marker_inserter.sil +++ b/test/IRGen/pack_metadata_marker_inserter.sil @@ -1,5 +1,6 @@ // RUN: %target-sil-opt -enable-sil-verify-all %s -pack-metadata-marker-inserter -enable-pack-metadata-stack-promotion=true | %FileCheck %s --check-prefixes CHECK-SIL -// RUN: %target-swift-frontend -parse-sil -emit-ir -primary-file %s -enable-pack-metadata-stack-promotion=false -enable-pack-metadata-stack-promotion=true | %IRGenFileCheck %s --check-prefixes CHECK-LLVM +// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-sil -emit-ir -primary-file %s -enable-pack-metadata-stack-promotion=false -enable-pack-metadata-stack-promotion=true | %IRGenFileCheck %s --check-prefixes CHECK-LLVM +// RUN: %target-swift-frontend -parse-sil -emit-ir -primary-file %s -enable-pack-metadata-stack-promotion=false -enable-pack-metadata-stack-promotion=true // REQUIRES: asserts diff --git a/test/IRGen/partial_apply.sil b/test/IRGen/partial_apply.sil index 4834163d4ad9b..6736de31033fd 100644 --- a/test/IRGen/partial_apply.sil +++ b/test/IRGen/partial_apply.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift -// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=OnoneSimplification -I %t -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -Xllvm -sil-disable-pass=OnoneSimplification -I %t -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=OnoneSimplification -I %t -emit-ir %s // UNSUPPORTED: CPU=arm64e diff --git a/test/IRGen/partial_apply_forwarder.sil b/test/IRGen/partial_apply_forwarder.sil index 7d1bdacaa7d58..74c49f2e8a513 100644 --- a/test/IRGen/partial_apply_forwarder.sil +++ b/test/IRGen/partial_apply_forwarder.sil @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -enable-objc-interop -primary-file %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize --check-prefixes=CHECK,CHECK-objc -// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -disable-objc-interop -primary-file %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize --check-prefixes=CHECK,CHECK-native +// RUN: %target-swift-frontend %use_no_opaque_pointers -Xllvm -sil-disable-pass=simplification -enable-objc-interop -primary-file %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize --check-prefixes=CHECK,CHECK-objc +// RUN: %target-swift-frontend %use_no_opaque_pointers -Xllvm -sil-disable-pass=simplification -disable-objc-interop -primary-file %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize --check-prefixes=CHECK,CHECK-native +// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -enable-objc-interop -primary-file %s -emit-ir +// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -disable-objc-interop -primary-file %s -emit-ir sil_stage canonical import Builtin diff --git a/test/IRGen/partial_apply_generic.swift b/test/IRGen/partial_apply_generic.swift index 5989f44a8e93a..4ddd8203f8309 100644 --- a/test/IRGen/partial_apply_generic.swift +++ b/test/IRGen/partial_apply_generic.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/partial_apply_objc.sil b/test/IRGen/partial_apply_objc.sil index 84af27fd7683d..6f1b031ce29a8 100644 --- a/test/IRGen/partial_apply_objc.sil +++ b/test/IRGen/partial_apply_objc.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %use_no_opaque_pointers %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir -disable-objc-attr-requires-foundation-module // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/IRGen/pre_specialize.swift b/test/IRGen/pre_specialize.swift index 160fccde07faa..30a5e111bac52 100644 --- a/test/IRGen/pre_specialize.swift +++ b/test/IRGen/pre_specialize.swift @@ -1,32 +1,42 @@ // RUN: %empty-directory(%t) // Module A code generation. -// RUN: %target-swift-frontend -emit-ir -primary-file %S/Inputs/pre_specialize_module.swift -module-name A | %FileCheck %s -check-prefix=CHECK-A -check-prefix=CHECK-A-FRAG -// RUN: %target-swift-frontend -O -emit-ir -primary-file %S/Inputs/pre_specialize_module.swift -module-name A | %FileCheck %s -check-prefix=CHECK-A -check-prefix=CHECK-A-FRAG -// RUN: %target-swift-frontend -enable-library-evolution -emit-ir -primary-file %S/Inputs/pre_specialize_module.swift -module-name A | %FileCheck %s -check-prefix=CHECK-A -check-prefix=CHECK-A-RES -// RUN: %target-swift-frontend -O -enable-library-evolution -emit-ir -primary-file %S/Inputs/pre_specialize_module.swift -module-name A | %FileCheck %s -check-prefix=CHECK-A -check-prefix=CHECK-A-RES +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -primary-file %S/Inputs/pre_specialize_module.swift -module-name A | %FileCheck %s -check-prefix=CHECK-A -check-prefix=CHECK-A-FRAG +// RUN: %target-swift-frontend %use_no_opaque_pointers -O -emit-ir -primary-file %S/Inputs/pre_specialize_module.swift -module-name A | %FileCheck %s -check-prefix=CHECK-A -check-prefix=CHECK-A-FRAG +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-library-evolution -emit-ir -primary-file %S/Inputs/pre_specialize_module.swift -module-name A | %FileCheck %s -check-prefix=CHECK-A -check-prefix=CHECK-A-RES +// RUN: %target-swift-frontend %use_no_opaque_pointers -O -enable-library-evolution -emit-ir -primary-file %S/Inputs/pre_specialize_module.swift -module-name A | %FileCheck %s -check-prefix=CHECK-A -check-prefix=CHECK-A-RES +// RUN: %target-swift-frontend -emit-ir -primary-file %S/Inputs/pre_specialize_module.swift -module-name A +// RUN: %target-swift-frontend -O -emit-ir -primary-file %S/Inputs/pre_specialize_module.swift -module-name A +// RUN: %target-swift-frontend -enable-library-evolution -emit-ir -primary-file %S/Inputs/pre_specialize_module.swift -module-name A +// RUN: %target-swift-frontend -O -enable-library-evolution -emit-ir -primary-file %S/Inputs/pre_specialize_module.swift -module-name A // Module B code generation with A.swiftmodule. // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -validate-tbd-against-ir=missing -emit-module -emit-module-path=%t/A.swiftmodule -module-name A %S/Inputs/pre_specialize_module.swift -emit-library -o %t/%target-library-name(A) -// RUN: %target-swift-frontend -I %t -emit-ir -primary-file %S/Inputs/pre_specialize_module_B.swift -module-name B | %FileCheck %s -check-prefix=CHECK-B -// RUN: %target-swift-frontend -I %t -O -emit-ir -primary-file %S/Inputs/pre_specialize_module_B.swift -module-name B | %FileCheck %s -check-prefix=CHECK-B +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir -primary-file %S/Inputs/pre_specialize_module_B.swift -module-name B | %FileCheck %s -check-prefix=CHECK-B +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -O -emit-ir -primary-file %S/Inputs/pre_specialize_module_B.swift -module-name B | %FileCheck %s -check-prefix=CHECK-B +// RUN: %target-swift-frontend -I %t -emit-ir -primary-file %S/Inputs/pre_specialize_module_B.swift -module-name B +// RUN: %target-swift-frontend -I %t -O -emit-ir -primary-file %S/Inputs/pre_specialize_module_B.swift -module-name B // RUN: %target-build-swift -I %t -Xfrontend -validate-tbd-against-ir=missing -emit-module -emit-module-path=%t/B.swiftmodule -module-name B %S/Inputs/pre_specialize_module_B.swift -emit-library -o %t/%target-library-name(B) -L %t -lA // RUN: %target-build-swift -swift-version 5 -I %t -Xfrontend -validate-tbd-against-ir=all -enable-library-evolution -emit-module-interface-path %t/B.swiftinterface -module-name B %S/Inputs/pre_specialize_module_B.swift -emit-library -o %t/%target-library-name(B) -L %t -lA // Module B code generation with A.swiftmodule with library evolution. // RUN: %empty-directory(%t) // RUN: %target-build-swift -enable-library-evolution -Xfrontend -validate-tbd-against-ir=all -emit-module -emit-module-path=%t/A.swiftmodule -module-name A %S/Inputs/pre_specialize_module.swift -emit-library -o %t/%target-library-name(A) -// RUN: %target-swift-frontend -I %t -emit-ir -primary-file %S/Inputs/pre_specialize_module_B.swift -module-name B | %FileCheck %s -check-prefix=CHECK-B -// RUN: %target-swift-frontend -I %t -O -emit-ir -primary-file %S/Inputs/pre_specialize_module_B.swift -module-name B | %FileCheck %s -check-prefix=CHECK-B +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir -primary-file %S/Inputs/pre_specialize_module_B.swift -module-name B | %FileCheck %s -check-prefix=CHECK-B +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -O -emit-ir -primary-file %S/Inputs/pre_specialize_module_B.swift -module-name B | %FileCheck %s -check-prefix=CHECK-B +// RUN: %target-swift-frontend -I %t -emit-ir -primary-file %S/Inputs/pre_specialize_module_B.swift -module-name B +// RUN: %target-swift-frontend -I %t -O -emit-ir -primary-file %S/Inputs/pre_specialize_module_B.swift -module-name B // RUN: %target-build-swift -I %t -Xfrontend -validate-tbd-against-ir=missing -emit-module -emit-module-path=%t/B.swiftmodule -module-name B %S/Inputs/pre_specialize_module_B.swift -emit-library -o %t/%target-library-name(B) -L %t -lA // RUN: %target-build-swift -swift-version 5 -I %t -Xfrontend -validate-tbd-against-ir=all -enable-library-evolution -emit-module-interface-path %t/B.swiftinterface -module-name B %S/Inputs/pre_specialize_module_B.swift -emit-library -o %t/%target-library-name(B) -L %t -lA // Module B code generation with A.swiftinterface with library evolution. // RUN: %empty-directory(%t) // RUN: %target-build-swift -enable-library-evolution -Xfrontend -validate-tbd-against-ir=all -emit-module-interface-path %t/A.swiftinterface -module-name A %S/Inputs/pre_specialize_module.swift -emit-library -o %t/%target-library-name(A) -swift-version 5 -// RUN: %target-swift-frontend -I %t -emit-ir -primary-file %S/Inputs/pre_specialize_module_B.swift -module-name B | %FileCheck %s -check-prefix=CHECK-B -// RUN: %target-swift-frontend -I %t -O -emit-ir -primary-file %S/Inputs/pre_specialize_module_B.swift -module-name B | %FileCheck %s -check-prefix=CHECK-B +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir -primary-file %S/Inputs/pre_specialize_module_B.swift -module-name B | %FileCheck %s -check-prefix=CHECK-B +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -O -emit-ir -primary-file %S/Inputs/pre_specialize_module_B.swift -module-name B | %FileCheck %s -check-prefix=CHECK-B +// RUN: %target-swift-frontend -I %t -emit-ir -primary-file %S/Inputs/pre_specialize_module_B.swift -module-name B +// RUN: %target-swift-frontend -I %t -O -emit-ir -primary-file %S/Inputs/pre_specialize_module_B.swift -module-name B // RUN: %target-build-swift -I %t -Xfrontend -validate-tbd-against-ir=missing -emit-module -emit-module-path=%t/B.swiftmodule -module-name B %S/Inputs/pre_specialize_module_B.swift -emit-library -o %t/%target-library-name(B) -L %t -lA // RUN: %target-build-swift -swift-version 5 -I %t -Xfrontend -validate-tbd-against-ir=all -enable-library-evolution -emit-module-interface-path %t/B.swiftinterface -module-name B %S/Inputs/pre_specialize_module_B.swift -emit-library -o %t/%target-library-name(B) -L %t -lA @@ -106,37 +116,43 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -emit-module -emit-module-path=%t/A.swiftmodule -module-name A %S/Inputs/pre_specialize_module.swift // RUN: %target-build-swift -I %t -emit-module -emit-module-path=%t/B.swiftmodule -module-name B %S/Inputs/pre_specialize_module_B.swift -// RUN: %target-swift-frontend -O -I %t -emit-ir -primary-file %s -module-name C | %FileCheck %s -check-prefix=CHECK-C +// RUN: %target-swift-frontend %use_no_opaque_pointers -O -I %t -emit-ir -primary-file %s -module-name C | %FileCheck %s -check-prefix=CHECK-C +// RUN: %target-swift-frontend -O -I %t -emit-ir -primary-file %s -module-name C // Fragile optimized .swiftmodule // RUN: %empty-directory(%t) // RUN: %target-build-swift -O -emit-module -emit-module-path=%t/A.swiftmodule -module-name A %S/Inputs/pre_specialize_module.swift // RUN: %target-build-swift -O -I %t -emit-module -emit-module-path=%t/B.swiftmodule -module-name B %S/Inputs/pre_specialize_module_B.swift -// RUN: %target-swift-frontend -O -I %t -emit-ir -primary-file %s -module-name C | %FileCheck %s -check-prefix=CHECK-C +// RUN: %target-swift-frontend %use_no_opaque_pointers -O -I %t -emit-ir -primary-file %s -module-name C | %FileCheck %s -check-prefix=CHECK-C +// RUN: %target-swift-frontend -O -I %t -emit-ir -primary-file %s -module-name C // Resilient .swiftmodule // RUN: %empty-directory(%t) // RUN: %target-build-swift -enable-library-evolution -emit-module -emit-module-path=%t/A.swiftmodule -module-name A %S/Inputs/pre_specialize_module.swift // RUN: %target-build-swift -enable-library-evolution -I %t -emit-module -emit-module-path=%t/B.swiftmodule -module-name B %S/Inputs/pre_specialize_module_B.swift -// RUN: %target-swift-frontend -O -I %t -emit-ir -primary-file %s -module-name C | %FileCheck %s -check-prefix=CHECK-C +// RUN: %target-swift-frontend %use_no_opaque_pointers -O -I %t -emit-ir -primary-file %s -module-name C | %FileCheck %s -check-prefix=CHECK-C +// RUN: %target-swift-frontend -O -I %t -emit-ir -primary-file %s -module-name C // Resilient optimized .swiftmodule // RUN: %empty-directory(%t) // RUN: %target-build-swift -O -enable-library-evolution -emit-module -emit-module-path=%t/A.swiftmodule -module-name A %S/Inputs/pre_specialize_module.swift // RUN: %target-build-swift -O -enable-library-evolution -I %t -emit-module -emit-module-path=%t/B.swiftmodule -module-name B %S/Inputs/pre_specialize_module_B.swift -// RUN: %target-swift-frontend -O -I %t -emit-ir -primary-file %s -module-name C | %FileCheck %s -check-prefix=CHECK-C +// RUN: %target-swift-frontend %use_no_opaque_pointers -O -I %t -emit-ir -primary-file %s -module-name C | %FileCheck %s -check-prefix=CHECK-C +// RUN: %target-swift-frontend -O -I %t -emit-ir -primary-file %s -module-name C // .swiftinterface // RUN: %empty-directory(%t) // RUN: %target-build-swift -c -enable-library-evolution -emit-module-interface-path %t/A.swiftinterface -module-name A %S/Inputs/pre_specialize_module.swift -o %t/A.o -swift-version 5 // RUN: %target-build-swift -c -enable-library-evolution -I %t -emit-module-interface-path %t/B.swiftinterface -module-name B %S/Inputs/pre_specialize_module_B.swift -o %t/B.o -swift-version 5 -// RUN: %target-swift-frontend -O -I %t -emit-ir -primary-file %s -module-name C | %FileCheck %s -check-prefix=CHECK-C +// RUN: %target-swift-frontend %use_no_opaque_pointers -O -I %t -emit-ir -primary-file %s -module-name C | %FileCheck %s -check-prefix=CHECK-C +// RUN: %target-swift-frontend -O -I %t -emit-ir -primary-file %s -module-name C // Optimized .swiftinterface // RUN: %empty-directory(%t) // RUN: %target-build-swift -O -c -enable-library-evolution -emit-module-interface-path %t/A.swiftinterface -module-name A %S/Inputs/pre_specialize_module.swift -o %t/A.o -swift-version 5 // RUN: %target-build-swift -O -c -enable-library-evolution -I %t -emit-module-interface-path %t/B.swiftinterface -module-name B %S/Inputs/pre_specialize_module_B.swift -o %t/B.o -swift-version 5 -// RUN: %target-swift-frontend -O -I %t -emit-ir -primary-file %s -module-name C | %FileCheck %s -check-prefix=CHECK-C +// RUN: %target-swift-frontend %use_no_opaque_pointers -O -I %t -emit-ir -primary-file %s -module-name C | %FileCheck %s -check-prefix=CHECK-C +// RUN: %target-swift-frontend -O -I %t -emit-ir -primary-file %s -module-name C import A import B diff --git a/test/IRGen/preserve_exclusivity.swift b/test/IRGen/preserve_exclusivity.swift index 72fb40e3efd49..a991df4ef3ff9 100644 --- a/test/IRGen/preserve_exclusivity.swift +++ b/test/IRGen/preserve_exclusivity.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -swift-version 4 -parse-stdlib -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xllvm -sil-disable-pass=GenericSpecializer -emit-ir -O %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -swift-version 4 -parse-stdlib -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xllvm -sil-disable-pass=GenericSpecializer -emit-ir -O %s | %FileCheck %s +// RUN: %target-swift-frontend -swift-version 4 -parse-stdlib -Xllvm -sil-disable-pass=FunctionSignatureOpts -Xllvm -sil-disable-pass=GenericSpecializer -emit-ir -O %s // // Check that the -O pipeline always preserves the runtime calls for Builtin access markers and that the KeyPath implementation is fully inlined. diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-2argument-1_distinct_use-1st_argument_generic_class-2nd_argument_distinct_generic_class.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-2argument-1_distinct_use-1st_argument_generic_class-2nd_argument_distinct_generic_class.swift index 8346323d0790d..bb11d2f31a47d 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-2argument-1_distinct_use-1st_argument_generic_class-2nd_argument_distinct_generic_class.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-2argument-1_distinct_use-1st_argument_generic_class-2nd_argument_distinct_generic_class.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-2argument-1_distinct_use-1st_argument_generic_class-2nd_argument_same_generic_class_different_value.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-2argument-1_distinct_use-1st_argument_generic_class-2nd_argument_same_generic_class_different_value.swift index fbfe16bee3a96..0c6b8325bced0 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-2argument-1_distinct_use-1st_argument_generic_class-2nd_argument_same_generic_class_different_value.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-2argument-1_distinct_use-1st_argument_generic_class-2nd_argument_same_generic_class_different_value.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-2argument-1_distinct_use-1st_argument_generic_class-2nd_argument_same_generic_class_same_value.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-2argument-1_distinct_use-1st_argument_generic_class-2nd_argument_same_generic_class_same_value.swift index 00d8c58193163..09da3835f4fa9 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-2argument-1_distinct_use-1st_argument_generic_class-2nd_argument_same_generic_class_same_value.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-2argument-1_distinct_use-1st_argument_generic_class-2nd_argument_same_generic_class_same_value.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1arg-2ancs-1distinct_use-1st_anc_gen-1arg-1st_arg_con_int-2nd_anc_gen-1st-arg_con_double.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1arg-2ancs-1distinct_use-1st_anc_gen-1arg-1st_arg_con_int-2nd_anc_gen-1st-arg_con_double.swift index db0fce7efb2f5..4623da883707c 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1arg-2ancs-1distinct_use-1st_anc_gen-1arg-1st_arg_con_int-2nd_anc_gen-1st-arg_con_double.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1arg-2ancs-1distinct_use-1st_anc_gen-1arg-1st_arg_con_int-2nd_anc_gen-1st-arg_con_double.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1arg-2ancs-1distinct_use-1st_anc_gen-1arg-1st_arg_con_int-2nd_anc_gen-1st-arg_subclass_arg.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1arg-2ancs-1distinct_use-1st_anc_gen-1arg-1st_arg_con_int-2nd_anc_gen-1st-arg_subclass_arg.swift index b88e222b8610a..b3f3b42e67408 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1arg-2ancs-1distinct_use-1st_anc_gen-1arg-1st_arg_con_int-2nd_anc_gen-1st-arg_subclass_arg.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1arg-2ancs-1distinct_use-1st_anc_gen-1arg-1st_arg_con_int-2nd_anc_gen-1st-arg_subclass_arg.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1arg-2ancs-1distinct_use-1st_anc_gen-1arg-1st_arg_subclass_arg-2nd_anc_gen-1st-arg_con_int.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1arg-2ancs-1distinct_use-1st_anc_gen-1arg-1st_arg_subclass_arg-2nd_anc_gen-1st-arg_con_int.swift index e3dc8953c008e..c2b0575bf35be 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1arg-2ancs-1distinct_use-1st_anc_gen-1arg-1st_arg_subclass_arg-2nd_anc_gen-1st-arg_con_int.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1arg-2ancs-1distinct_use-1st_anc_gen-1arg-1st_arg_subclass_arg-2nd_anc_gen-1st-arg_con_int.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1arg-2ancs-1distinct_use-1st_anc_gen-1arg-1st_arg_subcls_arg-2nd_anc_gen-1st-arg_subcls_arg.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1arg-2ancs-1distinct_use-1st_anc_gen-1arg-1st_arg_subcls_arg-2nd_anc_gen-1st-arg_subcls_arg.swift index 2fe6a61086f9d..375eeeb00a305 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1arg-2ancs-1distinct_use-1st_anc_gen-1arg-1st_arg_subcls_arg-2nd_anc_gen-1st-arg_subcls_arg.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1arg-2ancs-1distinct_use-1st_anc_gen-1arg-1st_arg_subcls_arg-2nd_anc_gen-1st-arg_subcls_arg.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_generic-1argument-1st_argument_constant_int.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_generic-1argument-1st_argument_constant_int.swift index c536f9c50dbb4..89b60e223c595 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_generic-1argument-1st_argument_constant_int.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_generic-1argument-1st_argument_constant_int.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_generic-1argument-1st_argument_subclass_argument.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_generic-1argument-1st_argument_subclass_argument.swift index 705a1647fb177..ba63e999e6dc6 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_generic-1argument-1st_argument_subclass_argument.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_generic-1argument-1st_argument_subclass_argument.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_generic-1argument-1st_argument_superclass.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_generic-1argument-1st_argument_superclass.swift index ab521fcf87909..f1e2b78a91300 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_generic-1argument-1st_argument_superclass.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_generic-1argument-1st_argument_superclass.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_nongeneric-external-nonresilient.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_nongeneric-external-nonresilient.swift index bb198fcf881d4..9bbdaba6d8f1f 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_nongeneric-external-nonresilient.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_nongeneric-external-nonresilient.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -emit-library -module-name TestModule -module-link-name TestModule %S/Inputs/class-open-0argument.swift -emit-module-interface -swift-version 5 -o %t/%target-library-name(TestModule) -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_nongeneric-external-resilient.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_nongeneric-external-resilient.swift index f1950be21f984..7926eb3c11b24 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_nongeneric-external-resilient.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_nongeneric-external-resilient.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -emit-library -module-name TestModule -module-link-name TestModule %S/Inputs/class-open-0argument.swift -emit-module-interface -swift-version 5 -o %t/%target-library-name(TestModule) -enable-library-evolution -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_nongeneric-fileprivate.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_nongeneric-fileprivate.swift index 69cd21cd755c4..d1e6c5c2e6391 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_nongeneric-fileprivate.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1ancestor-1distinct_use-1st_ancestor_nongeneric-fileprivate.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use-1st_argument_generic_class-1argument.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use-1st_argument_generic_class-1argument.swift index 5adf251e8b970..0e0015b3d6d26 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use-1st_argument_generic_class-1argument.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use-1st_argument_generic_class-1argument.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use.swift index b897cf33ac8e4..0da74f1f838b7 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_class.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_class.swift index 148276d019d5d..fa3676ac6b462 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_class.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_class.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_function.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_function.swift index 4a54fe85b9420..2d0ee7ca3c3b7 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_function.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_function.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_generic_class.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_generic_class.swift index 67580f03e43d7..b27bc0661e845 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_generic_class.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_generic_class.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_generic_class_specialized_at_generic_class.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_generic_class_specialized_at_generic_class.swift index 9a561f0550075..754821f6d69d0 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_generic_class_specialized_at_generic_class.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_generic_class_specialized_at_generic_class.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_generic_enum.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_generic_enum.swift index b0bf382cc287c..b7c4da7e2617c 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_generic_enum.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_generic_enum.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_generic_struct.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_generic_struct.swift index 8327a3d810003..314326f98f523 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_generic_struct.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_generic_struct.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_tuple.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_tuple.swift index f40eadced7ed6..e33cfd9d0fcc9 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_tuple.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-1distinct_use_tuple.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-2ancestor-1du-1st_ancestor_generic-fileprivate-2nd_ancestor_nongeneric.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-2ancestor-1du-1st_ancestor_generic-fileprivate-2nd_ancestor_nongeneric.swift index 0091f1ea51abe..36d02ec3f1180 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-2ancestor-1du-1st_ancestor_generic-fileprivate-2nd_ancestor_nongeneric.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-2ancestor-1du-1st_ancestor_generic-fileprivate-2nd_ancestor_nongeneric.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s > %t/out.ir +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s > %t/out.ir +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s // RUN: %FileCheck --input-file=%t/out.ir %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor // REQUIRES: VENDOR=apple || OS=linux-gnu diff --git a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-2ancestor-1du-1st_ancestor_nongeneric-fileprivate-2nd_ancestor_generic.swift b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-2ancestor-1du-1st_ancestor_nongeneric-fileprivate-2nd_ancestor_generic.swift index 620a2d8d2c329..bb361f09496b8 100644 --- a/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-2ancestor-1du-1st_ancestor_nongeneric-fileprivate-2nd_ancestor_generic.swift +++ b/test/IRGen/prespecialized-metadata/class-fileprivate-inmodule-1argument-2ancestor-1du-1st_ancestor_nongeneric-fileprivate-2nd_ancestor_generic.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment --check-prefix=CHECK --check-prefix=CHECK-%target-vendor +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/class-inmodule-0argument-within-class-1argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/class-inmodule-0argument-within-class-1argument-1distinct_use.swift index 30bb4843b9b03..25bc306809504 100644 --- a/test/IRGen/prespecialized-metadata/class-inmodule-0argument-within-class-1argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/class-inmodule-0argument-within-class-1argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -parse-stdlib -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -parse-stdlib -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -parse-stdlib -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-extradata-no_payload_size-trailing_flags.swift b/test/IRGen/prespecialized-metadata/enum-extradata-no_payload_size-trailing_flags.swift index 2ceaa001dfeb5..c0138f6c92eb3 100644 --- a/test/IRGen/prespecialized-metadata/enum-extradata-no_payload_size-trailing_flags.swift +++ b/test/IRGen/prespecialized-metadata/enum-extradata-no_payload_size-trailing_flags.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-extradata-payload_size-no_trailing_flags.swift b/test/IRGen/prespecialized-metadata/enum-extradata-payload_size-no_trailing_flags.swift index b5bcaf402ce4a..546d14dca9637 100644 --- a/test/IRGen/prespecialized-metadata/enum-extradata-payload_size-no_trailing_flags.swift +++ b/test/IRGen/prespecialized-metadata/enum-extradata-payload_size-no_trailing_flags.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -enable-library-evolution -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-library-evolution -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend -enable-library-evolution -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-extradata-payload_size-trailing_flags.swift b/test/IRGen/prespecialized-metadata/enum-extradata-payload_size-trailing_flags.swift index b24584b6baf86..07d27bc76d911 100644 --- a/test/IRGen/prespecialized-metadata/enum-extradata-payload_size-trailing_flags.swift +++ b/test/IRGen/prespecialized-metadata/enum-extradata-payload_size-trailing_flags.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -enable-library-evolution -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -enable-library-evolution -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -enable-library-evolution -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-fileprivate-inmodule-1argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/enum-fileprivate-inmodule-1argument-1distinct_use.swift index 92bee8218341a..0062df60d7f09 100644 --- a/test/IRGen/prespecialized-metadata/enum-fileprivate-inmodule-1argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/enum-fileprivate-inmodule-1argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-0argument-within-class-1argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-0argument-within-class-1argument-1distinct_use.swift index 24e3843075e86..d9efaf04776c5 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-0argument-within-class-1argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-0argument-within-class-1argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-0distinct_use.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-0distinct_use.swift index e5c037c56b960..665068ea8ed16 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-0distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-0distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-1distinct_use.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-1distinct_use.swift index 21666748b2b9b..d95d30d28a2fa 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-external_nonresilient-1distinct_use.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-external_nonresilient-1distinct_use.swift index b0b7c17e8bcb9..23c1aea13ad32 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-external_nonresilient-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-external_nonresilient-1distinct_use.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -emit-library -module-name TestModule -module-link-name TestModule %S/Inputs/protocol-public-empty.swift -emit-module-interface -swift-version 5 -o %t/%target-library-name(TestModule) -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-external_resilient-1distinct_use.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-external_resilient-1distinct_use.swift index 6e19b25ea1262..7894dcd9c0071 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-external_resilient-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-external_resilient-1distinct_use.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -enable-library-evolution -emit-library -module-name TestModule -module-link-name TestModule %S/Inputs/protocol-public-empty.swift -emit-module-interface -swift-version 5 -o %t/%target-library-name(TestModule) -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-public-1distinct_use.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-public-1distinct_use.swift index b4b0d10fd41e1..071398d5fab43 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-public-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-public-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-stdlib_equatable-1distinct_use.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-stdlib_equatable-1distinct_use.swift index 52814d8f439ae..905f3a3b3ea50 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-stdlib_equatable-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1conformance-stdlib_equatable-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1distinct_generic_use.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1distinct_generic_use.swift index 3879e256036d5..3da3851fbfdc9 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1distinct_generic_use.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1distinct_generic_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1distinct_use.swift index 74a8f0463a686..541969174f680 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-within-class-1argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-within-class-1argument-1distinct_use.swift index 06502a8c3f0f6..aa42102b777f9 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-within-class-1argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-within-class-1argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-within-enum-1argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-within-enum-1argument-1distinct_use.swift index 4c3582ae561a4..81d606ef5542e 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-within-enum-1argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-within-enum-1argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-within-struct-1argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-within-struct-1argument-1distinct_use.swift index f120902933015..a3cd98cc54c17 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-within-struct-1argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-1argument-within-struct-1argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-2argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-2argument-1distinct_use.swift index 31305eb4e21ee..53ffb42c68c1f 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-2argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-2argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-3argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-3argument-1distinct_use.swift index d04cd0f3b7de7..dfda16922a22f 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-3argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-3argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-4argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-4argument-1distinct_use.swift index a43f4acc69f1a..eebdce007bfa0 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-4argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-4argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-5argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-5argument-1distinct_use.swift index d209ec96a886a..29432f5c43a84 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-5argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-5argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-evolution-1argument-1distinct_use-external_resilient-frozen.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-evolution-1argument-1distinct_use-external_resilient-frozen.swift index fd18a27ee4284..5be19ee344e23 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-evolution-1argument-1distinct_use-external_resilient-frozen.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-evolution-1argument-1distinct_use-external_resilient-frozen.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -enable-library-evolution -emit-library -module-name TestModule -module-link-name TestModule %S/Inputs/struct-public-frozen-0argument.swift -emit-module-interface -swift-version 5 -o %t/%target-library-name(TestModule) -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-evolution-1argument-1distinct_use-external_resilient-nonfrozen.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-evolution-1argument-1distinct_use-external_resilient-nonfrozen.swift index 6eb3f4f6848b5..9d44d85950e9e 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-evolution-1argument-1distinct_use-external_resilient-nonfrozen.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-evolution-1argument-1distinct_use-external_resilient-nonfrozen.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -enable-library-evolution -emit-library -module-name TestModule -module-link-name TestModule %S/Inputs/struct-public-nonfrozen-0argument.swift -emit-module-interface -swift-version 5 -o %t/%target-library-name(TestModule) -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir -I %t -L %t %s // UNSUPPORTED: CPU=i386 && OS=ios // UNSUPPORTED: CPU=armv7 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-inmodule-evolution-1argument-1distinct_use-payload_size.swift b/test/IRGen/prespecialized-metadata/enum-inmodule-evolution-1argument-1distinct_use-payload_size.swift index 230579b51253c..8c1fc48e6d532 100644 --- a/test/IRGen/prespecialized-metadata/enum-inmodule-evolution-1argument-1distinct_use-payload_size.swift +++ b/test/IRGen/prespecialized-metadata/enum-inmodule-evolution-1argument-1distinct_use-payload_size.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -enable-library-evolution -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -enable-library-evolution -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -enable-library-evolution -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/enum-outmodule-1argument-1distinct_use-struct-inmodule.swift b/test/IRGen/prespecialized-metadata/enum-outmodule-1argument-1distinct_use-struct-inmodule.swift index ae3abb8af8d0a..a6b17617890c9 100644 --- a/test/IRGen/prespecialized-metadata/enum-outmodule-1argument-1distinct_use-struct-inmodule.swift +++ b/test/IRGen/prespecialized-metadata/enum-outmodule-1argument-1distinct_use-struct-inmodule.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/enum-public-nonfrozen-1argument.swift -emit-library -o %t/%target-library-name(Argument) -emit-module -module-name Argument -emit-module-path %t/Argument.swiftmodule -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-extradata-field_offsets-no_trailing_flags.swift b/test/IRGen/prespecialized-metadata/struct-extradata-field_offsets-no_trailing_flags.swift index b4a20194dcdb7..a897ea43e47b8 100644 --- a/test/IRGen/prespecialized-metadata/struct-extradata-field_offsets-no_trailing_flags.swift +++ b/test/IRGen/prespecialized-metadata/struct-extradata-field_offsets-no_trailing_flags.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-extradata-field_offsets-trailing_flags.swift b/test/IRGen/prespecialized-metadata/struct-extradata-field_offsets-trailing_flags.swift index e73af86137df7..b27153c1e92c2 100644 --- a/test/IRGen/prespecialized-metadata/struct-extradata-field_offsets-trailing_flags.swift +++ b/test/IRGen/prespecialized-metadata/struct-extradata-field_offsets-trailing_flags.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-extradata-no_field_offsets-trailing_flags.swift b/test/IRGen/prespecialized-metadata/struct-extradata-no_field_offsets-trailing_flags.swift index 93d08ef8d5690..fd709e5c03079 100644 --- a/test/IRGen/prespecialized-metadata/struct-extradata-no_field_offsets-trailing_flags.swift +++ b/test/IRGen/prespecialized-metadata/struct-extradata-no_field_offsets-trailing_flags.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-fileprivate-inmodule-1argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-fileprivate-inmodule-1argument-1distinct_use.swift index a46ddbd7c0acc..893ec90c43320 100644 --- a/test/IRGen/prespecialized-metadata/struct-fileprivate-inmodule-1argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-fileprivate-inmodule-1argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-0argument-within-class-1argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-0argument-within-class-1argument-1distinct_use.swift index 6dd07dd762823..39c49bffc61b7 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-0argument-within-class-1argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-0argument-within-class-1argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-0argument.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-0argument.swift index a55f39046aaec..9050aea692ca6 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-0argument.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-0argument.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-0distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-0distinct_use.swift index 55b7d275daf94..8bce62199c04e 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-0distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-0distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-1conformance-1distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-1conformance-1distinct_use.swift index d75329263fcf3..1020532ddfe69 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-1conformance-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-1conformance-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-1conformance-stdlib_equatable-1distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-1conformance-stdlib_equatable-1distinct_use.swift index d9ae3d597c10d..d78186e61835e 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-1conformance-stdlib_equatable-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-1conformance-stdlib_equatable-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-1distinct_generic_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-1distinct_generic_use.swift index 8775af94f2719..47129d8a535d3 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-1distinct_generic_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-1distinct_generic_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-1distinct_use.swift index 5285b516399aa..95fab62c437d5 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-2conformance-1distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-2conformance-1distinct_use.swift index dd803cec7e977..a5d49f3c99d69 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-2conformance-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-2conformance-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-2distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-2distinct_use.swift index b0a1f42f86b0f..03f0e7490f643 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-2distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-2distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-3conformance-1distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-3conformance-1distinct_use.swift index 9e2504ab14554..4924ad5aca560 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-3conformance-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-3conformance-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-3distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-3distinct_use.swift index 94a9e4149804d..6dec80f4e9718 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-3distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-3distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-4conformance-1distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-4conformance-1distinct_use.swift index f8eefdeb126c2..8581eac938130 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-4conformance-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-4conformance-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-4distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-4distinct_use.swift index 3299f92ddf74a..a5228c8ceb010 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-4distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-4distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-5conformance-1distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-5conformance-1distinct_use.swift index 927c4914d01cf..e6271febfcae4 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-5conformance-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-5conformance-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-5distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-5distinct_use.swift index 4cd7d3d054c6b..8fb3ccf2aff34 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-5distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-5distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-clang_node-1distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-clang_node-1distinct_use.swift index 207c99b6bb0fb..0db38312cab16 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-clang_node-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-clang_node-1distinct_use.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %build-irgen-test-overlays(mock-sdk-directory: %S/../Inputs) // REQUIRES: VENDOR=apple || OS=linux-gnu -// RUN: %target-swift-frontend(mock-sdk: -sdk %S/../Inputs -I %t) -prespecialize-generic-metadata -target %module-target-future -primary-file %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/../Inputs -I %t) %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -primary-file %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend(mock-sdk: -sdk %S/../Inputs -I %t) -prespecialize-generic-metadata -target %module-target-future -primary-file %s -emit-ir // UNSUPPORTED: CPU=i386 && OS=ios // UNSUPPORTED: CPU=armv7 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-within-class-1argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-within-class-1argument-1distinct_use.swift index 25aaa7753c470..3f0e9f22827a2 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-within-class-1argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-within-class-1argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-within-enum-1argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-within-enum-1argument-1distinct_use.swift index 925686444780a..8558ff2ab566b 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-within-enum-1argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-within-enum-1argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-within-struct-1argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-within-struct-1argument-1distinct_use.swift index f62bb135d34f8..13c56ca8a25da 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-within-struct-1argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-within-struct-1argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-within-struct-2argument-constrained_extension-equal_arguments-1distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-within-struct-2argument-constrained_extension-equal_arguments-1distinct_use.swift index bd81b0e76e9ac..9d939421258e6 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-within-struct-2argument-constrained_extension-equal_arguments-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-1argument-within-struct-2argument-constrained_extension-equal_arguments-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-0distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-0distinct_use.swift index 849813b8f450c..895f6bc237d2e 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-0distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-0distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-1distinct_use.swift index 83e07da85cbcc..6410830c3b173 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-2distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-2distinct_use.swift index 43c6e2df83bdc..b10038366984d 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-2distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-2distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-3distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-3distinct_use.swift index a0ad2f781f5cf..bcdd439be0069 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-3distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-3distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-4distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-4distinct_use.swift index 066daac00ff58..ddc3303be4d84 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-4distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-4distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-5distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-5distinct_use.swift index 4e2229a75f0a5..4d1fe2db7c9d3 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-5distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-5distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-within-class-1argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-within-class-1argument-1distinct_use.swift index fc633e7aeafaf..8285b4405f4d0 100644 --- a/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-within-class-1argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-inmodule-2argument-within-class-1argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-1argument-1distinct_use-struct-inmodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-1argument-1distinct_use-struct-inmodule.swift index 19b756af12890..6e360b2d815a8 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-1argument-1distinct_use-struct-inmodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-1argument-1distinct_use-struct-inmodule.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-1argument.swift -emit-library -o %t/%target-library-name(Argument) -emit-module -module-name Argument -emit-module-path %t/Argument.swiftmodule -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-1argument-1distinct_use-struct-outmodule-othermodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-1argument-1distinct_use-struct-outmodule-othermodule.swift index 65162857f7c8b..c35fdc1755e0d 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-1argument-1distinct_use-struct-outmodule-othermodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-1argument-1distinct_use-struct-outmodule-othermodule.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-1argument.swift -emit-library -o %t/%target-library-name(Generic) -emit-module -module-name Generic -emit-module-path %t/Generic.swiftmodule // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-0argument.swift -emit-library -o %t/%target-library-name(Argument) -emit-module -module-name Argument -emit-module-path %t/Argument.swiftmodule -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-1argument-1distinct_use-struct-outmodule-samemodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-1argument-1distinct_use-struct-outmodule-samemodule.swift index 5d9e3c58f36e2..dbc3999267f2f 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-1argument-1distinct_use-struct-outmodule-samemodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-1argument-1distinct_use-struct-outmodule-samemodule.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-1argument.swift %S/Inputs/struct-public-nonfrozen-0argument.swift -emit-library -o %t/%target-library-name(Argument) -emit-module -module-name Argument -emit-module-path %t/Argument.swiftmodule -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_protocol_inmodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_protocol_inmodule.swift index c601ef5a80203..dd521bf2f4cce 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_protocol_inmodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_protocol_inmodule.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-1argument-1constraint.swift %S/Inputs/protocol-public-empty.swift %S/Inputs/struct-public-nonfrozen-0argument.swift %S/Inputs/struct-public-nonfrozen-0argument-conformance-empty.swift -emit-library -o %t/%target-library-name(Argument) -emit-module -module-name Argument -emit-module-path %t/Argument.swiftmodule -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_protocol_outmodule_othermodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_protocol_outmodule_othermodule.swift index 950f598068485..9caa117c425e2 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_protocol_outmodule_othermodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_protocol_outmodule_othermodule.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-1argument-1constraint.swift %S/Inputs/protocol-public-empty.swift %S/Inputs/struct-public-nonfrozen-0argument.swift -emit-library -o %t/%target-library-name(Module) -emit-module -module-name Module -emit-module-path %t/Module.swiftmodule // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-0argument-conformance-empty.swift -emit-library -o %t/%target-library-name(Argument) -emit-module -module-name Argument -emit-module-path %t/Argument.swiftmodule -DIMPORT_MODULE -L %t -I %t -lModule -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lModule -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lModule -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lModule -lArgument // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_protocol_outmodule_samemodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_protocol_outmodule_samemodule.swift index 9489267253159..fae205c329e8c 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_protocol_outmodule_samemodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_protocol_outmodule_samemodule.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-1argument-1constraint.swift %S/Inputs/protocol-public-empty.swift %S/Inputs/struct-public-nonfrozen-0argument.swift %S/Inputs/struct-public-nonfrozen-0argument-conformance-empty.swift -emit-library -o %t/%target-library-name(Argument) -emit-module -module-name Argument -emit-module-path %t/Argument.swiftmodule -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_struct_inmodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_struct_inmodule.swift index 32a1f59e3c8b0..68e823f377983 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_struct_inmodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_struct_inmodule.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-1argument-1constraint.swift %S/Inputs/struct-public-nonfrozen-0argument.swift %S/Inputs/protocol-public-empty.swift -emit-library -o %t/%target-library-name(Module) -emit-module -module-name Module -emit-module-path %t/Module.swiftmodule -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s %S/Inputs/main.swift %S/Inputs/struct-public-nonfrozen-0argument-conformance-empty.swift -module-name main -L %t -I %t -lModule -DIMPORT_MODULE | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s %S/Inputs/main.swift %S/Inputs/struct-public-nonfrozen-0argument-conformance-empty.swift -module-name main -L %t -I %t -lModule -DIMPORT_MODULE | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s %S/Inputs/main.swift %S/Inputs/struct-public-nonfrozen-0argument-conformance-empty.swift -module-name main -L %t -I %t -lModule -DIMPORT_MODULE // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_struct_outmodule_othermodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_struct_outmodule_othermodule.swift index 76521a4189d61..211818ab3c5e6 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_struct_outmodule_othermodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_struct_outmodule_othermodule.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-2argument.swift %S/Inputs/struct-public-nonfrozen-0argument.swift -emit-library -o %t/%target-library-name(Module) -emit-module -module-name Module -emit-module-path %t/Module.swiftmodule // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-0argument.swift -emit-library -o %t/%target-library-name(Argument) -emit-module -module-name Argument -emit-module-path %t/Argument.swiftmodule -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_struct_outmodule_samemodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_struct_outmodule_samemodule.swift index 0c3e362ce8212..7a205fc75adc0 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_struct_outmodule_samemodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-2argument-1du-1arg_struct_outmodule_samemodule-2arg_struct_outmodule_samemodule.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-2argument.swift %S/Inputs/struct-public-nonfrozen-0argument.swift -emit-library -o %t/%target-library-name(Argument) -emit-module -module-name Argument -emit-module-path %t/Argument.swiftmodule -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lArgument // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-inmodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-inmodule.swift index 73107723415c0..f4a3d90361043 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-inmodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-inmodule.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-frozen-1argument.swift -emit-library -o %t/%target-library-name(Generic) -emit-module -module-name Generic -emit-module-path %t/Generic.swiftmodule -enable-library-evolution -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-outmodule-frozen-othermodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-outmodule-frozen-othermodule.swift index 7cead7f06e44d..60cf92848a930 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-outmodule-frozen-othermodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-outmodule-frozen-othermodule.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-frozen-1argument.swift -emit-library -o %t/%target-library-name(Generic) -emit-module -module-name Generic -emit-module-path %t/Generic.swiftmodule -enable-library-evolution // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-frozen-0argument.swift -emit-library -o %t/%target-library-name(Argument) -emit-module -module-name Argument -emit-module-path %t/Argument.swiftmodule -enable-library-evolution -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-outmodule-frozen-samemodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-outmodule-frozen-samemodule.swift index 9d244ac3cfb88..fcd34968aa90c 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-outmodule-frozen-samemodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-outmodule-frozen-samemodule.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-frozen-1argument.swift %S/Inputs/struct-public-frozen-0argument.swift -emit-library -o %t/%target-library-name(Generic) -emit-module -module-name Generic -emit-module-path %t/Generic.swiftmodule -enable-library-evolution -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-outmodule-resilient-othermodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-outmodule-resilient-othermodule.swift index f74fe5876a098..59706bb3212cc 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-outmodule-resilient-othermodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-outmodule-resilient-othermodule.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-frozen-1argument.swift -emit-library -o %t/%target-library-name(Generic) -emit-module -module-name Generic -emit-module-path %t/Generic.swiftmodule -enable-library-evolution // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-0argument.swift -emit-library -o %t/%target-library-name(Argument) -emit-module -module-name Argument -emit-module-path %t/Argument.swiftmodule -enable-library-evolution -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-outmodule-resilient-samemodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-outmodule-resilient-samemodule.swift index 996489fc04bce..4b6cf60e32a80 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-outmodule-resilient-samemodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-frozen-1argument-1distinct_use-struct-outmodule-resilient-samemodule.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-frozen-1argument.swift %S/Inputs/struct-public-nonfrozen-0argument.swift -emit-library -o %t/%target-library-name(Generic) -emit-module -module-name Generic -emit-module-path %t/Generic.swiftmodule -enable-library-evolution -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-inmodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-inmodule.swift index 6771fb3b0cd83..59e354ef218a9 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-inmodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-inmodule.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-1argument.swift -emit-library -o %t/%target-library-name(Generic) -emit-module -module-name Generic -emit-module-path %t/Generic.swiftmodule -enable-library-evolution -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-frozen-othermodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-frozen-othermodule.swift index e5208842c7af0..04540fe723146 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-frozen-othermodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-frozen-othermodule.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-1argument.swift -emit-library -o %t/%target-library-name(Generic) -emit-module -module-name Generic -emit-module-path %t/Generic.swiftmodule -enable-library-evolution // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-frozen-0argument.swift -emit-library -o %t/%target-library-name(Argument) -emit-module -module-name Argument -emit-module-path %t/Argument.swiftmodule -enable-library-evolution -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-frozen-samemodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-frozen-samemodule.swift index bba412fdb884c..d4c0741e9a4d0 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-frozen-samemodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-frozen-samemodule.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-1argument.swift %S/Inputs/struct-public-frozen-0argument.swift -emit-library -o %t/%target-library-name(Generic) -emit-module -module-name Generic -emit-module-path %t/Generic.swiftmodule -enable-library-evolution -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-othermodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-othermodule.swift index 40f664a6485c5..ec2766707de80 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-othermodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-othermodule.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-1argument.swift -emit-library -o %t/%target-library-name(Generic) -emit-module -module-name Generic -emit-module-path %t/Generic.swiftmodule -enable-library-evolution // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-0argument.swift -emit-library -o %t/%target-library-name(Argument) -emit-module -module-name Argument -emit-module-path %t/Argument.swiftmodule -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-resilient-othermodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-resilient-othermodule.swift index 30f5516f3e4e0..f458807a78c2a 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-resilient-othermodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-resilient-othermodule.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-1argument.swift -emit-library -o %t/%target-library-name(Generic) -emit-module -module-name Generic -emit-module-path %t/Generic.swiftmodule -enable-library-evolution // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-0argument.swift -emit-library -o %t/%target-library-name(Argument) -emit-module -module-name Argument -emit-module-path %t/Argument.swiftmodule -enable-library-evolution -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric -lArgument // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-resilient-samemodule.swift b/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-resilient-samemodule.swift index 13e49953570e0..026da0b0a00e6 100644 --- a/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-resilient-samemodule.swift +++ b/test/IRGen/prespecialized-metadata/struct-outmodule-resilient-1argument-1distinct_use-struct-outmodule-resilient-samemodule.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -prespecialize-generic-metadata -target %module-target-future %S/Inputs/struct-public-nonfrozen-1argument.swift %S/Inputs/struct-public-nonfrozen-0argument.swift -emit-library -o %t/%target-library-name(Generic) -emit-module -module-name Generic -emit-module-path %t/Generic.swiftmodule -enable-library-evolution -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -L %t -I %t -lGeneric // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/prespecialized-metadata/struct-public-inmodule-1argument-1distinct_use.swift b/test/IRGen/prespecialized-metadata/struct-public-inmodule-1argument-1distinct_use.swift index e129cfcff7f97..15e850051c7f6 100644 --- a/test/IRGen/prespecialized-metadata/struct-public-inmodule-1argument-1distinct_use.swift +++ b/test/IRGen/prespecialized-metadata/struct-public-inmodule-1argument-1distinct_use.swift @@ -1,4 +1,5 @@ -// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %swift -prespecialize-generic-metadata -target %module-target-future -emit-ir %s // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/protocol_accessor_multifile.swift b/test/IRGen/protocol_accessor_multifile.swift index 9616753144b4e..3a81ce18b0c14 100644 --- a/test/IRGen/protocol_accessor_multifile.swift +++ b/test/IRGen/protocol_accessor_multifile.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -primary-file %s %S/Inputs/protocol_accessor_multifile_other.swift > %t.ll +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -primary-file %s %S/Inputs/protocol_accessor_multifile_other.swift > %t.ll +// RUN: %target-swift-frontend -emit-ir -primary-file %s %S/Inputs/protocol_accessor_multifile_other.swift // RUN: %FileCheck %s -check-prefix CHECK -check-prefix CHECK-%target-runtime < %t.ll // RUN: %FileCheck -check-prefix NEGATIVE %s < %t.ll diff --git a/test/IRGen/protocol_metadata.swift b/test/IRGen/protocol_metadata.swift index 3685b93313661..8149c2ec19723 100644 --- a/test/IRGen/protocol_metadata.swift +++ b/test/IRGen/protocol_metadata.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -enable-objc-interop // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/protocol_resilience.sil b/test/IRGen/protocol_resilience.sil index 65d5699c0af87..cff832e725de6 100644 --- a/test/IRGen/protocol_resilience.sil +++ b/test/IRGen/protocol_resilience.sil @@ -1,6 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_protocol.swiftmodule -module-name=resilient_protocol %S/../Inputs/resilient_protocol.swift -// RUN: %target-swift-frontend -I %t -emit-ir -Xllvm -sil-disable-pass=Simplification -enable-library-evolution %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir -Xllvm -sil-disable-pass=Simplification -enable-library-evolution %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir -Xllvm -sil-disable-pass=Simplification -enable-library-evolution -O %s +// RUN: %target-swift-frontend -I %t -emit-ir -Xllvm -sil-disable-pass=Simplification -enable-library-evolution %s // RUN: %target-swift-frontend -I %t -emit-ir -Xllvm -sil-disable-pass=Simplification -enable-library-evolution -O %s sil_stage canonical diff --git a/test/IRGen/protocol_resilience_descriptors.swift b/test/IRGen/protocol_resilience_descriptors.swift index 5f03cd53755bb..d3ad192b361e6 100644 --- a/test/IRGen/protocol_resilience_descriptors.swift +++ b/test/IRGen/protocol_resilience_descriptors.swift @@ -1,12 +1,14 @@ // RUN: %empty-directory(%t) // Resilient protocol definition -// RUN: %target-swift-frontend -emit-ir -enable-library-evolution -module-name=resilient_protocol %S/../Inputs/resilient_protocol.swift | %FileCheck -DINT=i%target-ptrsize -check-prefix=CHECK-DEFINITION %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -enable-library-evolution -module-name=resilient_protocol %S/../Inputs/resilient_protocol.swift | %FileCheck -DINT=i%target-ptrsize -check-prefix=CHECK-DEFINITION %s +// RUN: %target-swift-frontend -emit-ir -enable-library-evolution -module-name=resilient_protocol %S/../Inputs/resilient_protocol.swift // Resilient protocol usage // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_protocol.swiftmodule -module-name=resilient_protocol %S/../Inputs/resilient_protocol.swift -// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %s | %FileCheck %s -DINT=i%target-ptrsize -check-prefix=CHECK-USAGE +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir -enable-library-evolution %s | %FileCheck %s -DINT=i%target-ptrsize -check-prefix=CHECK-USAGE +// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %s // ---------------------------------------------------------------------------- // Resilient protocol definition diff --git a/test/IRGen/protocol_resilience_thunks.swift b/test/IRGen/protocol_resilience_thunks.swift index c7eec8338bea1..bc43261eb587a 100644 --- a/test/IRGen/protocol_resilience_thunks.swift +++ b/test/IRGen/protocol_resilience_thunks.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_protocol.swiftmodule -module-name=resilient_protocol %S/../Inputs/resilient_protocol.swift -// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -emit-ir -enable-library-evolution %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s +// RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution %s // RUN: %target-swift-frontend -I %t -emit-ir -enable-library-evolution -O %s // CHECK: %swift.type = type { [[INT:i32|i64]] } diff --git a/test/IRGen/protocol_synthesized.swift b/test/IRGen/protocol_synthesized.swift index 3e16d7d829dd8..a30e64e2da950 100644 --- a/test/IRGen/protocol_synthesized.swift +++ b/test/IRGen/protocol_synthesized.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -parse-stdlib -module-name=Swift -I%S/Inputs %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -parse-stdlib -module-name=Swift -I%S/Inputs %s | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir -parse-stdlib -module-name=Swift -I%S/Inputs %s // This module contains an enum that gets imported by the compiler as an // OptionSet. What we're trying to test here is that a *non-resilient* diff --git a/test/IRGen/protocol_with_superclass.sil b/test/IRGen/protocol_with_superclass.sil index 018e6b7b173d7..25fe2e21beb38 100644 --- a/test/IRGen/protocol_with_superclass.sil +++ b/test/IRGen/protocol_with_superclass.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -primary-file %s -emit-ir sil_stage canonical diff --git a/test/IRGen/protocol_with_superclass_where_clause.sil b/test/IRGen/protocol_with_superclass_where_clause.sil index b33a947d9a385..4807139e283fb 100644 --- a/test/IRGen/protocol_with_superclass_where_clause.sil +++ b/test/IRGen/protocol_with_superclass_where_clause.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir -module-name protocol_with_superclass | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -module-name protocol_with_superclass | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -primary-file %s -emit-ir -module-name protocol_with_superclass sil_stage canonical diff --git a/test/IRGen/related_entity.sil b/test/IRGen/related_entity.sil index 9780e7fe0f9d8..2a84325118fc9 100644 --- a/test/IRGen/related_entity.sil +++ b/test/IRGen/related_entity.sil @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %{python} %utils/chex.py < %s > %t/checkfile -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -emit-ir -o - -primary-file %s -import-objc-header %S/Inputs/error_domains.h > %t/out.ir +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers -enable-objc-interop -emit-ir -o - -primary-file %s -import-objc-header %S/Inputs/error_domains.h > %t/out.ir +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -emit-ir -o - -primary-file %s -import-objc-header %S/Inputs/error_domains.h // RUN: %FileCheck --input-file=%t/out.ir %t/checkfile --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize sil_stage canonical diff --git a/test/IRGen/relative_protocol_witness_table.swift b/test/IRGen/relative_protocol_witness_table.swift index ccc338911ecfd..e5a1bf4d0e827 100644 --- a/test/IRGen/relative_protocol_witness_table.swift +++ b/test/IRGen/relative_protocol_witness_table.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -enable-relative-protocol-witness-tables -module-name A -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-cpu --check-prefix=CHECK +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-relative-protocol-witness-tables -module-name A -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-cpu --check-prefix=CHECK +// RUN: %target-swift-frontend -enable-relative-protocol-witness-tables -module-name A -primary-file %s -emit-ir // REQUIRES: CPU=x86_64 || CPU=arm64 || CPU=arm64e diff --git a/test/IRGen/run_variadic_generics.sil b/test/IRGen/run_variadic_generics.sil index 249ea4d67a98d..f01f38e555af3 100644 --- a/test/IRGen/run_variadic_generics.sil +++ b/test/IRGen/run_variadic_generics.sil @@ -1,8 +1,10 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift-dylib(%t/%target-library-name(PrintShims)) -parse-stdlib %S/../Inputs/print-shims-stdlib.swift -module-name PrintShims -emit-module -emit-module-path %t/PrintShims.swiftmodule // RUN: %target-codesign %t/%target-library-name(PrintShims) -// RUN: %target-build-swift -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim -Onone | %FileCheck %s --check-prefixes=CHECK-LL,CHECK-LL-UNOPT -// RUN: %target-build-swift -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim -O | %FileCheck %s --check-prefixes=CHECK-LL,CHECK-LL-OPT +// RUN: %target-build-swift %use_no_opaque_pointers -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim -Onone | %FileCheck %s --check-prefixes=CHECK-LL,CHECK-LL-UNOPT +// RUN: %target-build-swift %use_no_opaque_pointers -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim -O | %FileCheck %s --check-prefixes=CHECK-LL,CHECK-LL-OPT +// RUN: %target-build-swift -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim -Onone +// RUN: %target-build-swift -g -parse-sil %s -emit-ir -I %t -L %t -lPrintShim -O // RUN: %target-build-swift -g -parse-sil %s -module-name main -o %t/main -I %t -L %t -lPrintShims %target-rpath(%t) // RUN: %target-codesign %t/main // RUN: %target-run %t/main %t/%target-library-name(PrintShims) | %FileCheck %s diff --git a/test/IRGen/runtime-records-are-used.swift b/test/IRGen/runtime-records-are-used.swift index 065b09650c478..e5df1e0d6ebe2 100644 --- a/test/IRGen/runtime-records-are-used.swift +++ b/test/IRGen/runtime-records-are-used.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target arm64-apple-macos11.0 -parse-stdlib %s -module-name Swift -emit-ir -o - | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -target arm64-apple-macos11.0 -parse-stdlib %s -module-name Swift -emit-ir -o - | %FileCheck %s +// RUN: %swift -target arm64-apple-macos11.0 -parse-stdlib %s -module-name Swift -emit-ir -o - public protocol Simple {} diff --git a/test/IRGen/runtime_attributes.swift b/test/IRGen/runtime_attributes.swift index ce7410bd9ec55..38da098162d6f 100644 --- a/test/IRGen/runtime_attributes.swift +++ b/test/IRGen/runtime_attributes.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module-path=%t/RAD.swiftmodule -module-name=RAD -enable-experimental-feature RuntimeDiscoverableAttrs %S/Inputs/runtime_attrs.swift -// RUN: %target-swift-frontend -primary-file %s -emit-ir -I %t -swift-version 5 -enable-experimental-feature RuntimeDiscoverableAttrs | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -I %t -swift-version 5 -enable-experimental-feature RuntimeDiscoverableAttrs | %IRGenFileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -I %t -swift-version 5 -enable-experimental-feature RuntimeDiscoverableAttrs // REQUIRES: asserts // REQUIRES: OS=macosx diff --git a/test/IRGen/runtime_attributes_on_actors.swift b/test/IRGen/runtime_attributes_on_actors.swift index f658dc69faf83..fc267dfd59f69 100644 --- a/test/IRGen/runtime_attributes_on_actors.swift +++ b/test/IRGen/runtime_attributes_on_actors.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module-path=%t/RAD.swiftmodule -module-name=RAD -enable-experimental-feature RuntimeDiscoverableAttrs -disable-availability-checking %S/Inputs/runtime_attrs.swift -// RUN: %target-swift-frontend -primary-file %s -emit-ir -I %t -swift-version 5 -enable-experimental-feature RuntimeDiscoverableAttrs -disable-availability-checking | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -I %t -swift-version 5 -enable-experimental-feature RuntimeDiscoverableAttrs -disable-availability-checking | %IRGenFileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -I %t -swift-version 5 -enable-experimental-feature RuntimeDiscoverableAttrs -disable-availability-checking // REQUIRES: asserts // REQUIRES: OS=macosx diff --git a/test/IRGen/runtime_attributes_on_distributed_actors.swift b/test/IRGen/runtime_attributes_on_distributed_actors.swift index 68934bbdf6b79..3825458ebee53 100644 --- a/test/IRGen/runtime_attributes_on_distributed_actors.swift +++ b/test/IRGen/runtime_attributes_on_distributed_actors.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module-path=%t/RAD.swiftmodule -module-name=RAD -enable-experimental-feature RuntimeDiscoverableAttrs -disable-availability-checking %S/Inputs/runtime_attrs.swift -// RUN: %target-swift-frontend -primary-file %s -emit-ir -I %t -swift-version 5 -enable-experimental-feature RuntimeDiscoverableAttrs -disable-availability-checking | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -I %t -swift-version 5 -enable-experimental-feature RuntimeDiscoverableAttrs -disable-availability-checking | %IRGenFileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -I %t -swift-version 5 -enable-experimental-feature RuntimeDiscoverableAttrs -disable-availability-checking // REQUIRES: asserts // REQUIRES: OS=macosx diff --git a/test/IRGen/runtime_calling_conventions.swift b/test/IRGen/runtime_calling_conventions.swift index 0875604ca1947..3d621a4153f0b 100644 --- a/test/IRGen/runtime_calling_conventions.swift +++ b/test/IRGen/runtime_calling_conventions.swift @@ -1,6 +1,8 @@ -// RUN: %target-swift-frontend -module-name runtime_calling_conventions -parse-as-library -emit-ir %s | %FileCheck %s -// RUN: %target-swift-frontend -module-name runtime_calling_conventions -parse-as-library -O -emit-ir %s | %FileCheck --check-prefix=OPT-CHECK %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name runtime_calling_conventions -parse-as-library -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name runtime_calling_conventions -parse-as-library -O -emit-ir %s | %FileCheck --check-prefix=OPT-CHECK %s +// RUN: %target-swift-frontend -module-name runtime_calling_conventions -parse-as-library -emit-ir %s +// RUN: %target-swift-frontend -module-name runtime_calling_conventions -parse-as-library -O -emit-ir %s // Test that runtime functions are invoked using the new calling convention. diff --git a/test/IRGen/same_type_constraints.swift b/test/IRGen/same_type_constraints.swift index 9c80850adf806..5375de21aeb0f 100644 --- a/test/IRGen/same_type_constraints.swift +++ b/test/IRGen/same_type_constraints.swift @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -emit-ir -primary-file %s -disable-objc-attr-requires-foundation-module | %FileCheck %s -// RUN: %target-swift-frontend -Osize -emit-ir -primary-file %s -disable-objc-attr-requires-foundation-module | %FileCheck %s --check-prefix=OSIZE +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -primary-file %s -disable-objc-attr-requires-foundation-module | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -Osize -emit-ir -primary-file %s -disable-objc-attr-requires-foundation-module | %FileCheck %s --check-prefix=OSIZE +// RUN: %target-swift-frontend -emit-ir -primary-file %s -disable-objc-attr-requires-foundation-module +// RUN: %target-swift-frontend -Osize -emit-ir -primary-file %s -disable-objc-attr-requires-foundation-module // Ensure that same-type constraints between generic arguments get reflected // correctly in the type context descriptor. diff --git a/test/IRGen/select_enum.sil b/test/IRGen/select_enum.sil index cde3c2837c988..1504c071acfad 100644 --- a/test/IRGen/select_enum.sil +++ b/test/IRGen/select_enum.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -gnone -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -Xllvm -sil-disable-pass=simplification -gnone -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -gnone -emit-ir %s import Builtin diff --git a/test/IRGen/select_enum_single_payload.sil b/test/IRGen/select_enum_single_payload.sil index b7b0f533466d6..b75a89bef066e 100644 --- a/test/IRGen/select_enum_single_payload.sil +++ b/test/IRGen/select_enum_single_payload.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-ptrsize +// RUN: %target-swift-frontend %s -emit-ir // REQUIRES: CPU=i386 || CPU=x86_64 sil_stage canonical diff --git a/test/IRGen/signature_conformances_multifile.swift b/test/IRGen/signature_conformances_multifile.swift index 3b6333fa3b87f..0dfc5e711e33c 100644 --- a/test/IRGen/signature_conformances_multifile.swift +++ b/test/IRGen/signature_conformances_multifile.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -disable-generic-metadata-prespecialization -emit-ir -primary-file %s %S/Inputs/signature_conformances_other.swift | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-generic-metadata-prespecialization -emit-ir -primary-file %s %S/Inputs/signature_conformances_other.swift | %FileCheck %s +// RUN: %target-swift-frontend -disable-generic-metadata-prespecialization -emit-ir -primary-file %s %S/Inputs/signature_conformances_other.swift // Make sure we correctly determine the witness table is dependent, even though // it was defined in a different file. diff --git a/test/IRGen/signature_conformances_multifile_future.swift b/test/IRGen/signature_conformances_multifile_future.swift index f874783809b1d..07edd634a8f83 100644 --- a/test/IRGen/signature_conformances_multifile_future.swift +++ b/test/IRGen/signature_conformances_multifile_future.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir -primary-file %s %S/Inputs/signature_conformances_other.swift | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir -primary-file %s %S/Inputs/signature_conformances_other.swift | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir -primary-file %s %S/Inputs/signature_conformances_other.swift // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/sil_generic_witness_methods.swift b/test/IRGen/sil_generic_witness_methods.swift index 4f4ad9cf75b9a..3cf5da8e8d7b3 100644 --- a/test/IRGen/sil_generic_witness_methods.swift +++ b/test/IRGen/sil_generic_witness_methods.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/sil_generic_witness_methods_objc.swift b/test/IRGen/sil_generic_witness_methods_objc.swift index 9d7c652b567d2..4dcc270d4698b 100644 --- a/test/IRGen/sil_generic_witness_methods_objc.swift +++ b/test/IRGen/sil_generic_witness_methods_objc.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/sil_witness_methods.sil b/test/IRGen/sil_witness_methods.sil index aa9112c8938a6..94eb535b82f50 100644 --- a/test/IRGen/sil_witness_methods.sil +++ b/test/IRGen/sil_witness_methods.sil @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -enable-objc-interop %s -emit-ir | %FileCheck --check-prefixes=CHECK,CHECK-objc %s -// RUN: %target-swift-frontend -disable-objc-interop %s -emit-ir | %FileCheck --check-prefixes=CHECK,CHECK-native %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop %s -emit-ir | %FileCheck --check-prefixes=CHECK,CHECK-objc %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-objc-interop %s -emit-ir | %FileCheck --check-prefixes=CHECK,CHECK-native %s +// RUN: %target-swift-frontend -enable-objc-interop %s -emit-ir +// RUN: %target-swift-frontend -disable-objc-interop %s -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/sil_witness_tables.swift b/test/IRGen/sil_witness_tables.swift index 8f27883fa4cb0..a778b6302aa87 100644 --- a/test/IRGen/sil_witness_tables.swift +++ b/test/IRGen/sil_witness_tables.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -static -o %t %S/sil_witness_tables_external_conformance.swift -// RUN: %target-swift-frontend -I %t -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -I %t -primary-file %s -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/sil_witness_tables_external_witnesstable.swift b/test/IRGen/sil_witness_tables_external_witnesstable.swift index c4830a33517c2..3f88b7afaa903 100644 --- a/test/IRGen/sil_witness_tables_external_witnesstable.swift +++ b/test/IRGen/sil_witness_tables_external_witnesstable.swift @@ -1,6 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -static %S/Inputs/sil_witness_tables_external_input.swift -o %t/Swift.swiftmodule -parse-stdlib -parse-as-library -module-name Swift -module-link-name swiftCore -// RUN: %target-swift-frontend -I %t -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -I %t -primary-file %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -I %t -primary-file %s -emit-ir import Swift diff --git a/test/IRGen/sil_witness_tables_inherited_conformance.swift b/test/IRGen/sil_witness_tables_inherited_conformance.swift index e437ab6946bd4..76af74e9cce24 100644 --- a/test/IRGen/sil_witness_tables_inherited_conformance.swift +++ b/test/IRGen/sil_witness_tables_inherited_conformance.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir // rdar://problem/20628295 diff --git a/test/IRGen/simple_partial_apply.sil b/test/IRGen/simple_partial_apply.sil index cc6d1cb384d12..f5abeb6c218f6 100644 --- a/test/IRGen/simple_partial_apply.sil +++ b/test/IRGen/simple_partial_apply.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-cpu +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-cpu +// RUN: %target-swift-frontend -emit-ir %s sil_stage canonical diff --git a/test/IRGen/simple_partial_apply_or_not.swift b/test/IRGen/simple_partial_apply_or_not.swift index c2241c3cd630e..19072c4ae27dd 100644 --- a/test/IRGen/simple_partial_apply_or_not.swift +++ b/test/IRGen/simple_partial_apply_or_not.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir -Xllvm -sil-disable-pass=Simplification -module-name test %s | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers -Xllvm -sil-disable-pass=Simplification -module-name test %s | %FileCheck %s +// RUN: %target-swift-emit-ir -Xllvm -sil-disable-pass=Simplification -module-name test %s // RUN: %target-run-simple-swift -Xllvm -sil-disable-pass=Simplification %s | %FileCheck %s --check-prefix=CHECK-EXEC // REQUIRES: executable_test diff --git a/test/IRGen/static-library.swift b/test/IRGen/static-library.swift index c11346a16da35..9cf36ed6ec34a 100644 --- a/test/IRGen/static-library.swift +++ b/test/IRGen/static-library.swift @@ -1,7 +1,9 @@ // RUN: %empty-directory(%t) // RUN: %swiftc_driver_plain -target x86_64-unknown-windows-msvc -DLIBRARY -module-name Library -emit-library -static -autolink-force-load -module-link-name Library %s -o %t/library.lib -emit-module-path %t -// RUN: %swiftc_driver_plain -target x86_64-unknown-windows-msvc -DLIBRARY -module-name Library -emit-library -static -autolink-force-load -module-link-name Library %s -S -emit-ir -o - | %FileCheck -check-prefix CHECK-LIBRARY %s -// RUN: %swiftc_driver_plain -target x86_64-unknown-windows-msvc -I %t -emit-library -S -emit-ir -o - %s | %FileCheck -check-prefix CHECK-EMBEDDING %s +// RUN: %swiftc_driver_plain %use_no_opaque_pointers -target x86_64-unknown-windows-msvc -DLIBRARY -module-name Library -emit-library -static -autolink-force-load -module-link-name Library %s -S -emit-ir -o - | %FileCheck -check-prefix CHECK-LIBRARY %s +// RUN: %swiftc_driver_plain %use_no_opaque_pointers -target x86_64-unknown-windows-msvc -I %t -emit-library -S -emit-ir -o - %s | %FileCheck -check-prefix CHECK-EMBEDDING %s +// RUN: %swiftc_driver_plain -target x86_64-unknown-windows-msvc -DLIBRARY -module-name Library -emit-library -static -autolink-force-load -module-link-name Library %s -S -emit-ir -o - +// RUN: %swiftc_driver_plain -target x86_64-unknown-windows-msvc -I %t -emit-library -S -emit-ir -o - %s // REQUIRES: OS=windows-msvc diff --git a/test/IRGen/static-vtable-stubs.swift b/test/IRGen/static-vtable-stubs.swift index ac7e9b1823135..f0a56cdca5994 100644 --- a/test/IRGen/static-vtable-stubs.swift +++ b/test/IRGen/static-vtable-stubs.swift @@ -1,7 +1,9 @@ // RUN: %empty-directory(%t) // RUN: split-file --leading-lines %s %t -// RUN: %swift-target-frontend -disable-availability-checking -parse-as-library -static -O -module-name M -c -primary-file %t/A.swift %t/B.swift -S -emit-ir -o - | %FileCheck %t/A.swift -check-prefix CHECK -// RUN: %swift-target-frontend -disable-availability-checking -parse-as-library -static -O -module-name M -c %t/A.swift -primary-file %t/B.swift -S -emit-ir -o - | %FileCheck %t/B.swift -check-prefix CHECK +// RUN: %swift-target-frontend %use_no_opaque_pointers -disable-availability-checking -parse-as-library -static -O -module-name M -c -primary-file %t/A.swift %t/B.swift -S -emit-ir -o - | %FileCheck %t/A.swift -check-prefix CHECK +// RUN: %swift-target-frontend %use_no_opaque_pointers -disable-availability-checking -parse-as-library -static -O -module-name M -c %t/A.swift -primary-file %t/B.swift -S -emit-ir -o - | %FileCheck %t/B.swift -check-prefix CHECK +// RUN: %swift-target-frontend -disable-availability-checking -parse-as-library -static -O -module-name M -c -primary-file %t/A.swift %t/B.swift -S -emit-ir -o - +// RUN: %swift-target-frontend -disable-availability-checking -parse-as-library -static -O -module-name M -c %t/A.swift -primary-file %t/B.swift -S -emit-ir -o - // Verify that we can link successfully. // RUN: %target-build-swift -Xfrontend -disable-availability-checking -O %t/A.swift %t/B.swift -o %t/a.out diff --git a/test/IRGen/static_initializer.sil b/test/IRGen/static_initializer.sil index aea6227cf62a7..259dc1f1964e1 100644 --- a/test/IRGen/static_initializer.sil +++ b/test/IRGen/static_initializer.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-%target-abi +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-%target-abi +// RUN: %target-swift-frontend %s -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/struct_layout.sil b/test/IRGen/struct_layout.sil index 31c58f2eaa49b..59cb10d35dd93 100644 --- a/test/IRGen/struct_layout.sil +++ b/test/IRGen/struct_layout.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -module-name main -emit-ir -o - | %FileCheck -check-prefix=%target-ptrsize %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -module-name main -emit-ir -o - | %FileCheck -check-prefix=%target-ptrsize %s +// RUN: %target-swift-frontend %s -module-name main -emit-ir -o - import Builtin import Swift diff --git a/test/IRGen/struct_resilience.swift b/test/IRGen/struct_resilience.swift index f658483249018..884ca605a64ed 100644 --- a/test/IRGen/struct_resilience.swift +++ b/test/IRGen/struct_resilience.swift @@ -2,7 +2,8 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_enum.swiftmodule -module-name=resilient_enum -I %t %S/../Inputs/resilient_enum.swift -// RUN: %target-swift-frontend -module-name struct_resilience -Xllvm -sil-disable-pass=MandatoryARCOpts -I %t -emit-ir -enable-library-evolution %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name struct_resilience -Xllvm -sil-disable-pass=MandatoryARCOpts -I %t -emit-ir -enable-library-evolution %s | %FileCheck %s +// RUN: %target-swift-frontend -module-name struct_resilience -Xllvm -sil-disable-pass=MandatoryARCOpts -I %t -emit-ir -enable-library-evolution %s // RUN: %target-swift-frontend -module-name struct_resilience -I %t -emit-ir -enable-library-evolution -O %s import resilient_struct diff --git a/test/IRGen/struct_with_resilient_type.swift b/test/IRGen/struct_with_resilient_type.swift index f7d8ef2163ab1..06c56496d2f6c 100644 --- a/test/IRGen/struct_with_resilient_type.swift +++ b/test/IRGen/struct_with_resilient_type.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -enable-library-evolution -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift // RUN: %target-swift-frontend -I %t -emit-ir %s -// RUN: %target-swift-frontend -O -I %t -emit-ir %s | %FileCheck %s --check-prefix=VWT-%target-os --check-prefix=VWT +// RUN: %target-swift-frontend %use_no_opaque_pointers -O -I %t -emit-ir %s | %FileCheck %s --check-prefix=VWT-%target-os --check-prefix=VWT +// RUN: %target-swift-frontend -O -I %t -emit-ir %s // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/subclass.swift b/test/IRGen/subclass.swift index 6078179a83e7f..32d043d2753b4 100644 --- a/test/IRGen/subclass.swift +++ b/test/IRGen/subclass.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -enable-objc-interop -primary-file %s -emit-ir | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-%target-import-type +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -primary-file %s -emit-ir | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-%target-import-type +// RUN: %target-swift-frontend -enable-objc-interop -primary-file %s -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/subclass_existentials.sil b/test/IRGen/subclass_existentials.sil index efbea61883f6b..32ead354460b7 100644 --- a/test/IRGen/subclass_existentials.sil +++ b/test/IRGen/subclass_existentials.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-runtime --check-prefix=CHECK -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-runtime --check-prefix=CHECK -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -primary-file %s -emit-ir sil_stage canonical diff --git a/test/IRGen/super.sil b/test/IRGen/super.sil index 81d5527b07f09..1c9be28b0dcc5 100644 --- a/test/IRGen/super.sil +++ b/test/IRGen/super.sil @@ -8,7 +8,8 @@ // RUN: %target-swift-frontend -emit-module -I %t -o %t %S/../Inputs/fixed_layout_class.swift -// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -enable-library-evolution -parse-sil -parse-as-library -emit-ir -I %t %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -Xllvm -sil-disable-pass=simplification -enable-library-evolution -parse-sil -parse-as-library -emit-ir -I %t %s | %FileCheck %s +// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -enable-library-evolution -parse-sil -parse-as-library -emit-ir -I %t %s // CHECK: %swift.type = type { [[INT:i32|i64]] } diff --git a/test/IRGen/superclass_constraint.swift b/test/IRGen/superclass_constraint.swift index d17183cc8bbf7..8507dbf4f6a1e 100644 --- a/test/IRGen/superclass_constraint.swift +++ b/test/IRGen/superclass_constraint.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir public protocol A {} diff --git a/test/IRGen/swift_native_objc_runtime_base.sil b/test/IRGen/swift_native_objc_runtime_base.sil index 8c51b06dd9435..d89b6363c16ca 100644 --- a/test/IRGen/swift_native_objc_runtime_base.sil +++ b/test/IRGen/swift_native_objc_runtime_base.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s // CHECK-LABEL: @"$s30swift_native_objc_runtime_base1CCMm" = hidden global %objc_class { // -- metaclass "isa" is root metaclass diff --git a/test/IRGen/synthesized_conformance.swift b/test/IRGen/synthesized_conformance.swift index d0ee05c50b42e..8a8fa7848acb4 100644 --- a/test/IRGen/synthesized_conformance.swift +++ b/test/IRGen/synthesized_conformance.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -disable-generic-metadata-prespecialization -emit-ir %s -swift-version 4 | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-generic-metadata-prespecialization -emit-ir %s -swift-version 4 | %FileCheck %s +// RUN: %target-swift-frontend -disable-generic-metadata-prespecialization -emit-ir %s -swift-version 4 struct Struct { var x: T diff --git a/test/IRGen/synthesized_conformance_future.swift b/test/IRGen/synthesized_conformance_future.swift index 7d5ea31e56119..fb1f19f0ffe32 100644 --- a/test/IRGen/synthesized_conformance_future.swift +++ b/test/IRGen/synthesized_conformance_future.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -swift-version 4 | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend %use_no_opaque_pointers -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -swift-version 4 | %FileCheck %s -DINT=i%target-ptrsize -DALIGNMENT=%target-alignment +// RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -emit-ir %s -swift-version 4 // REQUIRES: VENDOR=apple || OS=linux-gnu // UNSUPPORTED: CPU=i386 && OS=ios diff --git a/test/IRGen/tail_alloc.sil b/test/IRGen/tail_alloc.sil index 4e301f30fc856..7c153cdc68533 100644 --- a/test/IRGen/tail_alloc.sil +++ b/test/IRGen/tail_alloc.sil @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -enable-objc-interop -stack-promotion-limit 48 -Onone -emit-ir %s | %FileCheck --check-prefixes=CHECK,CHECK-objc %s -DINT=i%target-ptrsize -// RUN: %target-swift-frontend -disable-objc-interop -stack-promotion-limit 48 -Onone -emit-ir %s | %FileCheck --check-prefixes=CHECK,CHECK-native %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -stack-promotion-limit 48 -Onone -emit-ir %s | %FileCheck --check-prefixes=CHECK,CHECK-objc %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-objc-interop -stack-promotion-limit 48 -Onone -emit-ir %s | %FileCheck --check-prefixes=CHECK,CHECK-native %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -enable-objc-interop -stack-promotion-limit 48 -Onone -emit-ir %s +// RUN: %target-swift-frontend -disable-objc-interop -stack-promotion-limit 48 -Onone -emit-ir %s // // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/temporary_allocation/codegen.swift b/test/IRGen/temporary_allocation/codegen.swift index 2fdfc4622bee5..321a291aa7725 100644 --- a/test/IRGen/temporary_allocation/codegen.swift +++ b/test/IRGen/temporary_allocation/codegen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -O -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -O -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -O -emit-ir @_silgen_name("blackHole") func blackHole(_ value: UnsafeMutableRawPointer?) -> Void diff --git a/test/IRGen/temporary_allocation/codegen_very_large_allocation.swift b/test/IRGen/temporary_allocation/codegen_very_large_allocation.swift index 2e5cff9946195..54a73ddc9f401 100644 --- a/test/IRGen/temporary_allocation/codegen_very_large_allocation.swift +++ b/test/IRGen/temporary_allocation/codegen_very_large_allocation.swift @@ -1,6 +1,7 @@ -// RUN: %target-swift-frontend -primary-file %s -O -emit-ir | %FileCheck %s --check-prefixes=CHECK-LARGE-ALLOC,CHECK-LARGE-ALLOC-%target-vendor -DWORD=i%target-ptrsize -// RUN: %target-swift-frontend -primary-file %s -O -emit-ir | %FileCheck %s --check-prefix=CHECK-LARGE-STACK-ALLOC -DWORD=i%target-ptrsize -// RUN: %target-swift-frontend -primary-file %s -O -emit-ir | %FileCheck %s --check-prefix=CHECK-LARGE-HEAP-ALLOC -DWORD=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -O -emit-ir | %FileCheck %s --check-prefixes=CHECK-LARGE-ALLOC,CHECK-LARGE-ALLOC-%target-vendor -DWORD=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -O -emit-ir | %FileCheck %s --check-prefix=CHECK-LARGE-STACK-ALLOC -DWORD=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -O -emit-ir | %FileCheck %s --check-prefix=CHECK-LARGE-HEAP-ALLOC -DWORD=i%target-ptrsize +// RUN: %target-swift-frontend -primary-file %s -O -emit-ir @_silgen_name("blackHole") func blackHole(_ value: UnsafeMutableRawPointer?) -> Void diff --git a/test/IRGen/thinlto.swift b/test/IRGen/thinlto.swift index d612260c4e91b..e59515d3d7cc6 100644 --- a/test/IRGen/thinlto.swift +++ b/test/IRGen/thinlto.swift @@ -1,6 +1,6 @@ // RUN: %empty-directory(%t) -// RUN: %target-build-swift -parse-as-library -working-directory %t -lto=llvm-thin -DMODULE -static -emit-library -emit-module %s -module-name MyModule -// RUN: %target-build-swift -parse-as-library -working-directory %t -lto=llvm-thin %s -I%t -L%t -lMyModule -module-name main -o %t/main %lto_flags +// RUN: %use_just_built_liblto %target-build-swift -parse-as-library -working-directory %t -lto=llvm-thin -DMODULE -static -emit-library -emit-module %s -module-name MyModule +// RUN: %use_just_built_liblto %target-build-swift -parse-as-library -working-directory %t -lto=llvm-thin %s -I%t -L%t -lMyModule -module-name main -o %t/main %lto_flags // RUN: %target-codesign %t/main // RUN: %target-run %t/main | %FileCheck %s diff --git a/test/IRGen/trivial-property-descriptors.swift b/test/IRGen/trivial-property-descriptors.swift index a4fad545726a4..e9f1a4d1980e6 100644 --- a/test/IRGen/trivial-property-descriptors.swift +++ b/test/IRGen/trivial-property-descriptors.swift @@ -1,4 +1,5 @@ -// RUN: %swift -disable-legacy-type-info -target x86_64-unknown-windows-msvc -parse-stdlib -module-name Swift -enable-library-evolution -S -emit-ir -o - %s | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target x86_64-unknown-windows-msvc -parse-stdlib -module-name Swift -enable-library-evolution -S -emit-ir -o - %s | %FileCheck %s +// RUN: %swift -disable-legacy-type-info -target x86_64-unknown-windows-msvc -parse-stdlib -module-name Swift -enable-library-evolution -S -emit-ir -o - %s public struct S {} extension S { diff --git a/test/IRGen/tsan_coroutines.swift b/test/IRGen/tsan_coroutines.swift index 63ff783dc6747..7c6e1bc44d03a 100644 --- a/test/IRGen/tsan_coroutines.swift +++ b/test/IRGen/tsan_coroutines.swift @@ -1,6 +1,7 @@ // REQUIRES: tsan_runtime // This test case used to crash when tsan ran before co-routine lowering. -// RUN: %target-swift-frontend -emit-ir -sanitize=thread %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -sanitize=thread %s | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir -sanitize=thread %s // TSan is only supported on 64 bit. // REQUIRES: PTRSIZE=64 diff --git a/test/IRGen/tsan_instrumentation.sil b/test/IRGen/tsan_instrumentation.sil index 1c3ba1a34b796..a0ede13d9656c 100644 --- a/test/IRGen/tsan_instrumentation.sil +++ b/test/IRGen/tsan_instrumentation.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir sil_stage canonical diff --git a/test/IRGen/type_layout.swift b/test/IRGen/type_layout.swift index f54f7ddd93392..dfd5a5ec1a0d6 100644 --- a/test/IRGen/type_layout.swift +++ b/test/IRGen/type_layout.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -emit-ir %s class C {} diff --git a/test/IRGen/type_layout_objc.swift b/test/IRGen/type_layout_objc.swift index 175aa229181ef..f18434602c5c5 100644 --- a/test/IRGen/type_layout_objc.swift +++ b/test/IRGen/type_layout_objc.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-ir %s // REQUIRES: objc_interop import Foundation diff --git a/test/IRGen/type_layout_reference_storage.swift b/test/IRGen/type_layout_reference_storage.swift index 83a7cece6caef..7a7f6da201168 100644 --- a/test/IRGen/type_layout_reference_storage.swift +++ b/test/IRGen/type_layout_reference_storage.swift @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -emit-ir %s -enable-objc-interop | %FileCheck %s -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-objc-%target-ptrsize -// RUN: %target-swift-frontend -emit-ir %s -disable-objc-interop | %FileCheck %s -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-native-%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s -enable-objc-interop | %FileCheck %s -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-objc-%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s -disable-objc-interop | %FileCheck %s -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-native-%target-ptrsize +// RUN: %target-swift-frontend -emit-ir %s -enable-objc-interop +// RUN: %target-swift-frontend -emit-ir %s -disable-objc-interop class C {} protocol P: class {} diff --git a/test/IRGen/typed_boxes.sil b/test/IRGen/typed_boxes.sil index a05411b9e7b7e..f36d33500a21d 100644 --- a/test/IRGen/typed_boxes.sil +++ b/test/IRGen/typed_boxes.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -emit-ir %s sil_stage canonical import Builtin diff --git a/test/IRGen/typelayout_based_value_operation.sil b/test/IRGen/typelayout_based_value_operation.sil index 6a2c5f649fa2a..16491e2fb3b47 100644 --- a/test/IRGen/typelayout_based_value_operation.sil +++ b/test/IRGen/typelayout_based_value_operation.sil @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -enable-type-layout %s -emit-ir -sil-verify-all | %FileCheck %s -// RUN: %target-swift-frontend -disable-type-layout %s -emit-ir -sil-verify-all | %FileCheck %s --check-prefix=NOTYPELAYOUT +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-type-layout %s -emit-ir -sil-verify-all | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout %s -emit-ir -sil-verify-all | %FileCheck %s --check-prefix=NOTYPELAYOUT +// RUN: %target-swift-frontend -enable-type-layout %s -emit-ir -sil-verify-all +// RUN: %target-swift-frontend -disable-type-layout %s -emit-ir -sil-verify-all sil_stage canonical import Builtin diff --git a/test/IRGen/typelayout_based_value_witness.swift b/test/IRGen/typelayout_based_value_witness.swift index 1ebe4347a845c..a8d5ce43b110b 100644 --- a/test/IRGen/typelayout_based_value_witness.swift +++ b/test/IRGen/typelayout_based_value_witness.swift @@ -1,6 +1,9 @@ -// RUN: %target-swift-frontend -enable-type-layout -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK -// RUN: %target-swift-frontend -enable-type-layout -primary-file %s -O -emit-ir | %FileCheck %s --check-prefix=OPT --check-prefix=OPT-%target-ptrsize -// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s --check-prefix=NOTL +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-type-layout -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-type-layout -primary-file %s -O -emit-ir | %FileCheck %s --check-prefix=OPT --check-prefix=OPT-%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir | %FileCheck %s --check-prefix=NOTL +// RUN: %target-swift-frontend -enable-type-layout -primary-file %s -emit-ir +// RUN: %target-swift-frontend -enable-type-layout -primary-file %s -O -emit-ir +// RUN: %target-swift-frontend -primary-file %s -emit-ir public struct B { var x: T diff --git a/test/IRGen/unconditional_checked_cast.sil b/test/IRGen/unconditional_checked_cast.sil index ae51799e97af4..356bb5cc14aed 100644 --- a/test/IRGen/unconditional_checked_cast.sil +++ b/test/IRGen/unconditional_checked_cast.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/undef.sil b/test/IRGen/undef.sil index d66d1c882453d..818e5118962f1 100644 --- a/test/IRGen/undef.sil +++ b/test/IRGen/undef.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/unexploded-calls.swift b/test/IRGen/unexploded-calls.swift index f3fb66533c63e..dac8f593a6ff4 100644 --- a/test/IRGen/unexploded-calls.swift +++ b/test/IRGen/unexploded-calls.swift @@ -1,6 +1,6 @@ -// RUN: %swift -disable-legacy-type-info -target thumbv7-unknown-windows-msvc -parse-stdlib -parse-as-library -I %S/Inputs/usr/include -module-name Swift -S -emit-ir -o - %s | %FileCheck %s -// RUN: %swift -disable-legacy-type-info -target thumbv7-unknown-linux-gnueabihf -parse-stdlib -parse-as-library -I %S/Inputs/usr/include -module-name Swift -S -emit-ir -o - %s | %FileCheck %s -// RUN: %swift -disable-legacy-type-info -target thumbv7-unknown-linux-gnueabi -Xcc -mfloat-abi=hard -parse-stdlib -parse-as-library -I %S/Inputs/usr/include -module-name Swift -S -emit-ir -o - %s | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target thumbv7-unknown-windows-msvc -parse-stdlib -parse-as-library -I %S/Inputs/usr/include -module-name Swift -S -emit-ir -o - %s | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target thumbv7-unknown-linux-gnueabihf -parse-stdlib -parse-as-library -I %S/Inputs/usr/include -module-name Swift -S -emit-ir -o - %s | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -disable-legacy-type-info -target thumbv7-unknown-linux-gnueabi -Xcc -mfloat-abi=hard -parse-stdlib -parse-as-library -I %S/Inputs/usr/include -module-name Swift -S -emit-ir -o - %s | %FileCheck %s // REQUIRES: CODEGENERATOR=ARM diff --git a/test/IRGen/unmanaged_objc_throw_func.swift b/test/IRGen/unmanaged_objc_throw_func.swift index 4dc24083e73c4..3b68333f9c210 100644 --- a/test/IRGen/unmanaged_objc_throw_func.swift +++ b/test/IRGen/unmanaged_objc_throw_func.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -enable-copy-propagation -enable-lexical-lifetimes=false %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -enable-copy-propagation -enable-lexical-lifetimes=false %s | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir -enable-copy-propagation -enable-lexical-lifetimes=false %s // REQUIRES: objc_interop // REQUIRES: optimized_stdlib diff --git a/test/IRGen/unowned.sil b/test/IRGen/unowned.sil index 5d0b108285e9a..4dcfa6c2eb3f4 100644 --- a/test/IRGen/unowned.sil +++ b/test/IRGen/unowned.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -disable-objc-interop -disable-type-layout -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-objc-interop -disable-type-layout -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -disable-objc-interop -disable-type-layout -emit-ir %s // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/unowned_objc.sil b/test/IRGen/unowned_objc.sil index d07aa5d309718..f26c2e4710784 100644 --- a/test/IRGen/unowned_objc.sil +++ b/test/IRGen/unowned_objc.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -enable-objc-interop -disable-type-layout -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -disable-type-layout -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -enable-objc-interop -disable-type-layout -emit-ir %s // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/unused.sil b/test/IRGen/unused.sil index 91bd083605651..cfe600faba5a1 100644 --- a/test/IRGen/unused.sil +++ b/test/IRGen/unused.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -disable-autolinking-runtime-compatibility-concurrency -disable-autolinking-runtime-compatibility-dynamic-replacements -runtime-compatibility-version none -primary-file %s -emit-ir | %FileCheck -check-prefix CHECK -check-prefix NEGATIVE -check-prefix CHECK-%target-object-format %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-autolinking-runtime-compatibility-concurrency -disable-autolinking-runtime-compatibility-dynamic-replacements -runtime-compatibility-version none -primary-file %s -emit-ir | %FileCheck -check-prefix CHECK -check-prefix NEGATIVE -check-prefix CHECK-%target-object-format %s +// RUN: %target-swift-frontend -disable-autolinking-runtime-compatibility-concurrency -disable-autolinking-runtime-compatibility-dynamic-replacements -runtime-compatibility-version none -primary-file %s -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/used.swift b/test/IRGen/used.swift index c07700c76c78c..f27e9c109694f 100644 --- a/test/IRGen/used.swift +++ b/test/IRGen/used.swift @@ -1,11 +1,15 @@ // RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -emit-sil | %FileCheck %s --check-prefix=SIL // RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -O -emit-sil | %FileCheck %s --check-prefix=SIL -// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -emit-ir | %FileCheck %s --check-prefix=IR -// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -O -emit-ir | %FileCheck %s --check-prefix=IR +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -emit-ir | %FileCheck %s --check-prefix=IR +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -O -emit-ir | %FileCheck %s --check-prefix=IR +// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -emit-ir +// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -O -emit-ir // RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -emit-sil -parse-as-library | %FileCheck %s --check-prefix=SIL // RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -O -emit-sil -parse-as-library | %FileCheck %s --check-prefix=SIL -// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -emit-ir -parse-as-library | %FileCheck %s --check-prefix=IR -// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -O -emit-ir -parse-as-library | %FileCheck %s --check-prefix=IR +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -emit-ir -parse-as-library | %FileCheck %s --check-prefix=IR +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -O -emit-ir -parse-as-library | %FileCheck %s --check-prefix=IR +// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -emit-ir -parse-as-library +// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -primary-file %s -O -emit-ir -parse-as-library // REQUIRES: swift_in_compiler diff --git a/test/IRGen/variadic_generic_captures.swift b/test/IRGen/variadic_generic_captures.swift index 26b62add2a21a..bf1ed4a794c2a 100644 --- a/test/IRGen/variadic_generic_captures.swift +++ b/test/IRGen/variadic_generic_captures.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -emit-ir %s public func takesNoEscape(_: () -> ()) {} diff --git a/test/IRGen/variadic_generic_fulfillment.swift b/test/IRGen/variadic_generic_fulfillment.swift index 5b44a39604892..a579dd2fb4b92 100644 --- a/test/IRGen/variadic_generic_fulfillment.swift +++ b/test/IRGen/variadic_generic_fulfillment.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s -disable-availability-checking | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s -disable-availability-checking | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -emit-ir %s -disable-availability-checking public struct G {} diff --git a/test/IRGen/variadic_generic_fulfillments.sil b/test/IRGen/variadic_generic_fulfillments.sil index d32db6c29b65b..85478917f28e7 100644 --- a/test/IRGen/variadic_generic_fulfillments.sil +++ b/test/IRGen/variadic_generic_fulfillments.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -primary-file %s | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -primary-file %s | %IRGenFileCheck %s +// RUN: %target-swift-frontend -emit-ir -primary-file %s import Builtin import Swift diff --git a/test/IRGen/variadic_generic_functions.sil b/test/IRGen/variadic_generic_functions.sil index f85d84ed58dfc..c4477f804b71a 100644 --- a/test/IRGen/variadic_generic_functions.sil +++ b/test/IRGen/variadic_generic_functions.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -parse-sil -emit-ir -primary-file %s | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-sil -emit-ir -primary-file %s | %IRGenFileCheck %s +// RUN: %target-swift-frontend -parse-sil -emit-ir -primary-file %s import Builtin import Swift diff --git a/test/IRGen/variadic_generic_functions.swift b/test/IRGen/variadic_generic_functions.swift index 9929658adc279..77748080c6ad3 100644 --- a/test/IRGen/variadic_generic_functions.swift +++ b/test/IRGen/variadic_generic_functions.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir -primary-file %s // REQUIRES: PTRSIZE=64 diff --git a/test/IRGen/variadic_generic_outlining.sil b/test/IRGen/variadic_generic_outlining.sil index 51f11aed93b33..dafc796f3c60a 100644 --- a/test/IRGen/variadic_generic_outlining.sil +++ b/test/IRGen/variadic_generic_outlining.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -primary-file %s | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -primary-file %s | %IRGenFileCheck %s +// RUN: %target-swift-frontend -emit-ir -primary-file %s import Builtin import Swift diff --git a/test/IRGen/variadic_generic_types.swift b/test/IRGen/variadic_generic_types.swift index 1bf8590de94dc..fa7ae57e763ea 100644 --- a/test/IRGen/variadic_generic_types.swift +++ b/test/IRGen/variadic_generic_types.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -primary-file %s -disable-availability-checking | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -primary-file %s -disable-availability-checking | %FileCheck %s +// RUN: %target-swift-frontend -emit-ir -primary-file %s -disable-availability-checking // REQUIRES: PTRSIZE=64 diff --git a/test/IRGen/variadic_generics.sil b/test/IRGen/variadic_generics.sil index 0e7bf0d70dd3e..a3253ac8ea539 100644 --- a/test/IRGen/variadic_generics.sil +++ b/test/IRGen/variadic_generics.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -primary-file %s | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -primary-file %s | %IRGenFileCheck %s +// RUN: %target-swift-frontend -emit-ir -primary-file %s import Builtin import Swift diff --git a/test/IRGen/variadic_vanishing_tuple.swift b/test/IRGen/variadic_vanishing_tuple.swift index e6ccd66c2d57d..f96a24050a786 100644 --- a/test/IRGen/variadic_vanishing_tuple.swift +++ b/test/IRGen/variadic_vanishing_tuple.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -emit-ir %s public func takesMetatype(_: T.Type) {} diff --git a/test/IRGen/virtual-function-elimination-ir-thunks.swift b/test/IRGen/virtual-function-elimination-ir-thunks.swift index 9c3d479e17458..91ba09bc7385b 100644 --- a/test/IRGen/virtual-function-elimination-ir-thunks.swift +++ b/test/IRGen/virtual-function-elimination-ir-thunks.swift @@ -3,7 +3,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -disable-objc-interop -Xfrontend -enable-llvm-vfe -parse-as-library %s -DLIBRARY -module-name Library -emit-module -o %t/Library.swiftmodule -// RUN: %target-build-swift -Xfrontend -disable-objc-interop -Xfrontend -enable-llvm-vfe -parse-as-library %s -DCLIENT -module-name Main -I%t -emit-ir -o - | %FileCheck %s +// RUN: %target-build-swift %use_no_opaque_pointers -Xfrontend -disable-objc-interop -Xfrontend -enable-llvm-vfe -parse-as-library %s -DCLIENT -module-name Main -I%t -emit-ir -o - | %FileCheck %s +// RUN: %target-build-swift -Xfrontend -disable-objc-interop -Xfrontend -enable-llvm-vfe -parse-as-library %s -DCLIENT -module-name Main -I%t -emit-ir -o - // UNSUPPORTED: OS=windows-msvc diff --git a/test/IRGen/virtual-function-elimination-ir.swift b/test/IRGen/virtual-function-elimination-ir.swift index 6d91bbf96431f..a69254512f40e 100644 --- a/test/IRGen/virtual-function-elimination-ir.swift +++ b/test/IRGen/virtual-function-elimination-ir.swift @@ -1,8 +1,10 @@ // Tests that under -enable-llvm-vfe, IRGen marks vtables and vcall sites with // the right attributes and intrinsics. -// RUN: %target-build-swift -Xfrontend -disable-objc-interop -Xfrontend -enable-llvm-vfe \ +// RUN: %target-build-swift %use_no_opaque_pointers -Xfrontend -disable-objc-interop -Xfrontend -enable-llvm-vfe \ // RUN: %s -emit-ir -o - | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-build-swift -Xfrontend -disable-objc-interop -Xfrontend -enable-llvm-vfe \ +// RUN: %s -emit-ir -o - // UNSUPPORTED: OS=windows-msvc diff --git a/test/IRGen/vtable.sil b/test/IRGen/vtable.sil index 57923ca4a7c98..70da6f2a99f08 100644 --- a/test/IRGen/vtable.sil +++ b/test/IRGen/vtable.sil @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s --check-prefixes=CHECK,CHECK-objc,CHECK-%target-import-type-objc -// RUN: %target-swift-frontend -disable-objc-interop -emit-ir %s | %FileCheck %s --check-prefixes=CHECK,CHECK-native +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -emit-ir %s | %FileCheck %s --check-prefixes=CHECK,CHECK-objc,CHECK-%target-import-type-objc +// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-objc-interop -emit-ir %s | %FileCheck %s --check-prefixes=CHECK,CHECK-native +// RUN: %target-swift-frontend -disable-objc-interop -emit-ir %s // REQUIRES: executable_test // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/vtable_multi_file.swift b/test/IRGen/vtable_multi_file.swift index 95503a0359c9f..c39e97d062b06 100644 --- a/test/IRGen/vtable_multi_file.swift +++ b/test/IRGen/vtable_multi_file.swift @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -enable-objc-interop -primary-file %s %S/Inputs/vtable_multi_file_helper.swift -emit-ir | %FileCheck --check-prefixes=CHECK,CHECK-OBJC %s -// RUN: %target-swift-frontend -disable-objc-interop -primary-file %s %S/Inputs/vtable_multi_file_helper.swift -emit-ir | %FileCheck --check-prefixes=CHECK,CHECK-NO-OBJC %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -primary-file %s %S/Inputs/vtable_multi_file_helper.swift -emit-ir | %FileCheck --check-prefixes=CHECK,CHECK-OBJC %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-objc-interop -primary-file %s %S/Inputs/vtable_multi_file_helper.swift -emit-ir | %FileCheck --check-prefixes=CHECK,CHECK-NO-OBJC %s +// RUN: %target-swift-frontend -enable-objc-interop -primary-file %s %S/Inputs/vtable_multi_file_helper.swift -emit-ir +// RUN: %target-swift-frontend -disable-objc-interop -primary-file %s %S/Inputs/vtable_multi_file_helper.swift -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/wasm-absolute-func-ptr.swift b/test/IRGen/wasm-absolute-func-ptr.swift index 8745e02b6248a..a03e4a03bb659 100644 --- a/test/IRGen/wasm-absolute-func-ptr.swift +++ b/test/IRGen/wasm-absolute-func-ptr.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target wasm32-unknown-wasi -parse-stdlib -emit-ir -o - %s | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -target wasm32-unknown-wasi -parse-stdlib -emit-ir -o - %s | %FileCheck %s +// RUN: %swift -target wasm32-unknown-wasi -parse-stdlib -emit-ir -o - %s // REQUIRES: CODEGENERATOR=WebAssembly diff --git a/test/IRGen/weak.sil b/test/IRGen/weak.sil index 111d43bf46179..2d106b62e3eb1 100644 --- a/test/IRGen/weak.sil +++ b/test/IRGen/weak.sil @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -enable-objc-interop -disable-type-layout -emit-ir %s | %FileCheck %s -// RUN: %target-swift-frontend -O -S %s | %FileCheck %s --check-prefix=TAILCALL +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -disable-type-layout -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -O -S %s | %FileCheck %s --check-prefix=TAILCALL +// RUN: %target-swift-frontend -enable-objc-interop -disable-type-layout -emit-ir %s +// RUN: %target-swift-frontend -O -S %s // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/weak_class_protocol.sil b/test/IRGen/weak_class_protocol.sil index 8ba2ff0cd4489..f2c9700181f4f 100644 --- a/test/IRGen/weak_class_protocol.sil +++ b/test/IRGen/weak_class_protocol.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime +// RUN: %target-swift-frontend -emit-ir %s // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/weak_import_availability.swift b/test/IRGen/weak_import_availability.swift index abf0f0d01aa8d..92d6b13fb1a98 100644 --- a/test/IRGen/weak_import_availability.swift +++ b/test/IRGen/weak_import_availability.swift @@ -1,12 +1,14 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -target %target-cpu-apple-macosx10.50 -emit-module -emit-module-path %t/weak_import_availability_helper.swiftmodule -parse-as-library %S/Inputs/weak_import_availability_helper.swift -enable-library-evolution // -// RUN: %target-swift-frontend -primary-file %s -I %t -emit-ir | %FileCheck %s --check-prefixes=CHECK,CHECK-OLD -// RUN: %target-swift-frontend -primary-file %s -I %t -emit-ir -target %target-cpu-apple-macosx10.50 | %FileCheck %s --check-prefixes=CHECK,CHECK-NEW -// RUN: %target-swift-frontend -primary-file %s -I %t -emit-ir -target %target-cpu-apple-macosx10.60 | %FileCheck %s --check-prefixes=CHECK,CHECK-NEW - -// RUN: %target-swift-frontend -primary-file %s -I %t -emit-ir -target %target-cpu-apple-macosx10.50 -weak-link-at-target | %FileCheck %s --check-prefixes=CHECK,CHECK-OLD -// RUN: %target-swift-frontend -primary-file %s -I %t -emit-ir -target %target-cpu-apple-macosx10.60 -weak-link-at-target | %FileCheck %s --check-prefixes=CHECK,CHECK-NEW +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -I %t -emit-ir | %FileCheck %s --check-prefixes=CHECK,CHECK-OLD +// RUN: %target-swift-frontend -primary-file %s -I %t -emit-ir +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -I %t -emit-ir -target %target-cpu-apple-macosx10.50 | %FileCheck %s --check-prefixes=CHECK,CHECK-NEW +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -I %t -emit-ir -target %target-cpu-apple-macosx10.60 | %FileCheck %s --check-prefixes=CHECK,CHECK-NEW + +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -I %t -emit-ir -target %target-cpu-apple-macosx10.50 -weak-link-at-target | %FileCheck %s --check-prefixes=CHECK,CHECK-OLD +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -I %t -emit-ir -target %target-cpu-apple-macosx10.60 -weak-link-at-target | %FileCheck %s --check-prefixes=CHECK,CHECK-NEW +// RUN: %target-swift-frontend -primary-file %s -I %t -emit-ir -target %target-cpu-apple-macosx10.60 -weak-link-at-target // REQUIRES: OS=macosx diff --git a/test/IRGen/weak_import_native.swift b/test/IRGen/weak_import_native.swift index 86271cd56a9f1..b38bba68f6478 100644 --- a/test/IRGen/weak_import_native.swift +++ b/test/IRGen/weak_import_native.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -emit-module-path %t/weak_import_native_helper.swiftmodule -parse-as-library %S/Inputs/weak_import_native_helper.swift -enable-library-evolution // -// RUN: %target-swift-frontend -disable-type-layout -primary-file %s -I %t -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout -primary-file %s -I %t -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -disable-type-layout -primary-file %s -I %t -emit-ir // UNSUPPORTED: OS=windows-msvc diff --git a/test/IRGen/weak_import_native_hoist.swift b/test/IRGen/weak_import_native_hoist.swift index 35fcf3a909b24..5767bd794418a 100644 --- a/test/IRGen/weak_import_native_hoist.swift +++ b/test/IRGen/weak_import_native_hoist.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -emit-module-path %t/weak_import_native_hoist_helper.swiftmodule -parse-as-library %S/Inputs/weak_import_native_hoist_helper.swift -enable-library-evolution // -// RUN: %target-swift-frontend -disable-type-layout -primary-file %s -I %t -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-type-layout -primary-file %s -I %t -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -disable-type-layout -primary-file %s -I %t -emit-ir // UNSUPPORTED: OS=windows-msvc diff --git a/test/IRGen/weak_value_witnesses.sil b/test/IRGen/weak_value_witnesses.sil index d604d48590afe..ee6bb0db287ae 100644 --- a/test/IRGen/weak_value_witnesses.sil +++ b/test/IRGen/weak_value_witnesses.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir // REQUIRES: CPU=x86_64 diff --git a/test/IRGen/weaklinked_import.swift b/test/IRGen/weaklinked_import.swift index 9a1a84b27d683..0c100165f354e 100644 --- a/test/IRGen/weaklinked_import.swift +++ b/test/IRGen/weaklinked_import.swift @@ -2,7 +2,8 @@ // RUN: %target-swift-frontend -emit-module -emit-module-path %t/weaklinked_import_helper.swiftmodule -parse-as-library %S/Inputs/weaklinked_import_helper.swift -enable-library-evolution // -// RUN: %target-swift-frontend -primary-file %s -I %t -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -I %t -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -I %t -emit-ir // UNSUPPORTED: OS=windows-msvc diff --git a/test/IRGen/windows-linking.swift b/test/IRGen/windows-linking.swift index 16d86a278601c..3d42ea329f9ee 100644 --- a/test/IRGen/windows-linking.swift +++ b/test/IRGen/windows-linking.swift @@ -1,8 +1,10 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -target x86_64-unknown-windows-msvc -parse-as-library -parse-stdlib -static -emit-module -emit-module-path %t/module.swiftmodule -module-name module -DMODULE %s -// RUN: %target-swift-frontend -target x86_64-unknown-windows-msvc -parse-as-library -parse-stdlib -S -emit-ir %s -module-name main -o - -I%t | %FileCheck %s -check-prefix CHECK-STATIC +// RUN: %target-swift-frontend %use_no_opaque_pointers -target x86_64-unknown-windows-msvc -parse-as-library -parse-stdlib -S -emit-ir %s -module-name main -o - -I%t | %FileCheck %s -check-prefix CHECK-STATIC +// RUN: %target-swift-frontend -target x86_64-unknown-windows-msvc -parse-as-library -parse-stdlib -S -emit-ir %s -module-name main -o - -I%t // RUN: %target-swift-frontend -target x86_64-unknown-windows-msvc -parse-as-library -parse-stdlib -emit-module -emit-module-path %t/module.swiftmodule -module-name module -DMODULE %s -// RUN: %target-swift-frontend -target x86_64-unknown-windows-msvc -parse-as-library -parse-stdlib -S -emit-ir %s -module-name main -o - -I%t | %FileCheck %s -check-prefix CHECK-SHARED +// RUN: %target-swift-frontend %use_no_opaque_pointers -target x86_64-unknown-windows-msvc -parse-as-library -parse-stdlib -S -emit-ir %s -module-name main -o - -I%t | %FileCheck %s -check-prefix CHECK-SHARED +// RUN: %target-swift-frontend -target x86_64-unknown-windows-msvc -parse-as-library -parse-stdlib -S -emit-ir %s -module-name main -o - -I%t #if MODULE diff --git a/test/IRGen/witness-method-elimination-ir-relative.swift b/test/IRGen/witness-method-elimination-ir-relative.swift index 915cca2cefc2b..c84338494e9ac 100644 --- a/test/IRGen/witness-method-elimination-ir-relative.swift +++ b/test/IRGen/witness-method-elimination-ir-relative.swift @@ -1,9 +1,12 @@ // Tests that under -enable-llvm-wme, IRGen marks wtables and wcall sites with // the right attributes and intrinsics. -// RUN: %target-build-swift -Xfrontend -disable-objc-interop -Xfrontend -enable-llvm-wme \ +// RUN: %target-build-swift %use_no_opaque_pointers -Xfrontend -disable-objc-interop -Xfrontend -enable-llvm-wme \ // RUN: -Xfrontend -enable-relative-protocol-witness-tables \ // RUN: %s -emit-ir -o - | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-cpu +// RUN: %target-build-swift -Xfrontend -disable-objc-interop -Xfrontend -enable-llvm-wme \ +// RUN: -Xfrontend -enable-relative-protocol-witness-tables \ +// RUN: %s -emit-ir -o - // REQUIRES: PTRSIZE=64 diff --git a/test/IRGen/witness-method-elimination-ir-thunks.swift b/test/IRGen/witness-method-elimination-ir-thunks.swift index e4e08b62d5903..810ba6beb56c2 100644 --- a/test/IRGen/witness-method-elimination-ir-thunks.swift +++ b/test/IRGen/witness-method-elimination-ir-thunks.swift @@ -3,7 +3,8 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -Xfrontend -enable-llvm-wme -parse-as-library %s -DLIBRARY -module-name Library -emit-module -o %t/Library.swiftmodule -// RUN: %target-build-swift -Xfrontend -enable-llvm-wme -parse-as-library %s -DCLIENT -module-name Main -I%t -emit-ir -o - | %FileCheck %s +// RUN: %target-build-swift %use_no_opaque_pointers -Xfrontend -enable-llvm-wme -parse-as-library %s -DCLIENT -module-name Main -I%t -emit-ir -o - | %FileCheck %s +// RUN: %target-build-swift -Xfrontend -enable-llvm-wme -parse-as-library %s -DCLIENT -module-name Main -I%t -emit-ir -o - #if LIBRARY diff --git a/test/IRGen/witness-method-elimination-ir.swift b/test/IRGen/witness-method-elimination-ir.swift index e041d622ed1f5..0d8ce2702051a 100644 --- a/test/IRGen/witness-method-elimination-ir.swift +++ b/test/IRGen/witness-method-elimination-ir.swift @@ -1,8 +1,10 @@ // Tests that under -enable-llvm-wme, IRGen marks wtables and wcall sites with // the right attributes and intrinsics. -// RUN: %target-build-swift -Xfrontend -disable-objc-interop -Xfrontend -enable-llvm-wme \ +// RUN: %target-build-swift %use_no_opaque_pointers -Xfrontend -disable-objc-interop -Xfrontend -enable-llvm-wme \ // RUN: %s -emit-ir -o - | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize +// RUN: %target-build-swift -Xfrontend -disable-objc-interop -Xfrontend -enable-llvm-wme \ +// RUN: %s -emit-ir -o - protocol TheProtocol { func func1_live() diff --git a/test/IRGen/witness_method.sil b/test/IRGen/witness_method.sil index 46cfa8fea589a..23dcd165c7df8 100644 --- a/test/IRGen/witness_method.sil +++ b/test/IRGen/witness_method.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %s -emit-ir // REQUIRES: CPU=i386 || CPU=x86_64 diff --git a/test/IRGen/witness_method_default.swift b/test/IRGen/witness_method_default.swift index 683e5bd10bd63..9e0be094f493e 100644 --- a/test/IRGen/witness_method_default.swift +++ b/test/IRGen/witness_method_default.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -emit-ir | %FileCheck --check-prefix=CHECK %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -emit-ir | %FileCheck --check-prefix=CHECK %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %s -emit-ir public protocol DummyProtocol { } diff --git a/test/IRGen/witness_method_phi.sil b/test/IRGen/witness_method_phi.sil index fe6a5735b02c7..49b47243368a9 100644 --- a/test/IRGen/witness_method_phi.sil +++ b/test/IRGen/witness_method_phi.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -Xllvm -sil-disable-pass=simplification -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -Xllvm -sil-disable-pass=simplification -emit-ir %s sil_stage canonical diff --git a/test/IRGen/witness_table_indirect_conformances.swift b/test/IRGen/witness_table_indirect_conformances.swift index 4033a4f540eb3..474ba7f1b5da1 100644 --- a/test/IRGen/witness_table_indirect_conformances.swift +++ b/test/IRGen/witness_table_indirect_conformances.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -swift-version 4 | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -swift-version 4 | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -swift-version 4 protocol P1 { associatedtype AssocP1 diff --git a/test/IRGen/witness_table_multifile.swift b/test/IRGen/witness_table_multifile.swift index 38855185be04b..72fb882952f31 100644 --- a/test/IRGen/witness_table_multifile.swift +++ b/test/IRGen/witness_table_multifile.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s %S/Inputs/witness_table_multifile_2.swift -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s %S/Inputs/witness_table_multifile_2.swift -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s %S/Inputs/witness_table_multifile_2.swift -emit-ir -disable-objc-attr-requires-foundation-module // CHECK: [[P_WITNESS_TABLE:%[A-Za-z0-9_]+]] = type { [{{24|12}} x i8], %swift.type*, i8** } diff --git a/test/IRGen/witness_table_objc_associated_type.swift b/test/IRGen/witness_table_objc_associated_type.swift index 88b1fd83fa312..72125b8278ceb 100644 --- a/test/IRGen/witness_table_objc_associated_type.swift +++ b/test/IRGen/witness_table_objc_associated_type.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -enable-objc-interop protocol A {} diff --git a/test/IRGen/yield_once.sil b/test/IRGen/yield_once.sil index 4e864dedaaa17..e6cc9fe7a421e 100644 --- a/test/IRGen/yield_once.sil +++ b/test/IRGen/yield_once.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -disable-llvm-optzns -disable-swift-specific-llvm-optzns %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-ptrsize-%target-ptrauth +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -disable-llvm-optzns -disable-swift-specific-llvm-optzns %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-ptrsize-%target-ptrauth +// RUN: %target-swift-frontend -emit-ir -disable-llvm-optzns -disable-swift-specific-llvm-optzns %s import Builtin diff --git a/test/IRGen/yield_once_big.sil b/test/IRGen/yield_once_big.sil index fb96efaa26a32..bf45022b62e37 100644 --- a/test/IRGen/yield_once_big.sil +++ b/test/IRGen/yield_once_big.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -disable-llvm-optzns -disable-swift-specific-llvm-optzns %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-ptrsize-%target-ptrauth -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -disable-llvm-optzns -disable-swift-specific-llvm-optzns %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-ptrsize-%target-ptrauth -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -emit-ir -disable-llvm-optzns -disable-swift-specific-llvm-optzns %s // UNSUPPORTED: CPU=arm64_32 import Builtin diff --git a/test/IRGen/yield_once_biggish.sil b/test/IRGen/yield_once_biggish.sil index ded801d5f644f..ac843b0eda351 100644 --- a/test/IRGen/yield_once_biggish.sil +++ b/test/IRGen/yield_once_biggish.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -disable-llvm-optzns -disable-swift-specific-llvm-optzns %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-ptrsize-%target-ptrauth -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -disable-llvm-optzns -disable-swift-specific-llvm-optzns %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-ptrsize-%target-ptrauth -DINT=i%target-ptrsize +// RUN: %target-swift-frontend -emit-ir -disable-llvm-optzns -disable-swift-specific-llvm-optzns %s // i386 uses a scalar result count of 3 instead of 4, so this test would need // to be substantially different to test the functionality there. It's easier diff --git a/test/IRGen/yield_once_indirect.sil b/test/IRGen/yield_once_indirect.sil index 5fe8cb2522d0d..3563c917bd1e2 100644 --- a/test/IRGen/yield_once_indirect.sil +++ b/test/IRGen/yield_once_indirect.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -emit-ir -disable-llvm-optzns -disable-swift-specific-llvm-optzns %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-ptrsize-%target-ptrauth -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -disable-llvm-optzns -disable-swift-specific-llvm-optzns %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-ptrsize-%target-ptrauth -DINT=i%target-ptrsize +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -disable-llvm-optzns -disable-swift-specific-llvm-optzns %s import Builtin import Swift diff --git a/test/IRGen/zombies.swift b/test/IRGen/zombies.swift index 035573b6046ae..ad67d458faf66 100644 --- a/test/IRGen/zombies.swift +++ b/test/IRGen/zombies.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -primary-file %s -O -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -primary-file %s -O -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -O -emit-ir // rdar://24121475 // Ideally, these wouldn't be in the v-table at all; but as long as they diff --git a/test/Interop/C/function/emit-called-inline-function-irgen.swift b/test/Interop/C/function/emit-called-inline-function-irgen.swift index 8d53db8a28bf7..e995ebd9088ef 100644 --- a/test/Interop/C/function/emit-called-inline-function-irgen.swift +++ b/test/Interop/C/function/emit-called-inline-function-irgen.swift @@ -5,8 +5,10 @@ // Swift. // RUN: %empty-directory(%t) -// RUN: %target-swift-frontend %s -I %S/Inputs -Xcc -std=c99 -emit-ir -o - | %FileCheck %s -check-prefix C99 --implicit-check-not notCalled -// RUN: %target-swiftxx-frontend %s -I %S/Inputs -emit-ir -o - | %FileCheck %s -check-prefix CXX --implicit-check-not notCalled +// RUN: %target-swift-frontend %use_no_opaque_pointers %s -I %S/Inputs -Xcc -std=c99 -emit-ir -o - | %FileCheck %s -check-prefix C99 --implicit-check-not notCalled +// RUN: %target-swift-frontend %s -I %S/Inputs -Xcc -std=c99 -emit-ir -o - +// RUN: %target-swiftxx-frontend %use_no_opaque_pointers %s -I %S/Inputs -emit-ir -o - | %FileCheck %s -check-prefix CXX --implicit-check-not notCalled +// RUN: %target-swiftxx-frontend %s -I %S/Inputs -emit-ir -o - import EmitCalledInlineFunction diff --git a/test/Interop/C/struct/struct-decl-context-irgen.swift b/test/Interop/C/struct/struct-decl-context-irgen.swift index 0a8905d7bb288..ba15b830b2cc1 100644 --- a/test/Interop/C/struct/struct-decl-context-irgen.swift +++ b/test/Interop/C/struct/struct-decl-context-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir -I %S/Inputs %s | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers -I %S/Inputs %s | %FileCheck %s +// RUN: %target-swift-emit-ir -I %S/Inputs %s // This test checks that structs that are imported from a C module are mangled // in Swift names as if they are declared in the global namespace, even when diff --git a/test/Interop/Cxx/class/constructors-copy-irgen-macosx.swift b/test/Interop/Cxx/class/constructors-copy-irgen-macosx.swift index 0c37b25abe99a..bfa6b00f1bbe3 100644 --- a/test/Interop/Cxx/class/constructors-copy-irgen-macosx.swift +++ b/test/Interop/Cxx/class/constructors-copy-irgen-macosx.swift @@ -1,6 +1,7 @@ // Target-specific tests for C++ copy constructor code generation. -// RUN: %swift -module-name MySwift -target x86_64-apple-macosx10.9 -dump-clang-diagnostics -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -parse-stdlib -parse-as-library -disable-legacy-type-info -Xcc -fignore-exceptions | %FileCheck %s -check-prefix=ITANIUM_X64 +// RUN: %swift %use_no_opaque_pointers -module-name MySwift -target x86_64-apple-macosx10.9 -dump-clang-diagnostics -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -parse-stdlib -parse-as-library -disable-legacy-type-info -Xcc -fignore-exceptions | %FileCheck %s -check-prefix=ITANIUM_X64 +// RUN: %swift -module-name MySwift -target x86_64-apple-macosx10.9 -dump-clang-diagnostics -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -parse-stdlib -parse-as-library -disable-legacy-type-info -Xcc -fignore-exceptions // REQUIRES: OS=macosx // REQUIRES: CPU=x86_64 diff --git a/test/Interop/Cxx/class/constructors-copy-irgen-windows.swift b/test/Interop/Cxx/class/constructors-copy-irgen-windows.swift index d094ae6d747f8..20ba2dde667f7 100644 --- a/test/Interop/Cxx/class/constructors-copy-irgen-windows.swift +++ b/test/Interop/Cxx/class/constructors-copy-irgen-windows.swift @@ -1,6 +1,7 @@ // Target-specific tests for C++ copy constructor code generation. -// RUN: %swift -module-name MySwift -target x86_64-unknown-windows-msvc -dump-clang-diagnostics -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -parse-stdlib -parse-as-library -disable-legacy-type-info | %FileCheck %s -check-prefix=MICROSOFT_X64 +// RUN: %swift %use_no_opaque_pointers -module-name MySwift -target x86_64-unknown-windows-msvc -dump-clang-diagnostics -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -parse-stdlib -parse-as-library -disable-legacy-type-info | %FileCheck %s -check-prefix=MICROSOFT_X64 +// RUN: %swift -module-name MySwift -target x86_64-unknown-windows-msvc -dump-clang-diagnostics -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -parse-stdlib -parse-as-library -disable-legacy-type-info // REQUIRES: OS=windows-msvc // REQUIRES: CPU=x86_64 diff --git a/test/Interop/Cxx/class/constructors-irgen-macosx.swift b/test/Interop/Cxx/class/constructors-irgen-macosx.swift index 2a645e71c6f2e..c475d20f5d817 100644 --- a/test/Interop/Cxx/class/constructors-irgen-macosx.swift +++ b/test/Interop/Cxx/class/constructors-irgen-macosx.swift @@ -1,6 +1,7 @@ // Target-specific tests for C++ constructor call code generation. -// RUN: %swift -module-name MySwift -target x86_64-apple-macosx10.9 -dump-clang-diagnostics -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -parse-stdlib -parse-as-library -disable-legacy-type-info -Xcc -fignore-exceptions | %FileCheck %s -check-prefix=ITANIUM_X64 +// RUN: %swift %use_no_opaque_pointers -module-name MySwift -target x86_64-apple-macosx10.9 -dump-clang-diagnostics -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -parse-stdlib -parse-as-library -disable-legacy-type-info -Xcc -fignore-exceptions | %FileCheck %s -check-prefix=ITANIUM_X64 +// RUN: %swift -module-name MySwift -target x86_64-apple-macosx10.9 -dump-clang-diagnostics -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -parse-stdlib -parse-as-library -disable-legacy-type-info -Xcc -fignore-exceptions // REQUIRES: OS=macosx // REQUIRES: CPU=x86_64 diff --git a/test/Interop/Cxx/class/constructors-irgen-windows.swift b/test/Interop/Cxx/class/constructors-irgen-windows.swift index 927155dff762a..d2987eaf975c8 100644 --- a/test/Interop/Cxx/class/constructors-irgen-windows.swift +++ b/test/Interop/Cxx/class/constructors-irgen-windows.swift @@ -1,6 +1,7 @@ // Target-specific tests for C++ constructor call code generation. -// RUN: %swift -module-name MySwift -target x86_64-unknown-windows-msvc -dump-clang-diagnostics -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -parse-stdlib -parse-as-library -disable-legacy-type-info | %FileCheck %s -check-prefix=MICROSOFT_X64 +// RUN: %swift %use_no_opaque_pointers -module-name MySwift -target x86_64-unknown-windows-msvc -dump-clang-diagnostics -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -parse-stdlib -parse-as-library -disable-legacy-type-info | %FileCheck %s -check-prefix=MICROSOFT_X64 +// RUN: %swift -module-name MySwift -target x86_64-unknown-windows-msvc -dump-clang-diagnostics -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -parse-stdlib -parse-as-library -disable-legacy-type-info // REQUIRES: OS=windows-msvc // REQUIRES: CPU=x86_64 diff --git a/test/Interop/Cxx/class/constructors-objc-irgen.swift b/test/Interop/Cxx/class/constructors-objc-irgen.swift index f0d1b0116aa7a..2f1f01aee8d79 100644 --- a/test/Interop/Cxx/class/constructors-objc-irgen.swift +++ b/test/Interop/Cxx/class/constructors-objc-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -Xcc -fignore-exceptions // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/Interop/Cxx/class/copy-move-assignment-irgen.swift b/test/Interop/Cxx/class/copy-move-assignment-irgen.swift index 93a7f62136740..5e9ab96953d79 100644 --- a/test/Interop/Cxx/class/copy-move-assignment-irgen.swift +++ b/test/Interop/Cxx/class/copy-move-assignment-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -Xcc -fignore-exceptions -O | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %use_no_opaque_pointers -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -Xcc -fignore-exceptions -O | %FileCheck %s +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s -Xcc -fignore-exceptions -O import CopyMoveAssignment diff --git a/test/Interop/Cxx/class/destructors-correct-abi-irgen.swift b/test/Interop/Cxx/class/destructors-correct-abi-irgen.swift index 4129f02020ab7..4f26ba68d35be 100644 --- a/test/Interop/Cxx/class/destructors-correct-abi-irgen.swift +++ b/test/Interop/Cxx/class/destructors-correct-abi-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %swift -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s | %FileCheck %s +// RUN: %swift -I %S/Inputs -enable-experimental-cxx-interop -emit-ir %s import Destructors diff --git a/test/Interop/Cxx/class/destructors-non-trivial-implicit-irgen.swift b/test/Interop/Cxx/class/destructors-non-trivial-implicit-irgen.swift index bf26510cf2746..0209815488b9e 100644 --- a/test/Interop/Cxx/class/destructors-non-trivial-implicit-irgen.swift +++ b/test/Interop/Cxx/class/destructors-non-trivial-implicit-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -enable-experimental-cxx-interop -I %S/Inputs %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-experimental-cxx-interop -I %S/Inputs %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -enable-experimental-cxx-interop -I %S/Inputs %s -emit-ir import Destructors diff --git a/test/Interop/Cxx/class/inline-function-codegen/constructor-calls-method-irgen.swift b/test/Interop/Cxx/class/inline-function-codegen/constructor-calls-method-irgen.swift index 0dec7b0234bc0..9273ddb0a048b 100644 --- a/test/Interop/Cxx/class/inline-function-codegen/constructor-calls-method-irgen.swift +++ b/test/Interop/Cxx/class/inline-function-codegen/constructor-calls-method-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %s -I %S/Inputs -enable-experimental-cxx-interop | %FileCheck %s +// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop import ConstructorCallsMethod diff --git a/test/Interop/Cxx/class/inline-function-codegen/method-calls-method-from-nested-struct-irgen.swift b/test/Interop/Cxx/class/inline-function-codegen/method-calls-method-from-nested-struct-irgen.swift index a733935576bd3..81c0d5209befe 100644 --- a/test/Interop/Cxx/class/inline-function-codegen/method-calls-method-from-nested-struct-irgen.swift +++ b/test/Interop/Cxx/class/inline-function-codegen/method-calls-method-from-nested-struct-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %s -I %S/Inputs -enable-experimental-cxx-interop | %FileCheck %s +// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop import MethodCallsMethodFromNestedStruct diff --git a/test/Interop/Cxx/class/inline-function-codegen/method-calls-method-irgen.swift b/test/Interop/Cxx/class/inline-function-codegen/method-calls-method-irgen.swift index 8c644dc7a616c..03effea05b6a0 100644 --- a/test/Interop/Cxx/class/inline-function-codegen/method-calls-method-irgen.swift +++ b/test/Interop/Cxx/class/inline-function-codegen/method-calls-method-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %s -I %S/Inputs -enable-experimental-cxx-interop | %FileCheck %s +// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop import MethodCallsMethod diff --git a/test/Interop/Cxx/class/memory-layout-silgen.swift b/test/Interop/Cxx/class/memory-layout-silgen.swift index a0301a03af7f3..b97b9a09f92f2 100644 --- a/test/Interop/Cxx/class/memory-layout-silgen.swift +++ b/test/Interop/Cxx/class/memory-layout-silgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swiftxx-frontend -I %S/Inputs -emit-ir -o - %s | %FileCheck %s +// RUN: %target-swiftxx-frontend %use_no_opaque_pointers -I %S/Inputs -emit-ir -o - %s | %FileCheck %s +// RUN: %target-swiftxx-frontend -I %S/Inputs -emit-ir -o - %s // XFAIL: OS=linux-android // XFAIL: OS=linux-androideabi diff --git a/test/Interop/Cxx/class/protocol-conformance-irgen.swift b/test/Interop/Cxx/class/protocol-conformance-irgen.swift index 3caa9c5a1b313..80dc1df00a5e7 100644 --- a/test/Interop/Cxx/class/protocol-conformance-irgen.swift +++ b/test/Interop/Cxx/class/protocol-conformance-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers -I %S/Inputs -enable-experimental-cxx-interop %s -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s -Xcc -fignore-exceptions import ProtocolConformance diff --git a/test/Interop/Cxx/class/returns-large-class-irgen.swift b/test/Interop/Cxx/class/returns-large-class-irgen.swift index aaef2398d762e..50b9336a7a693 100644 --- a/test/Interop/Cxx/class/returns-large-class-irgen.swift +++ b/test/Interop/Cxx/class/returns-large-class-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s -validate-tbd-against-ir=none | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers -I %S/Inputs -enable-experimental-cxx-interop %s -validate-tbd-against-ir=none | %FileCheck %s +// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s -validate-tbd-against-ir=none // This test verifies that Swift correctly emits IR calls to C++ functions that // had Named Return Value Optimization applied to them. The first argument of diff --git a/test/Interop/Cxx/class/type-classification-non-trivial-irgen.swift b/test/Interop/Cxx/class/type-classification-non-trivial-irgen.swift index 5a520e0cf82f1..6af57349c5c1a 100644 --- a/test/Interop/Cxx/class/type-classification-non-trivial-irgen.swift +++ b/test/Interop/Cxx/class/type-classification-non-trivial-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swiftxx-frontend -I %S/Inputs %s -emit-ir -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swiftxx-frontend %use_no_opaque_pointers -I %S/Inputs %s -emit-ir -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swiftxx-frontend -I %S/Inputs %s -emit-ir -Xcc -fignore-exceptions // Verify that non-trivial/address-only C++ classes are constructed and accessed // correctly. Make sure that we correctly IRGen functions that construct diff --git a/test/Interop/Cxx/exceptions/objc-trap-on-exception-irgen-itanium.swift b/test/Interop/Cxx/exceptions/objc-trap-on-exception-irgen-itanium.swift index 8da9d07347cfe..149089cb0bd7a 100644 --- a/test/Interop/Cxx/exceptions/objc-trap-on-exception-irgen-itanium.swift +++ b/test/Interop/Cxx/exceptions/objc-trap-on-exception-irgen-itanium.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: split-file %s %t -// RUN: %target-swift-emit-ir %t/test.swift -I %t/Inputs -enable-experimental-cxx-interop | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %t/test.swift -I %t/Inputs -enable-experimental-cxx-interop | %FileCheck %s +// RUN: %target-swift-emit-ir %t/test.swift -I %t/Inputs -enable-experimental-cxx-interop // REQUIRES: objc_interop // UNSUPPORTED: OS=windows-msvc diff --git a/test/Interop/Cxx/exceptions/trap-on-exception-irgen-itanium.swift b/test/Interop/Cxx/exceptions/trap-on-exception-irgen-itanium.swift index 19a2f24d8b26d..db9fac4e4c56f 100644 --- a/test/Interop/Cxx/exceptions/trap-on-exception-irgen-itanium.swift +++ b/test/Interop/Cxx/exceptions/trap-on-exception-irgen-itanium.swift @@ -1,8 +1,10 @@ // RUN: %empty-directory(%t) // RUN: split-file %s %t -// RUN: %target-swift-emit-ir %t/test.swift -I %t/Inputs -enable-experimental-cxx-interop | %FileCheck %s -// RUN: %target-swift-emit-ir %t/test.swift -I %t/Inputs -enable-experimental-cxx-interop -g | %FileCheck --check-prefix=DEBUG %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %t/test.swift -I %t/Inputs -enable-experimental-cxx-interop | %FileCheck %s +// RUN: %target-swift-emit-ir %t/test.swift -I %t/Inputs -enable-experimental-cxx-interop +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %t/test.swift -I %t/Inputs -enable-experimental-cxx-interop -g | %FileCheck --check-prefix=DEBUG %s +// RUN: %target-swift-emit-ir %t/test.swift -I %t/Inputs -enable-experimental-cxx-interop -g // UNSUPPORTED: OS=windows-msvc diff --git a/test/Interop/Cxx/exceptions/trap-on-exception-irgen-msvc.swift b/test/Interop/Cxx/exceptions/trap-on-exception-irgen-msvc.swift index d15504e776f09..db19b9cf8ef6d 100644 --- a/test/Interop/Cxx/exceptions/trap-on-exception-irgen-msvc.swift +++ b/test/Interop/Cxx/exceptions/trap-on-exception-irgen-msvc.swift @@ -1,7 +1,8 @@ // RUN: %empty-directory(%t) // RUN: split-file %S/trap-on-exception-irgen-itanium.swift %t -// RUN: %target-swift-emit-ir %t/test.swift -I %t/Inputs -enable-experimental-cxx-interop | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %t/test.swift -I %t/Inputs -enable-experimental-cxx-interop | %FileCheck %s +// RUN: %target-swift-emit-ir %t/test.swift -I %t/Inputs -enable-experimental-cxx-interop // REQUIRES: OS=windows-msvc diff --git a/test/Interop/Cxx/extern-var/extern-var-irgen.swift b/test/Interop/Cxx/extern-var/extern-var-irgen.swift index ad73f65e47313..3fb83321bbe7e 100644 --- a/test/Interop/Cxx/extern-var/extern-var-irgen.swift +++ b/test/Interop/Cxx/extern-var/extern-var-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %s -I %S/Inputs -enable-experimental-cxx-interop | %FileCheck %s +// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop import ExternVar diff --git a/test/Interop/Cxx/foreign-reference/base-class-layout-irgen.swift b/test/Interop/Cxx/foreign-reference/base-class-layout-irgen.swift index cffbd8b6a52bf..b80b6eec37708 100644 --- a/test/Interop/Cxx/foreign-reference/base-class-layout-irgen.swift +++ b/test/Interop/Cxx/foreign-reference/base-class-layout-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -module-name=test -disable-availability-checking | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %s -I %S/Inputs -enable-experimental-cxx-interop -module-name=test -disable-availability-checking | %FileCheck %s +// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -module-name=test -disable-availability-checking import MemberLayout diff --git a/test/Interop/Cxx/foreign-reference/move-only-irgen.swift b/test/Interop/Cxx/foreign-reference/move-only-irgen.swift index 780f650df2954..25a73ca47823d 100644 --- a/test/Interop/Cxx/foreign-reference/move-only-irgen.swift +++ b/test/Interop/Cxx/foreign-reference/move-only-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -validate-tbd-against-ir=none -disable-llvm-verify -Xcc -fignore-exceptions -disable-availability-checking | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %s -I %S/Inputs -enable-experimental-cxx-interop -validate-tbd-against-ir=none -disable-llvm-verify -Xcc -fignore-exceptions -disable-availability-checking | %FileCheck %s +// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -validate-tbd-against-ir=none -disable-llvm-verify -Xcc -fignore-exceptions -disable-availability-checking // // XFAIL: OS=linux-android, OS=linux-androideabi diff --git a/test/Interop/Cxx/foreign-reference/pod-irgen.swift b/test/Interop/Cxx/foreign-reference/pod-irgen.swift index c9e7b8aef8d39..54c3e0280f15c 100644 --- a/test/Interop/Cxx/foreign-reference/pod-irgen.swift +++ b/test/Interop/Cxx/foreign-reference/pod-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -validate-tbd-against-ir=none -disable-llvm-verify -Xcc -fignore-exceptions -disable-availability-checking | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %s -I %S/Inputs -enable-experimental-cxx-interop -validate-tbd-against-ir=none -disable-llvm-verify -Xcc -fignore-exceptions -disable-availability-checking | %FileCheck %s +// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -validate-tbd-against-ir=none -disable-llvm-verify -Xcc -fignore-exceptions -disable-availability-checking // // XFAIL: OS=linux-android, OS=linux-androideabi diff --git a/test/Interop/Cxx/foreign-reference/singleton-irgen.swift b/test/Interop/Cxx/foreign-reference/singleton-irgen.swift index d716cbca5dddd..d678f2e6ab92e 100644 --- a/test/Interop/Cxx/foreign-reference/singleton-irgen.swift +++ b/test/Interop/Cxx/foreign-reference/singleton-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -validate-tbd-against-ir=none -disable-llvm-verify -Xcc -fignore-exceptions -disable-availability-checking | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %s -I %S/Inputs -enable-experimental-cxx-interop -validate-tbd-against-ir=none -disable-llvm-verify -Xcc -fignore-exceptions -disable-availability-checking | %FileCheck %s +// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -validate-tbd-against-ir=none -disable-llvm-verify -Xcc -fignore-exceptions -disable-availability-checking // // XFAIL: OS=linux-android, OS=linux-androideabi diff --git a/test/Interop/Cxx/foreign-reference/unimportable-member-layout-irgen.swift b/test/Interop/Cxx/foreign-reference/unimportable-member-layout-irgen.swift index a4b877a921d99..77e2be2226a2c 100644 --- a/test/Interop/Cxx/foreign-reference/unimportable-member-layout-irgen.swift +++ b/test/Interop/Cxx/foreign-reference/unimportable-member-layout-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -module-name=test -disable-availability-checking | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %s -I %S/Inputs -enable-experimental-cxx-interop -module-name=test -disable-availability-checking | %FileCheck %s +// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -module-name=test -disable-availability-checking import MemberLayout diff --git a/test/Interop/Cxx/namespace/classes-irgen.swift b/test/Interop/Cxx/namespace/classes-irgen.swift index 47b3f65c70c6f..5f20567a8d245 100644 --- a/test/Interop/Cxx/namespace/classes-irgen.swift +++ b/test/Interop/Cxx/namespace/classes-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers -I %S/Inputs -enable-experimental-cxx-interop %s -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s -Xcc -fignore-exceptions import Classes diff --git a/test/Interop/Cxx/namespace/free-functions-irgen.swift b/test/Interop/Cxx/namespace/free-functions-irgen.swift index f1f470d4f4064..5faf418c3788e 100644 --- a/test/Interop/Cxx/namespace/free-functions-irgen.swift +++ b/test/Interop/Cxx/namespace/free-functions-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers -I %S/Inputs -enable-experimental-cxx-interop %s -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s -Xcc -fignore-exceptions import FreeFunctions diff --git a/test/Interop/Cxx/namespace/templates-irgen.swift b/test/Interop/Cxx/namespace/templates-irgen.swift index 61cccfca61c0d..b74d00868b064 100644 --- a/test/Interop/Cxx/namespace/templates-irgen.swift +++ b/test/Interop/Cxx/namespace/templates-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers -I %S/Inputs -enable-experimental-cxx-interop %s -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s -Xcc -fignore-exceptions import Templates diff --git a/test/Interop/Cxx/objc-correctness/Inputs/NSOptionsMangling.apinotes b/test/Interop/Cxx/objc-correctness/Inputs/NSOptionsMangling.apinotes new file mode 100644 index 0000000000000..e8f3dbd34b73b --- /dev/null +++ b/test/Interop/Cxx/objc-correctness/Inputs/NSOptionsMangling.apinotes @@ -0,0 +1,5 @@ +--- +Name: NSOptionsMangling +Tags: +- Name: UIControlState + SwiftName: UIControl.State diff --git a/test/Interop/Cxx/objc-correctness/Inputs/NSOptionsMangling.h b/test/Interop/Cxx/objc-correctness/Inputs/NSOptionsMangling.h new file mode 100644 index 0000000000000..6618d1c03c164 --- /dev/null +++ b/test/Interop/Cxx/objc-correctness/Inputs/NSOptionsMangling.h @@ -0,0 +1,22 @@ +#define __CF_OPTIONS_ATTRIBUTES __attribute__((flag_enum,enum_extensibility(open))) +#if (__cplusplus) +#define CF_OPTIONS(_type, _name) __attribute__((availability(swift,unavailable))) _type _name; enum __CF_OPTIONS_ATTRIBUTES : _name +#else +#define CF_OPTIONS(_type, _name) enum __CF_OPTIONS_ATTRIBUTES _name : _type _name; enum _name : _type +#endif + +typedef CF_OPTIONS(unsigned, UIControlState) { UIControlStateNormal = 0 }; + +#ifdef __cplusplus +#define UIKIT_EXTERN extern "C" __attribute__((visibility ("default"))) +#else +#define UIKIT_EXTERN extern __attribute__((visibility ("default"))) +#endif + +@interface UIView +@end + +UIKIT_EXTERN +@interface UIControl : UIView +@end + diff --git a/test/Interop/Cxx/objc-correctness/Inputs/module.modulemap b/test/Interop/Cxx/objc-correctness/Inputs/module.modulemap index a7b2476b3b07a..0d922784daf2a 100644 --- a/test/Interop/Cxx/objc-correctness/Inputs/module.modulemap +++ b/test/Interop/Cxx/objc-correctness/Inputs/module.modulemap @@ -9,3 +9,6 @@ module CxxClassWithNSStringInit [extern_c] { requires cplusplus } +module NSOptionsMangling { + header "NSOptionsMangling.h" +} diff --git a/test/Interop/Cxx/objc-correctness/ns-options-mangling.swift b/test/Interop/Cxx/objc-correctness/ns-options-mangling.swift new file mode 100644 index 0000000000000..4dc750a247a44 --- /dev/null +++ b/test/Interop/Cxx/objc-correctness/ns-options-mangling.swift @@ -0,0 +1,11 @@ +// RUN: %target-swift-frontend -I %S/Inputs -c -cxx-interoperability-mode=swift-5.9 %s -S -o - | %FileCheck %s +// RUN: %target-swift-frontend -I %S/Inputs -c %s -S -o - | %FileCheck %s + +// REQUIRES: objc_interop + +// CHECK: _$sSo14UIControlStateV4main7FooableACMc +// The following check is to ensure the conformance is mangled properly: +// protocol conformance descriptor for __C.UIControlState : main.Fooable in main +import NSOptionsMangling +protocol Fooable { } +extension UIControl.State: Fooable {} diff --git a/test/Interop/Cxx/operators/member-inline-irgen.swift b/test/Interop/Cxx/operators/member-inline-irgen.swift index 0c7b3f1580969..8aa884ee515f6 100644 --- a/test/Interop/Cxx/operators/member-inline-irgen.swift +++ b/test/Interop/Cxx/operators/member-inline-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %s -I %S/Inputs -enable-experimental-cxx-interop -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -Xcc -fignore-exceptions // // We should be able to support windows now. We will remove XFAIL in follow up // XFAIL: windows diff --git a/test/Interop/Cxx/operators/member-out-of-line-irgen.swift b/test/Interop/Cxx/operators/member-out-of-line-irgen.swift index ab6f28b2937f1..0a64057dab38d 100644 --- a/test/Interop/Cxx/operators/member-out-of-line-irgen.swift +++ b/test/Interop/Cxx/operators/member-out-of-line-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %s -I %S/Inputs -enable-experimental-cxx-interop -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -Xcc -fignore-exceptions // // We should be able to support windows now. We will remove XFAIL in follow up // XFAIL: windows diff --git a/test/Interop/Cxx/reference/reference-irgen.swift b/test/Interop/Cxx/reference/reference-irgen.swift index f2eeaab58bdf9..b0a1703c8457e 100644 --- a/test/Interop/Cxx/reference/reference-irgen.swift +++ b/test/Interop/Cxx/reference/reference-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers -I %S/Inputs -enable-experimental-cxx-interop %s -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s -Xcc -fignore-exceptions import Reference diff --git a/test/Interop/Cxx/static/inline-static-member-var-irgen.swift b/test/Interop/Cxx/static/inline-static-member-var-irgen.swift index bac7aee8ff0bf..0cfe053d1a81a 100644 --- a/test/Interop/Cxx/static/inline-static-member-var-irgen.swift +++ b/test/Interop/Cxx/static/inline-static-member-var-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers -I %S/Inputs -enable-experimental-cxx-interop %s | %FileCheck %s +// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s import InlineStaticMemberVar diff --git a/test/Interop/Cxx/static/static-member-func-irgen.swift b/test/Interop/Cxx/static/static-member-func-irgen.swift index 6db13b21c22e0..e651a812f99e1 100644 --- a/test/Interop/Cxx/static/static-member-func-irgen.swift +++ b/test/Interop/Cxx/static/static-member-func-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %s -I %S/Inputs -enable-experimental-cxx-interop -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -Xcc -fignore-exceptions import StaticMemberFunc diff --git a/test/Interop/Cxx/static/static-member-var-irgen.swift b/test/Interop/Cxx/static/static-member-var-irgen.swift index ee109553ab8c3..379b3dfbb1d83 100644 --- a/test/Interop/Cxx/static/static-member-var-irgen.swift +++ b/test/Interop/Cxx/static/static-member-var-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers -I %S/Inputs -enable-experimental-cxx-interop %s | %FileCheck %s +// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s // CHECK: @{{_ZN16WithStaticMember12staticMemberE|"\?staticMember@WithStaticMember@@2HA"}} = external {{(dso_local )?}}global i32, align 4 // CHECK: @{{_ZN26WithIncompleteStaticMember10selfMemberE|"\?selfMember@WithIncompleteStaticMember@@2V1@A"}} = {{external|linkonce_odr}} {{(dso_local )?}}global %class.WithIncompleteStaticMember, align 4 @@ -53,4 +54,4 @@ public func readDefinedOutOfLineConstMember() -> CInt { // CHECK: define {{(protected |dllexport )?}}swiftcc i32 @"$s4main31readDefinedOutOfLineConstMembers5Int32VyF"() #0 // CHECK: [[VALUE:%.*]] = load i32, i32* getelementptr inbounds (%Ts5Int32V, %Ts5Int32V* bitcast (i32* @{{_ZN21WithConstStaticMember16definedOutOfLineE|"\?definedOutOfLine@WithConstStaticMember@@2HB"}} to %Ts5Int32V*), i32 0, i32 0), align 4 -// CHECK: ret i32 [[VALUE]] \ No newline at end of file +// CHECK: ret i32 [[VALUE]] diff --git a/test/Interop/Cxx/static/static-var-irgen.swift b/test/Interop/Cxx/static/static-var-irgen.swift index e5570a45b3a10..3ba33700dfbf2 100644 --- a/test/Interop/Cxx/static/static-var-irgen.swift +++ b/test/Interop/Cxx/static/static-var-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers -I %S/Inputs -enable-experimental-cxx-interop %s | %FileCheck %s +// RUN: %target-swift-emit-ir -I %S/Inputs -enable-experimental-cxx-interop %s import StaticVar diff --git a/test/Interop/Cxx/templates/class-template-instantiation-demangling.swift b/test/Interop/Cxx/templates/class-template-instantiation-demangling.swift index 79bc9dc62374b..ca7fcce801a15 100644 --- a/test/Interop/Cxx/templates/class-template-instantiation-demangling.swift +++ b/test/Interop/Cxx/templates/class-template-instantiation-demangling.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop | grep 'define.*swiftcc.*$' | xargs %swift-demangle | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %s -I %S/Inputs -enable-experimental-cxx-interop | grep 'define.*swiftcc.*$' | xargs %swift-demangle | %FileCheck %s +// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop | grep 'define.*swiftcc.*$' import Mangling diff --git a/test/Interop/Cxx/templates/class-template-uninstantiatable-members-irgen.swift b/test/Interop/Cxx/templates/class-template-uninstantiatable-members-irgen.swift index cad06d97afb4c..bd3cb05270fcb 100644 --- a/test/Interop/Cxx/templates/class-template-uninstantiatable-members-irgen.swift +++ b/test/Interop/Cxx/templates/class-template-uninstantiatable-members-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -disable-availability-checking -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %s -I %S/Inputs -enable-experimental-cxx-interop -disable-availability-checking -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop -disable-availability-checking -Xcc -fignore-exceptions import ClassTemplateInstantiationErrors diff --git a/test/Interop/Cxx/templates/mangling-irgen.swift b/test/Interop/Cxx/templates/mangling-irgen.swift index 0b4a5a667aeec..cd24157b978ac 100644 --- a/test/Interop/Cxx/templates/mangling-irgen.swift +++ b/test/Interop/Cxx/templates/mangling-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop | %FileCheck %s +// RUN: %target-swift-emit-ir %use_no_opaque_pointers %s -I %S/Inputs -enable-experimental-cxx-interop | %FileCheck %s +// RUN: %target-swift-emit-ir %s -I %S/Inputs -enable-experimental-cxx-interop import Mangling diff --git a/test/Interop/Cxx/union/anonymous-union-partly-invalid.swift b/test/Interop/Cxx/union/anonymous-union-partly-invalid.swift index d0edc3f3c3c5c..bef6aa53f95ca 100644 --- a/test/Interop/Cxx/union/anonymous-union-partly-invalid.swift +++ b/test/Interop/Cxx/union/anonymous-union-partly-invalid.swift @@ -1,4 +1,5 @@ -// RUN: %swift -I %S/Inputs -enable-experimental-cxx-interop -enable-objc-interop -emit-ir %s -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %swift %use_no_opaque_pointers -I %S/Inputs -enable-experimental-cxx-interop -enable-objc-interop -emit-ir %s -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %swift -I %S/Inputs -enable-experimental-cxx-interop -enable-objc-interop -emit-ir %s -Xcc -fignore-exceptions import AnonymousUnionPartlyInvalid diff --git a/test/Interop/Cxx/value-witness-table/copy-constructors-irgen.swift b/test/Interop/Cxx/value-witness-table/copy-constructors-irgen.swift index a0d15f7154a71..71afe41737f1f 100644 --- a/test/Interop/Cxx/value-witness-table/copy-constructors-irgen.swift +++ b/test/Interop/Cxx/value-witness-table/copy-constructors-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -enable-experimental-cxx-interop -I %S/Inputs %s -emit-ir -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-experimental-cxx-interop -I %S/Inputs %s -emit-ir -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-frontend -enable-experimental-cxx-interop -I %S/Inputs %s -emit-ir -Xcc -fignore-exceptions // REQUIRES: CPU=x86_64 // REQUIRES: objc_interop diff --git a/test/Interop/Cxx/value-witness-table/custom-destructors-non-virtual-irgen.swift b/test/Interop/Cxx/value-witness-table/custom-destructors-non-virtual-irgen.swift index edd25f6ba600a..f195ebcce9d3f 100644 --- a/test/Interop/Cxx/value-witness-table/custom-destructors-non-virtual-irgen.swift +++ b/test/Interop/Cxx/value-witness-table/custom-destructors-non-virtual-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -enable-experimental-cxx-interop -I %S/Inputs %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-experimental-cxx-interop -I %S/Inputs %s -emit-ir | %FileCheck %s +// RUN: %target-swift-frontend -enable-experimental-cxx-interop -I %S/Inputs %s -emit-ir // This tests output needs to be updated for arm64. // XFAIL: CPU=arm64e diff --git a/test/Interop/Cxx/value-witness-table/custom-destructors-virtual-irgen.swift b/test/Interop/Cxx/value-witness-table/custom-destructors-virtual-irgen.swift index 7959bb2c57faa..b7848e274aa41 100644 --- a/test/Interop/Cxx/value-witness-table/custom-destructors-virtual-irgen.swift +++ b/test/Interop/Cxx/value-witness-table/custom-destructors-virtual-irgen.swift @@ -2,7 +2,8 @@ // will cause linker errors because of undefined vtables. // FIXME: Once we can link with libc++ we can start using RTTI. // -// RUN: %target-swift-frontend -enable-experimental-cxx-interop -I %S/Inputs %s -emit-ir -Xcc -fno-rtti | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-experimental-cxx-interop -I %S/Inputs %s -emit-ir -Xcc -fno-rtti | %FileCheck %s +// RUN: %target-swift-frontend -enable-experimental-cxx-interop -I %S/Inputs %s -emit-ir -Xcc -fno-rtti import CustomDestructor diff --git a/test/Interop/Cxx/value-witness-table/witness-lifetime-operations-irgen.swift b/test/Interop/Cxx/value-witness-table/witness-lifetime-operations-irgen.swift index 11fca0494c3af..c003648d42095 100644 --- a/test/Interop/Cxx/value-witness-table/witness-lifetime-operations-irgen.swift +++ b/test/Interop/Cxx/value-witness-table/witness-lifetime-operations-irgen.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -enable-experimental-cxx-interop -I %S/Inputs %s -emit-ir -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-experimental-cxx-interop -I %S/Inputs %s -emit-ir -Xcc -fignore-exceptions | %FileCheck %s +// RUN: %target-swift-frontend -enable-experimental-cxx-interop -I %S/Inputs %s -emit-ir -Xcc -fignore-exceptions // Temporarily restrict to x86 (rdar://89908618) // REQUIRES: CPU=x86_64 diff --git a/test/Interpreter/llvm_link_time_opt.swift b/test/Interpreter/llvm_link_time_opt.swift index 0371e8fc98988..5f464b1feef8a 100644 --- a/test/Interpreter/llvm_link_time_opt.swift +++ b/test/Interpreter/llvm_link_time_opt.swift @@ -9,8 +9,8 @@ // REQUIRES: no_asan // RUN: %empty-directory(%t) -// RUN: %target-swiftc_driver -emit-library -static -lto=llvm-full %lto_flags -emit-module %S/Inputs/lto/module1.swift -working-directory %t -// RUN: %target-swiftc_driver -lto=llvm-full %lto_flags %s -I%t -L%t -lmodule1 -module-name main -o %t/main +// RUN: %use_just_built_liblto %target-swiftc_driver -emit-library -static -lto=llvm-full %lto_flags -emit-module %S/Inputs/lto/module1.swift -working-directory %t +// RUN: %use_just_built_liblto %target-swiftc_driver -lto=llvm-full %lto_flags %s -I%t -L%t -lmodule1 -module-name main -o %t/main // RUN: %llvm-nm --defined-only %t/main | %FileCheck %s // CHECK-NOT: _$s7module120unusedPublicFunctionyyF diff --git a/test/Interpreter/lto_static_lib.swift b/test/Interpreter/lto_static_lib.swift index ca908920036bc..6e74749de4197 100644 --- a/test/Interpreter/lto_static_lib.swift +++ b/test/Interpreter/lto_static_lib.swift @@ -1,7 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -parse-as-library -lto=llvm-thin %s -emit-bc -o %t/a.o %lto_flags -// RUN: ar -r -s %t/archive.a %t/a.o -// RUN: %target-clang %t/archive.a -isysroot %sdk -L%swift-lib-dir/swift/%target-sdk-name -flto -o %t/main +// RUN: %use_just_built_liblto ar -r -s %t/archive.a %t/a.o +// RUN: %use_just_built_liblto %target-clang %t/archive.a -isysroot %sdk -L%swift-lib-dir/swift/%target-sdk-name -flto -o %t/main // RUN: %target-run %t/main | %FileCheck %s // REQUIRES: executable_test diff --git a/test/Macros/macro_expand_variadic.swift b/test/Macros/macro_expand_variadic.swift index d87992964db6e..851d96f93fd55 100644 --- a/test/Macros/macro_expand_variadic.swift +++ b/test/Macros/macro_expand_variadic.swift @@ -2,18 +2,32 @@ // RUN: %empty-directory(%t) // RUN: %host-build-swift -swift-version 5 -emit-library -o %t/%target-library-name(MacroDefinition) -module-name=MacroDefinition %S/Inputs/variadic_macros.swift -g -no-toolchain-stdlib-rpath -// RUN: %target-typecheck-verify-swift -swift-version 5 -load-plugin-library %t/%target-library-name(MacroDefinition) -module-name MacroUser -DTEST_DIAGNOSTICS -swift-version 5 -// RUN: %target-build-swift -swift-version 5 -load-plugin-library %t/%target-library-name(MacroDefinition) %s -o %t/main -module-name MacroUser -swift-version 5 +// RUN: %target-typecheck-verify-swift -disable-availability-checking -swift-version 5 -load-plugin-library %t/%target-library-name(MacroDefinition) -module-name MacroUser -DTEST_DIAGNOSTICS -swift-version 5 +// RUN: %target-build-swift -Xfrontend -disable-availability-checking -swift-version 5 -load-plugin-library %t/%target-library-name(MacroDefinition) %s -o %t/main -module-name MacroUser -swift-version 5 // RUN: %target-codesign %t/main // RUN: %target-run %t/main | %FileCheck %s @freestanding(expression) macro print(_ value: repeat each Value) = #externalMacro(module: "MacroDefinition", type: "PrintMacro") +@freestanding(expression) macro Print(_ value: repeat each Value) = #externalMacro(module: "MacroDefinition", type: "PrintMacro") + +struct Print { + init() {} +} + +func testAmbiguity() { + let _ = Print() +} + func testIt() { // CHECK: hello // CHECK: [1, 2, 3, 4, 5] #print("hello", [1, 2, 3, 4, 5]) + // CHECK: hello + // CHECK: [1, 2, 3, 4, 5] + #print("hello", [1, 2, 3, 4, 5]) + // CHECK: world #print("world") } diff --git a/test/Macros/macro_mixedpluginpath.swift b/test/Macros/macro_mixedpluginpath.swift index 2ca1e9406c571..ea559a4db9732 100644 --- a/test/Macros/macro_mixedpluginpath.swift +++ b/test/Macros/macro_mixedpluginpath.swift @@ -25,14 +25,14 @@ //#-- Check '-load-plugin-library' takes precedence over '-plugin-path'. // RUN: %target-swift-frontend -typecheck -verify -swift-version 5 \ -// RUN: -plugin-path %t/plugins \ // RUN: -load-plugin-library %t/plugins_local/%target-library-name(MacroDefinition) \ +// RUN: -plugin-path %t/plugins \ // RUN: %t/src/test.swift -//#-- Same, but with different argument order. -// RUN: %target-swift-frontend -typecheck -verify -swift-version 5 \ -// RUN: -load-plugin-library %t/plugins_local/%target-library-name(MacroDefinition) \ +//#-- Different argument order changes the search order, hence fail. +// RUN: not %target-swift-frontend -typecheck -verify -swift-version 5 \ // RUN: -plugin-path %t/plugins \ +// RUN: -load-plugin-library %t/plugins_local/%target-library-name(MacroDefinition) \ // RUN: %t/src/test.swift //--- test.swift @@ -40,7 +40,7 @@ func foo() { let _: Int = #constInt - // If 'MacroDefinition.float.swift' is loaded, type checking this fails because it expands to '4.2' which is a float literal. + // If 'MacroDefinition.float.swift' (in '-pluing-path') is loaded, type checking this fails because it expands to '4.2' which is a float literal. } //--- MacroDefinition.float.swift diff --git a/test/Macros/macro_plugin_searchorder.swift b/test/Macros/macro_plugin_searchorder.swift index 786630a832eed..562144fa86b48 100644 --- a/test/Macros/macro_plugin_searchorder.swift +++ b/test/Macros/macro_plugin_searchorder.swift @@ -50,39 +50,42 @@ //#-- Expect -load-plugin-library // RUN: %target-build-swift %t/src/test.swift \ -// RUN: -o %t/main1 \ // RUN: -module-name test \ +// RUN: -load-plugin-library %t/lib/tmp/%target-library-name(MacroDefinition) \ // RUN: -plugin-path %t/lib/plugins \ // RUN: -external-plugin-path %t/external#%swift-plugin-server \ -// RUN: -load-plugin-library %t/lib/tmp/%target-library-name(MacroDefinition) \ -// RUN: -load-plugin-executable %t/libexec/MacroDefinitionPlugin#MacroDefinition +// RUN: -load-plugin-executable %t/libexec/MacroDefinitionPlugin#MacroDefinition \ +// RUN: -o %t/main1 // RUN: %target-codesign %t/main1 // RUN: %target-run %t/main1 | %FileCheck --check-prefix=CHECK_LOAD_PLUGIN_LIBRARY %s //#-- Expect -load-plugin-executable // RUN: %target-build-swift %t/src/test.swift \ -// RUN: -o %t/main2 \ // RUN: -module-name test \ +// RUN: -load-plugin-executable %t/libexec/MacroDefinitionPlugin#MacroDefinition \ // RUN: -plugin-path %t/lib/plugins \ // RUN: -external-plugin-path %t/external#%swift-plugin-server \ -// RUN: -load-plugin-executable %t/libexec/MacroDefinitionPlugin#MacroDefinition +// RUN: -o %t/main2 // RUN: %target-codesign %t/main2 // RUN: %target-run %t/main2 | %FileCheck --check-prefix=CHECK_LOAD_PLUGIN_EXECUTABLE %s //#-- Expect -plugin-path // RUN: %target-build-swift %t/src/test.swift \ -// RUN: -o %t/main3 \ // RUN: -module-name test \ // RUN: -plugin-path %t/lib/plugins \ -// RUN: -external-plugin-path %t/external#%swift-plugin-server +// RUN: -load-plugin-library %t/lib/tmp/%target-library-name(MacroDefinition) \ +// RUN: -external-plugin-path %t/external#%swift-plugin-server \ +// RUN: -o %t/main3 // RUN: %target-codesign %t/main3 // RUN: %target-run %t/main3 | %FileCheck --check-prefix=CHECK_PLUGIN_PATH %s //#-- Expect -external-plugin-path // RUN: %target-build-swift %t/src/test.swift \ -// RUN: -o %t/main4 \ // RUN: -module-name test \ -// RUN: -external-plugin-path %t/external#%swift-plugin-server +// RUN: -external-plugin-path %t/external#%swift-plugin-server \ +// RUN: -plugin-path %t/lib/plugins \ +// RUN: -load-plugin-executable %t/libexec/MacroDefinitionPlugin#MacroDefinition \ +// RUN: -o %t/main4 // RUN: %target-codesign %t/main4 // RUN: %target-run %t/main4 | %FileCheck --check-prefix=CHECK_EXTERNAL_PLUGIN_PATH %s diff --git a/test/Macros/serialize_plugin_search_paths.swift b/test/Macros/serialize_plugin_search_paths.swift index 95e901895e42d..ef9c5c8d7ee88 100644 --- a/test/Macros/serialize_plugin_search_paths.swift +++ b/test/Macros/serialize_plugin_search_paths.swift @@ -15,7 +15,6 @@ // CHECK: -plugin-path: {{.*}}plugins // CHECK: -plugin-path: {{.*}}plugins // CHECK: -plugin-path: {{.*}}plugins -// CHECK: -plugin-path: {{.*}}plugins // CHECK: -external-plugin-path: {{.*}}plugins#{{.*}}swift-plugin-server // CHECK: -load-plugin-library: {{.*}}MacroDefinition.{{dylib|so|dll}} // CHECK: -load-plugin-executable: {{.*}}mock-plugin#TestPlugin diff --git a/test/ModuleInterface/Observable.swift b/test/ModuleInterface/Observable.swift index 181a4325ef231..e510c8ffab3d1 100644 --- a/test/ModuleInterface/Observable.swift +++ b/test/ModuleInterface/Observable.swift @@ -3,6 +3,9 @@ // RUN: %target-swift-typecheck-module-from-interface(%t/Library.swiftinterface) -module-name Library -disable-availability-checking // RUN: %FileCheck %s < %t/Library.swiftinterface +// Asserts is required for '-enable-experimental-feature InitAccessors'. +// REQUIRES: asserts + // REQUIRES: swift_swift_parser // REQUIRES: observation diff --git a/test/ModuleInterface/enums-layout.swift b/test/ModuleInterface/enums-layout.swift index 238217b3ec002..2b393ea2ad634 100644 --- a/test/ModuleInterface/enums-layout.swift +++ b/test/ModuleInterface/enums-layout.swift @@ -2,14 +2,16 @@ // RUN: %target-build-swift -emit-module-interface-path %t/Lib.swiftinterface -emit-module -o %t/unused.swiftmodule -enable-library-evolution -Xfrontend -enable-objc-interop -Xfrontend -disable-objc-attr-requires-foundation-module -swift-version 5 %S/Inputs/enums-layout-helper.swift -module-name Lib // RUN: %FileCheck -check-prefix CHECK -check-prefix CHECK-MULTI-FILE %S/Inputs/enums-layout-helper.swift < %t/Lib.swiftinterface // RUN: %target-swift-frontend -enable-objc-interop -compile-module-from-interface %t/Lib.swiftinterface -o %t/compiled-from-interface.swiftmodule -module-name Lib -// RUN: %target-swift-frontend -enable-objc-interop -O -emit-ir -primary-file %s -I %t -Xllvm -swiftmergefunc-threshold=0 | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -O -emit-ir -primary-file %s -I %t -Xllvm -swiftmergefunc-threshold=0 | %FileCheck %s +// RUN: %target-swift-frontend -enable-objc-interop -O -emit-ir -primary-file %s -I %t -Xllvm -swiftmergefunc-threshold=0 // Try again using a single-frontend build. // RUN: %empty-directory(%t) // RUN: %target-build-swift -whole-module-optimization -emit-module-interface-path %t/Lib.swiftinterface -emit-module -o %t/unused.swiftmodule -enable-library-evolution -Xfrontend -enable-objc-interop -Xfrontend -disable-objc-attr-requires-foundation-module -swift-version 5 %S/Inputs/enums-layout-helper.swift -module-name Lib // RUN: %FileCheck -check-prefix CHECK -check-prefix CHECK-SINGLE-FRONTEND %S/Inputs/enums-layout-helper.swift < %t/Lib.swiftinterface // RUN: %target-swift-frontend -enable-objc-interop -compile-module-from-interface %t/Lib.swiftinterface -o %t/compiled-from-interface.swiftmodule -module-name Lib -// RUN: %target-swift-frontend -enable-objc-interop -O -emit-ir -primary-file %s -I %t -Xllvm -swiftmergefunc-threshold=0 | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -enable-objc-interop -O -emit-ir -primary-file %s -I %t -Xllvm -swiftmergefunc-threshold=0 | %FileCheck %s +// RUN: %target-swift-frontend -enable-objc-interop -O -emit-ir -primary-file %s -I %t -Xllvm -swiftmergefunc-threshold=0 import Lib diff --git a/test/ModuleInterface/private-stored-member-type-layout.swift b/test/ModuleInterface/private-stored-member-type-layout.swift index 204ff0e9cd0f1..9b6c2156540b9 100644 --- a/test/ModuleInterface/private-stored-member-type-layout.swift +++ b/test/ModuleInterface/private-stored-member-type-layout.swift @@ -3,16 +3,19 @@ // Check that importing this module creates the right types // RUN: %target-swift-frontend -emit-module-interface-path %t/private-stored-members.swiftinterface -module-name PrivateStoredMembers -emit-module -o %t/PrivateStoredMembers.swiftmodule %S/private-stored-members.swift -// RUN: %target-swift-frontend -emit-ir %s -I %t 2>&1 -DSHOULD_IMPORT | %FileCheck %s --check-prefix CHECK-EXEC --check-prefix CHECK +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s -I %t 2>&1 -DSHOULD_IMPORT | %FileCheck %s --check-prefix CHECK-EXEC --check-prefix CHECK +// RUN: %target-swift-frontend -emit-ir %s -I %t 2>&1 -DSHOULD_IMPORT // Check that the types are also correct when importing a module created from an interface // RUN: %target-swift-frontend -emit-module -o %t/PrivateStoredMembers.swiftmodule -module-name PrivateStoredMembers %t/private-stored-members.swiftinterface -disable-objc-attr-requires-foundation-module -// RUN: %target-swift-frontend -emit-ir %s -I %t 2>&1 -DSHOULD_IMPORT | %FileCheck %s --check-prefix CHECK-EXEC --check-prefix CHECK +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %s -I %t 2>&1 -DSHOULD_IMPORT | %FileCheck %s --check-prefix CHECK-EXEC --check-prefix CHECK +// RUN: %target-swift-frontend -emit-ir %s -I %t 2>&1 -DSHOULD_IMPORT // Check the types generated when the source file is the primary file, and ensure they're the same layout. -// RUN: %target-swift-frontend -emit-ir %S/private-stored-members.swift %s 2>&1 -module-name main | %FileCheck %s --check-prefix CHECK-MAIN --check-prefix CHECK-EXEC +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir %S/private-stored-members.swift %s 2>&1 -module-name main | %FileCheck %s --check-prefix CHECK-MAIN --check-prefix CHECK-EXEC +// RUN: %target-swift-frontend -emit-ir %S/private-stored-members.swift %s 2>&1 -module-name main // These two appear out-of-order between run lines diff --git a/test/SIL/Serialization/specializer_can_deserialize.swift b/test/SIL/Serialization/specializer_can_deserialize.swift index bd60c0f440c40..c37e86c8babd4 100644 --- a/test/SIL/Serialization/specializer_can_deserialize.swift +++ b/test/SIL/Serialization/specializer_can_deserialize.swift @@ -8,10 +8,10 @@ import Swift // CHECK-LABEL: sil {{.*}}@main // CHECK: bb0({{.*}}): -// CHECK: function_ref @$ss9ContainerVAByxGycfCBi32__Tg5{{.*}} +// CHECK: function_ref @$ss9ContainerVAByxGycfCBi32__Tgm5{{.*}} // CHECK: function_ref @$ss9ContainerV11doSomethingyyFBi32__Tg5{{.*}} -// CHECK-LABEL: sil shared [noinline] @$ss9ContainerVAByxGycfCBi32__Tg5Tf4d_n +// CHECK-LABEL: sil shared [noinline] @$ss9ContainerVAByxGycfCBi32__Tgm5 // CHECK-LABEL: sil shared [noinline] @$ss9ContainerV11doSomethingyyFBi32__Tg5Tf4d_n diff --git a/test/SILGen/variadic-generic-closures.swift b/test/SILGen/variadic-generic-closures.swift index 668975d54936d..4739add373ad4 100644 --- a/test/SILGen/variadic-generic-closures.swift +++ b/test/SILGen/variadic-generic-closures.swift @@ -12,3 +12,12 @@ public struct UsesG { public init(builder: (repeat G) -> E) {} } UsesG { a, b, c in 0 } + +// rdar://107367324 +func returnVariadicClosure(f: @escaping (repeat each T) -> R) -> (repeat each T) -> R { + { (t: repeat each T) -> R in + let tuple = (repeat each t) + print(tuple) + return f(repeat each t) + } +} diff --git a/test/SILGen/variadic-generic-reabstraction.swift b/test/SILGen/variadic-generic-reabstraction.swift index 33a883c03294d..4c9532cc4f2e1 100644 --- a/test/SILGen/variadic-generic-reabstraction.swift +++ b/test/SILGen/variadic-generic-reabstraction.swift @@ -108,3 +108,52 @@ func passConcreteClosureToVariadic2(fn: (Int, String) -> Int, x: Int) { takesVariadicFunction {y in fn(x, y)} } */ + +// rdar://109843932 +// Test that the path where we emit closures naturally at a +// particular abstraction level correctly handles variadic +// expansion in the result type. +func takeClosureWithVariadicResult(_: (repeat each Argument) -> (repeat each Result)) {} + +// CHECK-LABEL: sil {{.*}}@$s4main30testResultReabstractedEmissionyyFSb_SitSi_SbtXEfU_ : +// CHECK-SAME: $@convention(thin) @substituted (@pack_guaranteed Pack{repeat each τ_0_0}) -> @pack_out Pack{repeat each τ_0_1} for +// CHECK: bb0(%0 : $*Pack{Bool, Int}, %1 : $*Pack{Int, Bool}): +// CHECK-NEXT: [[ARG_INDEX_0:%.*]] = scalar_pack_index 0 of $Pack{Int, Bool} +// CHECK-NEXT: [[ARG_ADDR_0:%.*]] = pack_element_get [[ARG_INDEX_0]] of %1 : $*Pack{Int, Bool} as $*Int +// CHECK-NEXT: [[ARG_0:%.*]] = load [trivial] [[ARG_ADDR_0]] : $*Int +// CHECK-NEXT: debug_value [[ARG_0]] : +// CHECK-NEXT: [[ARG_INDEX_1:%.*]] = scalar_pack_index 1 of $Pack{Int, Bool} +// CHECK-NEXT: [[ARG_ADDR_1:%.*]] = pack_element_get [[ARG_INDEX_1]] of %1 : $*Pack{Int, Bool} as $*Bool +// CHECK-NEXT: [[ARG_1:%.*]] = load [trivial] [[ARG_ADDR_1]] : $*Bool +// CHECK-NEXT: debug_value [[ARG_1]] : +// CHECK-NEXT: [[RET_INDEX_0:%.*]] = scalar_pack_index 0 of $Pack{Bool, Int} +// CHECK-NEXT: [[RET_ADDR_0:%.*]] = pack_element_get [[RET_INDEX_0]] of %0 : $*Pack{Bool, Int} as $*Bool +// CHECK-NEXT: [[RET_INDEX_1:%.*]] = scalar_pack_index 1 of $Pack{Bool, Int} +// CHECK-NEXT: [[RET_ADDR_1:%.*]] = pack_element_get [[RET_INDEX_1]] of %0 : $*Pack{Bool, Int} as $*Int +// CHECK-NEXT: store [[ARG_1]] to [trivial] [[RET_ADDR_0]] : $*Bool +// CHECK-NEXT: store [[ARG_0]] to [trivial] [[RET_ADDR_1]] : $*Int +func testResultReabstractedEmission() { + takeClosureWithVariadicResult { + (a: Int, b: Bool) -> (Bool, Int) in (b, a) + } +} + +// CHECK-LABEL: sil {{.*}}@$s4main40testResultReabstractedEmission_vanishingyyFSbSi_SbtXEfU_ : +// CHECK-SAME: $@convention(thin) @substituted (@pack_guaranteed Pack{repeat each τ_0_0}) -> @pack_out Pack{repeat each τ_0_1} for +// CHECK: bb0(%0 : $*Pack{Bool}, %1 : $*Pack{Int, Bool}): +// CHECK-NEXT: [[ARG_INDEX_0:%.*]] = scalar_pack_index 0 of $Pack{Int, Bool} +// CHECK-NEXT: [[ARG_ADDR_0:%.*]] = pack_element_get [[ARG_INDEX_0]] of %1 : $*Pack{Int, Bool} as $*Int +// CHECK-NEXT: [[ARG_0:%.*]] = load [trivial] [[ARG_ADDR_0]] : $*Int +// CHECK-NEXT: debug_value [[ARG_0]] : +// CHECK-NEXT: [[ARG_INDEX_1:%.*]] = scalar_pack_index 1 of $Pack{Int, Bool} +// CHECK-NEXT: [[ARG_ADDR_1:%.*]] = pack_element_get [[ARG_INDEX_1]] of %1 : $*Pack{Int, Bool} as $*Bool +// CHECK-NEXT: [[ARG_1:%.*]] = load [trivial] [[ARG_ADDR_1]] : $*Bool +// CHECK-NEXT: debug_value [[ARG_1]] : +// CHECK-NEXT: [[RET_INDEX_0:%.*]] = scalar_pack_index 0 of $Pack{Bool} +// CHECK-NEXT: [[RET_ADDR_0:%.*]] = pack_element_get [[RET_INDEX_0]] of %0 : $*Pack{Bool} as $*Bool +// CHECK-NEXT: store [[ARG_1]] to [trivial] [[RET_ADDR_0]] : $*Bool +func testResultReabstractedEmission_vanishing() { + takeClosureWithVariadicResult { + (a: Int, b: Bool) -> Bool in b + } +} diff --git a/test/SILGen/variadic-generic-tuples.swift b/test/SILGen/variadic-generic-tuples.swift index b1c4e3c8d3a64..c5d97cfd0713e 100644 --- a/test/SILGen/variadic-generic-tuples.swift +++ b/test/SILGen/variadic-generic-tuples.swift @@ -331,3 +331,39 @@ func testFancyTuple_pack(values: repeat each T) { // rdar://107664237 func f() -> (repeat Array) {} + +// rdar://109911655 +struct GenericButLoadable { } +struct StructOfLoadableTuple { + let elements: (repeat GenericButLoadable) +} +// Force the emission of the memberwise initializer. +func testStructOfLoadableTuple() -> StructOfLoadableTuple { + StructOfLoadableTuple(elements: (GenericButLoadable())) +} + +// The memberwise initializer. +// CHECK-LABEL: sil {{.*}}@$s4main21StructOfLoadableTupleV8elementsACyxxQp_QPGAA010GenericButD0VyxxGxQp_t_tcfC : +// CHECK: bb0(%0 : $*StructOfLoadableTuple, %1 : $*Pack{repeat GenericButLoadable}, %2 : $@thin StructOfLoadableTuple.Type): +// CHECK-NEXT: [[TUPLE:%.*]] = alloc_stack $(repeat GenericButLoadable) +// CHECK: [[INDEX:%.*]] = dynamic_pack_index {{.*}} of $Pack{repeat GenericButLoadable} +// CHECK-NEXT: open_pack_element [[INDEX]] of at , shape $each S, uuid [[UUID:".*"]] +// CHECK-NEXT: [[TUPLE_ELT_ADDR:%.*]] = tuple_pack_element_addr [[INDEX]] of [[TUPLE]] : $*(repeat GenericButLoadable) as $*GenericButLoadable<@pack_element([[UUID]]) each S, @pack_element([[UUID]]) each S> +// CHECK-NEXT: [[PACK_ELT_ADDR:%.*]] = pack_element_get [[INDEX]] of %1 : $*Pack{repeat GenericButLoadable} as $*GenericButLoadable<@pack_element([[UUID]]) each S, @pack_element([[UUID]]) each S> +// CHECK-NEXT: [[PACK_ELT:%.*]] = load [trivial] [[PACK_ELT_ADDR]] : +// CHECK-NEXT: store [[PACK_ELT]] to [trivial] [[TUPLE_ELT_ADDR]] : + +// rdar://107290521 +// The verifier had some home-grown type-lowering logic that didn't +// know about pack expansions. +// CHECK-LABEL: sil {{.*}}@$s4main22testExistentialErasureyyxxQpRvzlF1gL_yyqd__qd__QpRvzRvd__r__lF : +// CHECK: [[T0:%.*]] = init_existential_addr {{.*}} : $*Any, $(repeat each T.Type) +// CHECK: tuple_pack_element_addr {{.*}} of [[T0]] : $*(repeat @thick each T.Type) as $*@thick (@pack_element("{{.*}}") each T).Type +func testExistentialErasure(_: repeat each T) { + func g(_: repeat each U) { + print((repeat (each T).self)) + print((repeat (each U).self)) + } + + g(1, "hi", false) +} diff --git a/test/SILOptimizer/character_literals.swift b/test/SILOptimizer/character_literals.swift index 5dc3e2ec9d064..d921d60cc8968 100644 --- a/test/SILOptimizer/character_literals.swift +++ b/test/SILOptimizer/character_literals.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -parse-as-library -O -target-cpu core2 -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-as-library -O -target-cpu core2 -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -parse-as-library -O -target-cpu core2 -emit-ir %s // REQUIRES: swift_stdlib_no_asserts,optimized_stdlib,CPU=x86_64 // REQUIRES: swift_in_compiler diff --git a/test/SILOptimizer/concat_string_literals.64.swift b/test/SILOptimizer/concat_string_literals.64.swift index 281400145165f..3e8167b5b97b4 100644 --- a/test/SILOptimizer/concat_string_literals.64.swift +++ b/test/SILOptimizer/concat_string_literals.64.swift @@ -1,5 +1,7 @@ -// RUN: %target-swift-frontend -O -emit-ir %s | %FileCheck %s -// RUN: %target-swift-frontend -Osize -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -O -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -Osize -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -O -emit-ir %s +// RUN: %target-swift-frontend -Osize -emit-ir %s // REQUIRES: swift_stdlib_no_asserts,optimized_stdlib // REQUIRES: swift_in_compiler diff --git a/test/SILOptimizer/devirt_witness_method_empty_conformance.swift b/test/SILOptimizer/devirt_witness_method_empty_conformance.swift index 226c367b41be3..5b39422e9ef69 100644 --- a/test/SILOptimizer/devirt_witness_method_empty_conformance.swift +++ b/test/SILOptimizer/devirt_witness_method_empty_conformance.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -O -emit-ir -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -O -emit-ir -primary-file %s | %FileCheck %s +// RUN: %target-swift-frontend -O -emit-ir -primary-file %s public struct PublicStruct { } diff --git a/test/SILOptimizer/eager_specialize.sil b/test/SILOptimizer/eager_specialize.sil index e3de7210db755..a977cb3789f87 100644 --- a/test/SILOptimizer/eager_specialize.sil +++ b/test/SILOptimizer/eager_specialize.sil @@ -698,35 +698,33 @@ bb0(%0 : $*Self, %1 : $*Self, %2 : $@thick Self.Type): // Check that a specialization for _Trivial(32) uses direct loads and stores // instead of value witness functions to load and store the value of a generic type. -// CHECK-IRGEN-LABEL: define linkonce_odr hidden swiftcc void @"$s16eager_specialize18copyValueAndReturn_1sxx_xztlFxxxRlze31_lIetilr_Tp5"(i32* noalias nocapture sret({{.*}}) %0, i32* noalias nocapture dereferenceable(4) %1, i32* nocapture dereferenceable(4) %2, %swift.type* %S +// CHECK-IRGEN-LABEL: define linkonce_odr hidden swiftcc void @"$s16eager_specialize18copyValueAndReturn_1sxx_xztlFxxxRlze31_lIetilr_Tp5"(ptr noalias nocapture sret(i32) %0, ptr noalias nocapture dereferenceable(4) %1, ptr nocapture dereferenceable(4) %2, ptr %S // CHECK-IRGEN: entry: -// CHECK-IRGEN: %3 = load i32, i32* %2 -// CHECK-IRGEN-NEXT: store i32 %3, i32* %0 +// CHECK-IRGEN: %3 = load i32, ptr %2 +// CHECK-IRGEN-NEXT: store i32 %3, ptr %0 // CHECK-IRGEN-NEXT: ret void // CHECK-IRGEN-NEXT:} // Check that a specialization for _Trivial(64) uses direct loads and stores // instead of value witness functions to load and store the value of a generic type. -// CHECK-IRGEN-LABEL: define linkonce_odr hidden swiftcc void @"$s16eager_specialize18copyValueAndReturn_1sxx_xztlFxxxRlze63_lIetilr_Tp5"(i64* noalias nocapture sret({{.*}}) %0, i64* noalias nocapture dereferenceable(8) %1, i64* nocapture dereferenceable(8) %2, %swift.type* %S +// CHECK-IRGEN-LABEL: define linkonce_odr hidden swiftcc void @"$s16eager_specialize18copyValueAndReturn_1sxx_xztlFxxxRlze63_lIetilr_Tp5"(ptr noalias nocapture sret(i64) %0, ptr noalias nocapture dereferenceable(8) %1, ptr nocapture dereferenceable(8) %2, ptr %S // CHECK-IRGEN: entry: -// CHECK-IRGEN: %3 = load i64, i64* %2 -// CHECK-IRGEN-NEXT: store i64 %3, i64* %0 +// CHECK-IRGEN: %3 = load i64, ptr %2 +// CHECK-IRGEN-NEXT: store i64 %3, ptr %0 // CHECK-IRGEN-NEXT: ret void // CHECK-IRGEN-NEXT: } // Check that a specialization for _Trivial does not call the 'destroy' value witness, // because it is known that the object is Trivial, i.e. contains no references. -// CHECK-IRGEN-LABEL: define linkonce_odr hidden swiftcc void @"$s16eager_specialize19copyValueAndReturn2_1sxx_xztlFxxxRlzTlIetilr_Tp5"(%swift.opaque* noalias nocapture sret({{.*}}) %0, %swift.opaque* noalias nocapture %1, %swift.opaque* nocapture %2, %swift.type* %S +// CHECK-IRGEN-LABEL: define linkonce_odr hidden swiftcc void @"$s16eager_specialize19copyValueAndReturn2_1sxx_xztlFxxxRlzTlIetilr_Tp5"(ptr noalias nocapture sret(%swift.opaque) %0, ptr noalias nocapture %1, ptr nocapture %2, ptr %S // CHECK-IRGEN-NEXT: entry: -// CHECK-IRGEN: %3 = bitcast %swift.type* %S to i8*** -// CHECK-IRGEN-NEXT: %4 = getelementptr inbounds i8**, i8*** %3, i{{.*}} -1 -// CHECK-IRGEN-NEXT: %S.valueWitnesses = load i8**, i8*** %4 -// CHECK-IRGEN-NEXT: %5 = getelementptr inbounds i8*, i8** %S.valueWitnesses -// CHECK-IRGEN-NEXT: %6 = load i8*, i8** %5 -// CHECK-IRGEN-NEXT: %initializeWithCopy = {{.*}} -// CHECK-IRGEN-arm64e-NEXT: ptrtoint i8** %5 to i64 +// CHECK-IRGEN: %3 = getelementptr inbounds ptr, ptr %S, i{{.*}} -1 +// CHECK-IRGEN-NEXT: %S.valueWitnesses = load ptr, ptr %3 +// CHECK-IRGEN-NEXT: %4 = getelementptr inbounds ptr, ptr %S.valueWitnesses +// CHECK-IRGEN-NEXT: %5 = load ptr, ptr %4 +// CHECK-IRGEN-arm64e-NEXT: ptrtoint ptr %4 to i64 // CHECK-IRGEN-arm64e-NEXT: call i64 @llvm.ptrauth.blend.i64 -// CHECK-IRGEN-NEXT: call {{.*}} %initializeWithCopy +// CHECK-IRGEN-NEXT: call {{.*}} %5 // CHECK-IRGEN-NEXT: ret void // CHECK-IRGEN-NEXT: } diff --git a/test/SILOptimizer/eager_specialize_ossa.sil b/test/SILOptimizer/eager_specialize_ossa.sil index b1eb4b5c79661..c1aa9af2e9c8d 100644 --- a/test/SILOptimizer/eager_specialize_ossa.sil +++ b/test/SILOptimizer/eager_specialize_ossa.sil @@ -886,35 +886,33 @@ bb0(%0 : $*Self, %1 : $*Self, %2 : $@thick Self.Type): // Check that a specialization for _Trivial(32) uses direct loads and stores // instead of value witness functions to load and store the value of a generic type. -// CHECK-IRGEN-LABEL: define linkonce_odr hidden swiftcc void @"$s16eager_specialize18copyValueAndReturn_1sxx_xztlFxxxRlze31_lIetilr_Tp5"(i32* noalias nocapture sret(i32) %0, i32* noalias nocapture dereferenceable(4) %1, i32* nocapture dereferenceable(4) %2, %swift.type* %S +// CHECK-IRGEN-LABEL: define linkonce_odr hidden swiftcc void @"$s16eager_specialize18copyValueAndReturn_1sxx_xztlFxxxRlze31_lIetilr_Tp5"(ptr noalias nocapture sret(i32) %0, ptr noalias nocapture dereferenceable(4) %1, ptr nocapture dereferenceable(4) %2, ptr %S // CHECK-IRGEN: entry: -// CHECK-IRGEN: %3 = load i32, i32* %2 -// CHECK-IRGEN-NEXT: store i32 %3, i32* %0 +// CHECK-IRGEN: %3 = load i32, ptr %2 +// CHECK-IRGEN-NEXT: store i32 %3, ptr %0 // CHECK-IRGEN-NEXT: ret void // CHECK-IRGEN-NEXT:} // Check that a specialization for _Trivial(64) uses direct loads and stores // instead of value witness functions to load and store the value of a generic type. -// CHECK-IRGEN-LABEL: define linkonce_odr hidden swiftcc void @"$s16eager_specialize18copyValueAndReturn_1sxx_xztlFxxxRlze63_lIetilr_Tp5"(i64* noalias nocapture sret(i64) %0, i64* noalias nocapture dereferenceable(8) %1, i64* nocapture dereferenceable(8) %2, %swift.type* %S +// CHECK-IRGEN-LABEL: define linkonce_odr hidden swiftcc void @"$s16eager_specialize18copyValueAndReturn_1sxx_xztlFxxxRlze63_lIetilr_Tp5"(ptr noalias nocapture sret(i64) %0, ptr noalias nocapture dereferenceable(8) %1, ptr nocapture dereferenceable(8) %2, ptr %S // CHECK-IRGEN: entry: -// CHECK-IRGEN: %3 = load i64, i64* %2 -// CHECK-IRGEN-NEXT: store i64 %3, i64* %0 +// CHECK-IRGEN: %3 = load i64, ptr %2 +// CHECK-IRGEN-NEXT: store i64 %3, ptr %0 // CHECK-IRGEN-NEXT: ret void // CHECK-IRGEN-NEXT: } // Check that a specialization for _Trivial does not call the 'destroy' value witness, // because it is known that the object is Trivial, i.e. contains no references. -// CHECK-IRGEN-LABEL: define linkonce_odr hidden swiftcc void @"$s16eager_specialize19copyValueAndReturn2_1sxx_xztlFxxxRlzTlIetilr_Tp5"(%swift.opaque* noalias nocapture sret(%swift.opaque) %0, %swift.opaque* noalias nocapture %1, %swift.opaque* nocapture %2, %swift.type* %S +// CHECK-IRGEN-LABEL: define linkonce_odr hidden swiftcc void @"$s16eager_specialize19copyValueAndReturn2_1sxx_xztlFxxxRlzTlIetilr_Tp5"(ptr noalias nocapture sret(%swift.opaque) %0, ptr noalias nocapture %1, ptr nocapture %2, ptr %S // CHECK-IRGEN-NEXT: entry: -// CHECK-IRGEN: %3 = bitcast %swift.type* %S to i8*** -// CHECK-IRGEN-NEXT: %4 = getelementptr inbounds i8**, i8*** %3, i{{.*}} -1 -// CHECK-IRGEN-NEXT: %S.valueWitnesses = load i8**, i8*** %4 -// CHECK-IRGEN-NEXT: %5 = getelementptr inbounds i8*, i8** %S.valueWitnesses -// CHECK-IRGEN-NEXT: %6 = load i8*, i8** %5 -// CHECK-IRGEN-NEXT: %initializeWithCopy = {{.*}} -// CHECK-IRGEN-arm64e-NEXT: ptrtoint i8** %5 to i64 +// CHECK-IRGEN: %3 = getelementptr inbounds ptr, ptr %S, i{{.*}} -1 +// CHECK-IRGEN-NEXT: %S.valueWitnesses = load ptr, ptr %3 +// CHECK-IRGEN-NEXT: %4 = getelementptr inbounds ptr, ptr %S.valueWitnesses +// CHECK-IRGEN-NEXT: %5 = load ptr, ptr %4 +// CHECK-IRGEN-arm64e-NEXT: ptrtoint ptr %4 to i64 // CHECK-IRGEN-arm64e-NEXT: call i64 @llvm.ptrauth.blend.i64 -// CHECK-IRGEN-NEXT: call {{.*}} %initializeWithCopy +// CHECK-IRGEN-NEXT: call {{.*}} %5 // CHECK-IRGEN-NEXT: ret void // CHECK-IRGEN-NEXT: } diff --git a/test/SILOptimizer/existential_metatype.swift b/test/SILOptimizer/existential_metatype.swift index bd599b48e753e..b6dcdb4f7bbe0 100644 --- a/test/SILOptimizer/existential_metatype.swift +++ b/test/SILOptimizer/existential_metatype.swift @@ -3,12 +3,12 @@ protocol SomeP {} public enum SpecialEnum : SomeP {} -// CHECK-LABEL: sil shared [noinline] @$s20existential_metatype17checkProtocolType0aE0Sbxm_tAA5SomePRzlFAA11SpecialEnumO_Tg5Tf4d_n : $@convention(thin) () -> Bool { +// CHECK-LABEL: sil shared [noinline] @$s20existential_metatype17checkProtocolType0aE0Sbxm_tAA5SomePRzlFAA11SpecialEnumO_Tgm5 : $@convention(thin) () -> Bool { // CHECK: bb0: // CHECK-NEXT: %0 = integer_literal $Builtin.Int1, -1 // CHECK-NEXT: %1 = struct $Bool (%0 : $Builtin.Int1) // CHECK-NEXT: return %1 : $Bool -// CHECK-LABEL: } // end sil function '$s20existential_metatype17checkProtocolType0aE0Sbxm_tAA5SomePRzlFAA11SpecialEnumO_Tg5Tf4d_n' +// CHECK-LABEL: } // end sil function '$s20existential_metatype17checkProtocolType0aE0Sbxm_tAA5SomePRzlFAA11SpecialEnumO_Tgm5' @inline(never) func checkProtocolType

(existentialType: P.Type) -> Bool { return existentialType == SpecialEnum.self diff --git a/test/SILOptimizer/llvm_arc.sil b/test/SILOptimizer/llvm_arc.sil index ec80eb1eec367..7cb12447dc894 100644 --- a/test/SILOptimizer/llvm_arc.sil +++ b/test/SILOptimizer/llvm_arc.sil @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -O -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -O -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -O -emit-ir %s // // Test LLVM ARC Optimization diff --git a/test/SILOptimizer/performance-annotations.swift b/test/SILOptimizer/performance-annotations.swift index 6954d4a09ca79..d7eb09eecd7a8 100644 --- a/test/SILOptimizer/performance-annotations.swift +++ b/test/SILOptimizer/performance-annotations.swift @@ -272,3 +272,33 @@ func testGlobalsWithConversion() -> UInt32 { return globalB } +public struct X: Collection { + public func index(after i: Int) -> Int { + return i + 1 + } + public subscript(position: Int) -> Int { + get { + return 0 + } + } + public var startIndex: Int = 0 + public var endIndex: Int = 1 + public typealias Index = Int +} + +extension Collection where Element: Comparable { + public func testSorted() -> Int { + return testSorted(by: <) + } + public func testSorted(by areInIncreasingOrder: (Element, Element) -> Bool) -> Int { + let x = 0 + _ = areInIncreasingOrder(self.first!, self.first!) + return x + } +} +@_noLocks +public func testCollectionSort(a: X) -> Int { + _ = a.testSorted() + return 0 +} + diff --git a/test/SILOptimizer/set.swift b/test/SILOptimizer/set.swift index b69048e8d04dc..ff9b345c373ad 100644 --- a/test/SILOptimizer/set.swift +++ b/test/SILOptimizer/set.swift @@ -23,7 +23,7 @@ public func createEmptySetWithInitializer() -> Set { // CHECK-LABEL: sil {{.*}}@$s4test17createNonEmptySetShySiGyF // CHECK: global_value -// CHECK: [[F:%[0-9]+]] = function_ref @$sSh21_nonEmptyArrayLiteralShyxGSayxG_tcfCSi_Tg5 +// CHECK: [[F:%[0-9]+]] = function_ref @$sSh21_nonEmptyArrayLiteralShyxGSayxG_tcfCSi_Tgm5 // CHECK: apply [[F]] // CHECK: } // end sil function '$s4test17createNonEmptySetShySiGyF' public func createNonEmptySet() -> Set { diff --git a/test/SILOptimizer/specialize.sil b/test/SILOptimizer/specialize.sil index ce616d250728d..ae848e7935408 100644 --- a/test/SILOptimizer/specialize.sil +++ b/test/SILOptimizer/specialize.sil @@ -9,7 +9,7 @@ import Swift // CHECK-LABEL: sil @exp1 : $@convention(thin) () -> () { // CHECK-NOT: apply // Call of specialized initializer: -// CHECK: [[CTOR:%[0-9]+]] = function_ref @$s8XXX_inits5Int32V_Tg5 +// CHECK: [[CTOR:%[0-9]+]] = function_ref @$s8XXX_inits5Int32V_Tgm5 // CHECK: apply [[CTOR]] // CHECK: [[ACCEPTS_INT:%[0-9]+]] = function_ref @acceptsInt // Call of specialized XXX_foo: @@ -35,7 +35,7 @@ import Swift // YAML: Line: 73 // YAML: Column: 17 // YAML-NEXT: - String: ' with type ' -// YAML-NEXT: - FuncType: '(Int32, @thin XXX.Type) -> XXX' +// YAML-NEXT: - FuncType: '(Int32) -> XXX' // YAML-NEXT: ... // YAML-NEXT: --- !Passed // YAML-NEXT: Pass: sil-generic-specializer @@ -556,7 +556,7 @@ bb0: // test_bind (Builtin.RawPointer, A.Type) -> () // Check that this is specialized as T=Int. -// CHECK-LABEL: sil shared @$s9test_bindSi_Tg5 : $@convention(thin) (Builtin.RawPointer, @thick Int.Type) -> () +// CHECK-LABEL: sil shared @$s9test_bindSi_Tgm5 : $@convention(thin) (Builtin.RawPointer) -> () // CHECK: bind_memory %0 : $Builtin.RawPointer, {{%.*}} : $Builtin.Word to $*Int // CHECK: return sil hidden @test_bind : $@convention(thin) (Builtin.RawPointer, @thick T.Type) -> () { @@ -701,7 +701,7 @@ bb0(%0 : $*T, %1 :$*T): } // This should not assert. -// CHECK-LABEL: sil shared @$s26specialize_no_return_applys5NeverO_Tg5 +// CHECK-LABEL: sil shared @$s26specialize_no_return_applys5NeverO_Tgm5 // CHECK: apply // CHECK-NEXT: unreachable diff --git a/test/SILOptimizer/specialize_chain.swift b/test/SILOptimizer/specialize_chain.swift index 4616ee73fa4d2..2b16ec0721a4f 100644 --- a/test/SILOptimizer/specialize_chain.swift +++ b/test/SILOptimizer/specialize_chain.swift @@ -45,6 +45,6 @@ func exp1() { //CHECK: sil shared [noinline] @$s16specialize_chain3YYYV4AAA2{{[_0-9a-zA-Z]*}}FSi_Tg5 //CHECK: sil shared [noinline] @$s16specialize_chain3YYYV4AAA1{{[_0-9a-zA-Z]*}}FSi_Tg5 //CHECK: exp1 -//CHECK: function_ref @$s16specialize_chain3YYYV{{[_0-9a-zA-Z]*}}fCSi_Tg5 +//CHECK: function_ref @$s16specialize_chain3YYYV{{[_0-9a-zA-Z]*}}fCSi_Tgm5 //CHECK: function_ref @$s16specialize_chain3YYYV4AAA9{{[_0-9a-zA-Z]*}}FSi_Tg5 //CHECK: return diff --git a/test/SILOptimizer/specialize_ossa.sil b/test/SILOptimizer/specialize_ossa.sil index 38ae45baed1d8..b7f59edffac5d 100644 --- a/test/SILOptimizer/specialize_ossa.sil +++ b/test/SILOptimizer/specialize_ossa.sil @@ -6,6 +6,7 @@ import Builtin import Swift class Klass {} +class GenericKlass {} sil [ossa] [transparent] @ossaTransparentCallee : $@convention(thin) (@in T) -> () { bb0(%0 : $*T): @@ -43,7 +44,7 @@ bb0(%0 : $Builtin.NativeObject): // CHECK-LABEL: sil [ossa] @exp1 : $@convention(thin) () -> () { // CHECK-NOT: apply // Call of specialized initializer: -// CHECK: [[CTOR:%[0-9]+]] = function_ref @$s8XXX_inits5Int32V_Tg5 +// CHECK: [[CTOR:%[0-9]+]] = function_ref @$s8XXX_inits5Int32V_Tgm5 // CHECK: apply [[CTOR]] // CHECK: [[ACCEPTS_INT:%[0-9]+]] = function_ref @acceptsInt // Call of specialized XXX_foo: @@ -634,7 +635,7 @@ bb0: // test_bind (Builtin.RawPointer, A.Type) -> () // Check that this is specialized as T=Int. -// CHECK-LABEL: sil shared [ossa] @$s9test_bindSi_Tg5 : $@convention(thin) (Builtin.RawPointer, @thick Int.Type) -> () +// CHECK-LABEL: sil shared [ossa] @$s9test_bindSi_Tgm5 : $@convention(thin) (Builtin.RawPointer) -> () { // CHECK: bind_memory %0 : $Builtin.RawPointer, {{%.*}} : $Builtin.Word to $*Int // CHECK: return sil hidden [ossa] @test_bind : $@convention(thin) (Builtin.RawPointer, @thick T.Type) -> () { @@ -893,7 +894,7 @@ bb0(%0 : $*T, %1 :$*T): } // This should not assert. -// CHECK-LABEL: sil shared [ossa] @$s26specialize_no_return_applys5NeverO_Tg5 +// CHECK-LABEL: sil shared [ossa] @$s26specialize_no_return_applys5NeverO_Tgm5 : $@convention(thin) () -> () { // CHECK: apply // CHECK-NEXT: unreachable @@ -1305,7 +1306,7 @@ sil @genericReturn : $@convention(thin) <τ_0_0> (@guaranteed AnyObject) -> @out // The generic cloner needs to be able to compute liveness to fixup a // store borrow scope when the only use is in unreachable code. // specialized testNoReturnSpecialization -// CHECK-LABEL: sil shared [ossa] @$s26testNoReturnSpecializations5NeverO_Tg5 : $@convention(thin) (@guaranteed AnyObject, @thick Never.Type) -> () { +// CHECK-LABEL: sil shared [ossa] @$s26testNoReturnSpecializations5NeverO_Tgm5 : $@convention(thin) (@guaranteed AnyObject) -> () { // CHECK: [[SB:%.*]] = store_borrow %0 to %{{.*}} : $*AnyObject // CHECK: [[LB:%.*]] = load_borrow [[SB]] : $*AnyObject // CHECK: apply %{{.*}}(%{{.*}}, [[LB]]) : $@convention(thin) <τ_0_0> (@guaranteed AnyObject) -> @out τ_0_0 @@ -1314,7 +1315,7 @@ sil @genericReturn : $@convention(thin) <τ_0_0> (@guaranteed AnyObject) -> @out // CHECK: bb1: // CHECK: end_borrow [[LB]] : $AnyObject // CHECK: end_borrow [[SB]] : $*AnyObject -// CHECK-LABEL: } // end sil function '$s26testNoReturnSpecializations5NeverO_Tg5' +// CHECK-LABEL: } // end sil function '$s26testNoReturnSpecializations5NeverO_Tgm5' sil [ossa] @testNoReturnSpecialization : $@convention(thin) (@in_guaranteed AnyObject, @thick T.Type) -> () { bb0(%0 : $*AnyObject, %1 : $@thick T.Type): %2 = load_borrow %0 : $*AnyObject @@ -1336,3 +1337,132 @@ bb0(%0 : $*AnyObject): %t = tuple () return %t : $() } + +sil [ossa] @metatypeUsed : $@convention(thin) (@thick GenericKlass.Type) -> () { +bb0(%0 : $@thick GenericKlass.Type): + %1 = alloc_ref_dynamic %0 : $@thick GenericKlass.Type, $GenericKlass + destroy_value %1 : $GenericKlass + %3 = tuple () + return %3 : $() +} + +sil [ossa] @metatypeUnused : $@convention(thin) (@thick GenericKlass.Type) -> () { +bb0(%0 : $@thick GenericKlass.Type): + debug_value %0 : $@thick GenericKlass.Type, let, name "mt", argno 0 + %2 = tuple () + return %2 : $() +} + +// CHECK-LABEL: sil [ossa] @callUsedMetatypeWithConcreteMetatype : +// CHECK: = function_ref @$s12metatypeUsedSi_Tgm5 : $@convention(thin) () -> () +// CHECK-LABEL: } // end sil function 'callUsedMetatypeWithConcreteMetatype' +sil [ossa] @callUsedMetatypeWithConcreteMetatype : $@convention(thin) () -> () { +bb0: + %0 = metatype $@thick GenericKlass.Type + %1 = function_ref @metatypeUsed : $@convention(thin) (@thick GenericKlass.Type) -> () + %2 = apply %1(%0) : $@convention(thin) (@thick GenericKlass.Type) -> () + %3 = tuple () + return %3 : $() +} + +// CHECK-LABEL: sil [ossa] @callUsedMetatypeWithUnknownMetatype : +// CHECK: = function_ref @$s12metatypeUsedSi_Tg5 : $@convention(thin) (@thick GenericKlass.Type) -> () +// CHECK-LABEL: } // end sil function 'callUsedMetatypeWithUnknownMetatype' +sil [ossa] @callUsedMetatypeWithUnknownMetatype : $@convention(thin) (@thick GenericKlass.Type) -> () { +bb0(%0 : $@thick GenericKlass.Type): + %1 = function_ref @metatypeUsed : $@convention(thin) (@thick GenericKlass.Type) -> () + %2 = apply %1(%0) : $@convention(thin) (@thick GenericKlass.Type) -> () + %3 = tuple () + return %3 : $() +} + +// CHECK-LABEL: sil [ossa] @callUnusedMetatypeWithUnknownMetatype : +// CHECK: = function_ref @$s14metatypeUnusedSi_Tgm5 : $@convention(thin) () -> () +// CHECK-LABEL: } // end sil function 'callUnusedMetatypeWithUnknownMetatype' +sil [ossa] @callUnusedMetatypeWithUnknownMetatype : $@convention(thin) (@thick GenericKlass.Type) -> () { +bb0(%0 : $@thick GenericKlass.Type): + %1 = function_ref @metatypeUnused : $@convention(thin) (@thick GenericKlass.Type) -> () + %2 = apply %1(%0) : $@convention(thin) (@thick GenericKlass.Type) -> () + %3 = tuple () + return %3 : $() +} + +sil [ossa] @closure_with_metatype : $@convention(thin) (@in_guaranteed T, @thick GenericKlass.Type) -> () { +bb0(%0 : $*T, %1 : $@thick GenericKlass.Type): + %3 = tuple () + return %3 : $() +} + +// CHECK-LABEL: sil [ossa] @returnClosureWithAppliedMetatype : +// CHECK: = function_ref @$s21closure_with_metatypeSi_TGm5 : $@convention(thin) (@in_guaranteed Int) -> () +// CHECK-LABEL: } // end sil function 'returnClosureWithAppliedMetatype' +sil [ossa] @returnClosureWithAppliedMetatype : $@convention(thin) () -> @owned @callee_owned (@in_guaranteed Int) -> () { +bb0: + %0 = metatype $@thick GenericKlass.Type + %1 = function_ref @closure_with_metatype : $@convention(thin) (@in_guaranteed T, @thick GenericKlass.Type) -> () + %2 = partial_apply %1(%0) : $@convention(thin) (@in_guaranteed T, @thick GenericKlass.Type) -> () + return %2 : $@callee_owned (@in_guaranteed Int) -> () +} + +// CHECK-LABEL: sil [ossa] @returnClosureWithNotAppliedMetatype : +// CHECK: = function_ref @$s21closure_with_metatypeSi_TG5 : $@convention(thin) (@in_guaranteed Int, @thick GenericKlass.Type) -> () +// CHECK-LABEL: } // end sil function 'returnClosureWithNotAppliedMetatype' +sil [ossa] @returnClosureWithNotAppliedMetatype : $@convention(thin) () -> @owned @callee_owned (@in_guaranteed Int, @thick GenericKlass.Type) -> () { +bb0: + %1 = function_ref @closure_with_metatype : $@convention(thin) (@in_guaranteed T, @thick GenericKlass.Type) -> () + %2 = partial_apply %1() : $@convention(thin) (@in_guaranteed T, @thick GenericKlass.Type) -> () + return %2 : $@callee_owned (@in_guaranteed Int, @thick GenericKlass.Type) -> () +} + +sil [ossa] @method_with_dynamic_self : $@convention(method) (@thick GenericKlass.Type) -> () { +bb0(%0 : $@thick GenericKlass.Type): + %1 = metatype $@thick @dynamic_self GenericKlass.Type + %2 = tuple () + return %2 : $() +} + +// CHECK-LABEL: sil [ossa] @callMethodWithDynamicSelf : +// CHECK: = function_ref @$s24method_with_dynamic_selfSi_Tg5 : $@convention(method) (@thick GenericKlass.Type) -> () +// CHECK-LABEL: } // end sil function 'callMethodWithDynamicSelf' +sil [ossa] @callMethodWithDynamicSelf : $@convention(thin) () -> () { +bb0: + %0 = metatype $@thick GenericKlass.Type + %1 = function_ref @method_with_dynamic_self : $@convention(method) (@thick GenericKlass.Type) -> () + %2 = apply %1(%0) : $@convention(method) (@thick GenericKlass.Type) -> () + return %2 : $() +} + +sil @complex_closure : $@convention(thin) (@thick T.Type, @in_guaranteed T, Bool) -> @out T { +bb0(%0 : $*T, %2 : $@thick T.Type, %3 : $*T, %4 : $Bool): + %5 = tuple () + return %5 : $() +} + +// CHECK-LABEL: sil [ossa] @returnComplexClosure : +// CHECK: = function_ref @$s15complex_closureSi_TGm5 : $@convention(thin) (@in_guaranteed Int, Bool) -> @out Int +// CHECK-LABEL: } // end sil function 'returnComplexClosure' +sil [ossa] @returnComplexClosure : $@convention(thin) (@in Int, Bool) -> @owned @callee_owned () -> @out Int { +bb0(%0: $*Int, %1 : $Bool): + %2 = metatype $@thick Int.Type + %3 = function_ref @complex_closure : $@convention(thin) (@thick T.Type, @in_guaranteed T, Bool) -> @out T + %4 = partial_apply %3(%2, %0, %1) : $@convention(thin) (@thick T.Type, @in_guaranteed T, Bool) -> @out T + return %4 : $@callee_owned () -> @out Int +} + +sil [ossa] @closure_with_thin_metatype : $@convention(thin) (@in_guaranteed T, @thin GenericKlass.Type) -> @out T { +bb0(%0 : $*T, %1 : $*T, %2 : $@thin GenericKlass.Type): + copy_addr %1 to [init] %0: $*T + %3 = tuple () + return %3 : $() +} + +// CHECK-LABEL: sil [ossa] @returnClosureWithNotAppliedThinMetatype : +// CHECK: = function_ref @$s26closure_with_thin_metatypeSi_TG5 : $@convention(thin) (@in_guaranteed Int, @thin GenericKlass.Type) -> @out Int +// CHECK-LABEL: } // end sil function 'returnClosureWithNotAppliedThinMetatype' +sil [ossa] @returnClosureWithNotAppliedThinMetatype : $@convention(thin) () -> @owned @callee_owned (@in_guaranteed Int, @thin GenericKlass.Type) -> @out Int { +bb0: + %1 = function_ref @closure_with_thin_metatype : $@convention(thin) (@in_guaranteed T, @thin GenericKlass.Type) -> @out T + %2 = partial_apply %1() : $@convention(thin) (@in_guaranteed T, @thin GenericKlass.Type) -> @out T + return %2 : $@callee_owned (@in_guaranteed Int, @thin GenericKlass.Type) -> @out Int +} + diff --git a/test/SILOptimizer/specialize_unconditional_checked_cast.swift b/test/SILOptimizer/specialize_unconditional_checked_cast.swift index d7b6728acd9c9..b0449e8b6524c 100644 --- a/test/SILOptimizer/specialize_unconditional_checked_cast.swift +++ b/test/SILOptimizer/specialize_unconditional_checked_cast.swift @@ -374,8 +374,8 @@ ExistentialToArchetype(o: o, t: o) // value cast. We could do the promotion, but the optimizer would need // to insert the Optional unwrapping logic before the cast. // -// CHECK-LABEL: sil shared [noinline] @$s37specialize_unconditional_checked_cast15genericDownCastyq_x_q_mtr0_lFAA1CCSg_AA1DCTg5 : $@convention(thin) (@guaranteed Optional, @thick D.Type) -> @owned D { -// CHECK: bb0(%0 : $Optional, %1 : $@thick D.Type): +// CHECK-LABEL: sil shared [noinline] @$s37specialize_unconditional_checked_cast15genericDownCastyq_x_q_mtr0_lFAA1CCSg_AA1DCTgm5 : $@convention(thin) (@guaranteed Optional) -> @owned D { +// CHECK: bb0(%0 : $Optional): // CHECK-DAG: [[STACK_D:%[0-9]+]] = alloc_stack $D // CHECK-DAG: [[STACK_C:%[0-9]+]] = alloc_stack $Optional // CHECK-DAG: store [[ARG]] to [[STACK_C]] diff --git a/test/SILOptimizer/unsafebufferpointer.swift b/test/SILOptimizer/unsafebufferpointer.swift index 9810b6f11327f..a082ea4eb59ee 100644 --- a/test/SILOptimizer/unsafebufferpointer.swift +++ b/test/SILOptimizer/unsafebufferpointer.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -parse-as-library -Osize -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-as-library -Osize -emit-ir %s | %FileCheck %s +// RUN: %target-swift-frontend -parse-as-library -Osize -emit-ir %s // REQUIRES: swift_stdlib_no_asserts,optimized_stdlib // REQUIRES: swift_in_compiler diff --git a/test/Serialization/Recovery/typedefs-in-protocols.swift b/test/Serialization/Recovery/typedefs-in-protocols.swift index 1d02218577fc4..79695a0574c83 100644 --- a/test/Serialization/Recovery/typedefs-in-protocols.swift +++ b/test/Serialization/Recovery/typedefs-in-protocols.swift @@ -7,8 +7,10 @@ // RUN: %target-swift-frontend -typecheck -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -DTEST -DVERIFY %s -verify -// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/custom-modules -DTEST %s | %FileCheck -check-prefix CHECK-IR %s -// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -DTEST %s | %FileCheck -check-prefix CHECK-IR %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -I %t -I %S/Inputs/custom-modules -DTEST %s | %FileCheck -check-prefix CHECK-IR %s +// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/custom-modules -DTEST %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -DTEST %s | %FileCheck -check-prefix CHECK-IR %s +// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -DTEST %s #if TEST diff --git a/test/Serialization/Recovery/typedefs.swift b/test/Serialization/Recovery/typedefs.swift index 02d7b27565e2f..d39203da21627 100644 --- a/test/Serialization/Recovery/typedefs.swift +++ b/test/Serialization/Recovery/typedefs.swift @@ -13,8 +13,10 @@ // RUN: %target-swift-frontend -typecheck -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -DTEST -DVERIFY %s -verify // RUN: %target-swift-frontend -emit-silgen -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -DTEST %s | %FileCheck -check-prefix CHECK-SIL %s -// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/custom-modules -DTEST %s | %FileCheck --check-prefixes=CHECK-IR,CHECK-IR-%target-runtime %s -// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -DTEST %s | %FileCheck --check-prefixes=CHECK-IR,CHECK-IR-%target-runtime %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -I %t -I %S/Inputs/custom-modules -DTEST %s | %FileCheck --check-prefixes=CHECK-IR,CHECK-IR-%target-runtime %s +// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/custom-modules -DTEST %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -emit-ir -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -DTEST %s | %FileCheck --check-prefixes=CHECK-IR,CHECK-IR-%target-runtime %s +// RUN: %target-swift-frontend -emit-ir -I %t -I %S/Inputs/custom-modules -Xcc -DBAD -DTEST %s // RUN: %target-swift-frontend -typecheck -I %t -I %S/Inputs/custom-modules -Xcc -DBAD %S/Inputs/typedefs-helper.swift -verify diff --git a/test/Serialization/autolinking.swift b/test/Serialization/autolinking.swift index fdde3623e6998..606bbfd13d01c 100644 --- a/test/Serialization/autolinking.swift +++ b/test/Serialization/autolinking.swift @@ -1,33 +1,41 @@ // RUN: %empty-directory(%t) // RUN: %target-swift-frontend -emit-module -parse-stdlib -o %t -module-name someModule -module-link-name module %S/../Inputs/empty.swift // RUN: %target-swift-frontend -disable-autolinking-runtime-compatibility-dynamic-replacements -runtime-compatibility-version none -emit-ir -lmagic %s -I %t > %t/out.txt -// RUN: %target-swift-frontend -disable-autolinking-runtime-compatibility-concurrency -runtime-compatibility-version none -emit-ir -lmagic %s -I %t > %t/out.txt +// RUN: %target-swift-frontend -disable-autolinking-runtime-compatibility-concurrency -runtime-compatibility-version none -emit-ir -lmagic %s -I %t +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-autolinking-runtime-compatibility-concurrency -runtime-compatibility-version none -emit-ir -lmagic %s -I %t > %t/out.txt // RUN: %FileCheck %s < %t/out.txt // RUN: %FileCheck -check-prefix=NO-FORCE-LOAD %s < %t/out.txt // RUN: %empty-directory(%t/someModule.framework/Modules/someModule.swiftmodule) // RUN: mv %t/someModule.swiftmodule %t/someModule.framework/Modules/someModule.swiftmodule/%target-swiftmodule-name // RUN: %target-swift-frontend -disable-autolinking-runtime-compatibility-dynamic-replacements -runtime-compatibility-version none -emit-ir -lmagic %s -F %t > %t/framework.txt -// RUN: %target-swift-frontend -disable-autolinking-runtime-compatibility-concurrency -runtime-compatibility-version none -emit-ir -lmagic %s -F %t > %t/framework.txt +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-autolinking-runtime-compatibility-concurrency -runtime-compatibility-version none -emit-ir -lmagic %s -F %t > %t/framework.txt +// RUN: %target-swift-frontend -disable-autolinking-runtime-compatibility-concurrency -runtime-compatibility-version none -emit-ir -lmagic %s -F %t // RUN: %FileCheck -check-prefix=FRAMEWORK %s < %t/framework.txt // RUN: %FileCheck -check-prefix=NO-FORCE-LOAD %s < %t/framework.txt // RUN: %target-swift-frontend -emit-module -parse-stdlib -o %t -module-name someModule -module-link-name module %S/../Inputs/empty.swift -autolink-force-load -// RUN: %target-swift-frontend -runtime-compatibility-version none -emit-ir -lmagic %s -I %t > %t/force-load.txt +// RUN: %target-swift-frontend %use_no_opaque_pointers -runtime-compatibility-version none -emit-ir -lmagic %s -I %t > %t/force-load.txt +// RUN: %target-swift-frontend -runtime-compatibility-version none -emit-ir -lmagic %s -I %t // RUN: %FileCheck %s < %t/force-load.txt // RUN: %FileCheck -check-prefix FORCE-LOAD-CLIENT -check-prefix FORCE-LOAD-CLIENT-%target-object-format %s < %t/force-load.txt -// RUN: %target-swift-frontend -runtime-compatibility-version none -emit-ir -debugger-support %s -I %t > %t/force-load.txt +// RUN: %target-swift-frontend %use_no_opaque_pointers -runtime-compatibility-version none -emit-ir -debugger-support %s -I %t > %t/force-load.txt +// RUN: %target-swift-frontend -runtime-compatibility-version none -emit-ir -debugger-support %s -I %t // RUN: %FileCheck -check-prefix NO-FORCE-LOAD-CLIENT %s < %t/force-load.txt -// RUN: %target-swift-frontend -disable-autolinking-runtime-compatibility-dynamic-replacements -runtime-compatibility-version none -emit-ir -parse-stdlib -module-name someModule -module-link-name module %S/../Inputs/empty.swift | %FileCheck --check-prefix=NO-FORCE-LOAD %s -// RUN: %target-swift-frontend -disable-autolinking-runtime-compatibility-concurrency -runtime-compatibility-version none -emit-ir -parse-stdlib -module-name someModule -module-link-name module %S/../Inputs/empty.swift | %FileCheck --check-prefix=NO-FORCE-LOAD %s -// RUN: %target-swift-frontend -runtime-compatibility-version none -emit-ir -parse-stdlib -module-name someModule -module-link-name module %S/../Inputs/empty.swift -autolink-force-load | %FileCheck --check-prefix=FORCE-LOAD %s -// RUN: %target-swift-frontend -runtime-compatibility-version none -emit-ir -parse-stdlib -module-name someModule -module-link-name 0module %S/../Inputs/empty.swift -autolink-force-load | %FileCheck --check-prefix=FORCE-LOAD-HEX %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-autolinking-runtime-compatibility-dynamic-replacements -runtime-compatibility-version none -emit-ir -parse-stdlib -module-name someModule -module-link-name module %S/../Inputs/empty.swift | %FileCheck --check-prefix=NO-FORCE-LOAD %s +// RUN: %target-swift-frontend -disable-autolinking-runtime-compatibility-dynamic-replacements -runtime-compatibility-version none -emit-ir -parse-stdlib -module-name someModule -module-link-name module %S/../Inputs/empty.swift +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-autolinking-runtime-compatibility-concurrency -runtime-compatibility-version none -emit-ir -parse-stdlib -module-name someModule -module-link-name module %S/../Inputs/empty.swift | %FileCheck --check-prefix=NO-FORCE-LOAD %s +// RUN: %target-swift-frontend -disable-autolinking-runtime-compatibility-concurrency -runtime-compatibility-version none -emit-ir -parse-stdlib -module-name someModule -module-link-name module %S/../Inputs/empty.swift +// RUN: %target-swift-frontend %use_no_opaque_pointers -runtime-compatibility-version none -emit-ir -parse-stdlib -module-name someModule -module-link-name module %S/../Inputs/empty.swift -autolink-force-load | %FileCheck --check-prefix=FORCE-LOAD %s +// RUN: %target-swift-frontend -runtime-compatibility-version none -emit-ir -parse-stdlib -module-name someModule -module-link-name module %S/../Inputs/empty.swift -autolink-force-load +// RUN: %target-swift-frontend %use_no_opaque_pointers -runtime-compatibility-version none -emit-ir -parse-stdlib -module-name someModule -module-link-name 0module %S/../Inputs/empty.swift -autolink-force-load | %FileCheck --check-prefix=FORCE-LOAD-HEX %s // RUN: %target-swift-frontend -emit-module -parse-stdlib -o %t -module-name someModule -module-link-name module %S/../Inputs/empty.swift -public-autolink-library anotherLib // RUN: %target-swift-frontend -disable-autolinking-runtime-compatibility-dynamic-replacements -runtime-compatibility-version none -emit-ir -lmagic %s -I %t > %t/public-autolink.txt -// RUN: %target-swift-frontend -disable-autolinking-runtime-compatibility-concurrency -runtime-compatibility-version none -emit-ir -lmagic %s -I %t > %t/public-autolink.txt +// RUN: %target-swift-frontend %use_no_opaque_pointers -disable-autolinking-runtime-compatibility-concurrency -runtime-compatibility-version none -emit-ir -lmagic %s -I %t > %t/public-autolink.txt +// RUN: %target-swift-frontend -disable-autolinking-runtime-compatibility-concurrency -runtime-compatibility-version none -emit-ir -lmagic %s -I %t // RUN: %FileCheck %s < %t/public-autolink.txt // RUN: %FileCheck -check-prefix=PUBLIC-DEP %s < %t/public-autolink.txt diff --git a/test/SymbolGraph/ClangImporter/MinimumAccessLevel.swift b/test/SymbolGraph/ClangImporter/MinimumAccessLevel.swift new file mode 100644 index 0000000000000..bf132394dc675 --- /dev/null +++ b/test/SymbolGraph/ClangImporter/MinimumAccessLevel.swift @@ -0,0 +1,20 @@ +// RUN: %empty-directory(%t) +// RUN: cp -r %S/Inputs/EmitWhileBuilding/EmitWhileBuilding.framework %t +// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -emit-module-path %t/EmitWhileBuilding.framework/Modules/EmitWhileBuilding.swiftmodule/%target-swiftmodule-name -import-underlying-module -F %t -module-name EmitWhileBuilding -disable-objc-attr-requires-foundation-module %s %S/Inputs/EmitWhileBuilding/Extra.swift -emit-symbol-graph -emit-symbol-graph-dir %t -symbol-graph-minimum-access-level internal +// RUN: %FileCheck %s --input-file %t/EmitWhileBuilding.symbols.json +// RUN: %{python} -c 'import os.path; import sys; sys.exit(1 if os.path.exists(sys.argv[1]) else 0)' %t/EmitWhileBuilding@EmitWhileBuilding.symbols.json + +// RUN: %target-swift-symbolgraph-extract -sdk %clang-importer-sdk -module-name EmitWhileBuilding -F %t -output-dir %t -pretty-print -v -minimum-access-level internal +// RUN: %FileCheck %s --input-file %t/EmitWhileBuilding.symbols.json +// RUN: %{python} -c 'import os.path; import sys; sys.exit(1 if os.path.exists(sys.argv[1]) else 0)' %t/EmitWhileBuilding@EmitWhileBuilding.symbols.json + +// REQUIRES: objc_interop + +// Ensure that having an underlying Clang module does not override the +// `-symbol-graph-minimum-access-level` flag (rdar://110399757) + +// CHECK: "s:17EmitWhileBuilding9innerFuncSSyF" + +internal func innerFunc() -> String { "sup" } + +public func someFunc() -> String { innerFunc() } diff --git a/test/TBD/specialization.swift b/test/TBD/specialization.swift index 1a83c63afea8b..6d00daf8a67c9 100644 --- a/test/TBD/specialization.swift +++ b/test/TBD/specialization.swift @@ -40,7 +40,7 @@ public func f() { // Generic specialization, from the foo call in f // CHECK-LABEL: // specialized Foo.foo(_:) -// CHECK-NEXT: sil private [noinline] @$s14specialization3FooC3foo33_A6E3E43DB6679655BDF5A878ABC489A0LLyyxmlFSi_Tg5Tf4dd_n : $@convention(thin) () -> () +// CHECK-NEXT: sil private [noinline] @$s14specialization3FooC3foo33_A6E3E43DB6679655BDF5A878ABC489A0LLyyxmlFSi_Tgm5Tf4d_n : $@convention(thin) () -> () // Function signature specialization, from the bar call in Bar.init // CHECK-LABEL: // specialized Bar.bar() diff --git a/test/attr/attr_backDeployed.swift b/test/attr/attr_backDeployed.swift index 5108d537e787e..c7d4d3e0bbf31 100644 --- a/test/attr/attr_backDeployed.swift +++ b/test/attr/attr_backDeployed.swift @@ -261,6 +261,21 @@ protocol CannotBackDeployProtocol {} @backDeployed(before: macOS 12.0) // expected-error {{'@backDeployed' attribute cannot be applied to this declaration}} public actor CannotBackDeployActor {} +public struct ConformsToTopLevelProtocol: TopLevelProtocol { + public init() {} +} + +@available(SwiftStdlib 5.1, *) +@backDeployed(before: macOS 12.0) // expected-error {{'@backDeployed' is unsupported on a var with a 'some' return type}} +public var cannotBackDeployVarWithOpaqueResultType: some TopLevelProtocol { + return ConformsToTopLevelProtocol() +} + +@available(SwiftStdlib 5.1, *) +@backDeployed(before: macOS 12.0) // expected-error {{'@backDeployed' is unsupported on a global function with a 'some' return type}} +public func cannotBackDeployFuncWithOpaqueResultType() -> some TopLevelProtocol { + return ConformsToTopLevelProtocol() +} // MARK: - Function body diagnostics diff --git a/test/decl/typealias/generic.swift b/test/decl/typealias/generic.swift index 3b1e6b4143fb4..c4763e474ab2f 100644 --- a/test/decl/typealias/generic.swift +++ b/test/decl/typealias/generic.swift @@ -2,10 +2,7 @@ struct MyType { // expected-note {{generic type 'MyType' declared here}} // expected-note @-1 {{arguments to generic parameter 'TyB' ('S' and 'Int') are expected to be equal}} - // expected-note @-2 6 {{arguments to generic parameter 'TyA' ('Float' and 'Int') are expected to be equal}} - // expected-note @-3 2 {{arguments to generic parameter 'TyA' ('Float' and 'Double') are expected to be equal}} - // expected-note @-4 2 {{arguments to generic parameter 'TyB' ('Int' and 'Float') are expected to be equal}} - // expected-note @-5 2 {{arguments to generic parameter 'TyB' ('Double' and 'Float') are expected to be equal}} + var a : TyA, b : TyB } @@ -255,23 +252,13 @@ let _: ConcreteStruct.O = ConcreteStruct.O(123) let _: ConcreteStruct.O = ConcreteStruct.O(123) // Qualified lookup of generic typealiases nested inside generic contexts -// -// FIXME marks cases which still don't work correctly, and either produce a -// spurious diagnostic, or are actually invalid and do not diagnose. -// -// This occurs because the constraint solver does the wrong thing with an -// UnresolvedSpecializeExpr applied to a generic typealias. -// -// In the other cases, we manage to fold the UnresolvedSpecializeExpr in the -// precheckExpression() phase, which handles generic typealiases correctly. do { - let x1 = GenericClass.TA(a: 4.0, b: 1) // FIXME - let x2 = GenericClass.TA(a: 1, b: 4.0) // FIXME + let x1 = GenericClass.TA(a: 4.0, b: 1) + let x2 = GenericClass.TA(a: 1, b: 4.0) - // FIXME: Should not diagnose - let _: MyType = x1 // expected-error {{cannot assign value of type 'MyType' to type 'MyType'}} - let _: MyType = x2 // expected-error {{cannot assign value of type 'MyType' to type 'MyType'}} + let _: MyType = x1 + let _: MyType = x2 } let _ = GenericClass.TA(a: 4.0, b: 1) // expected-error {{cannot convert value of type 'Double' to expected argument type 'Int'}} @@ -284,12 +271,11 @@ let _: GenericClass.TA = GenericClass.TA(a: 4.0, b: 1) let _: GenericClass.TA = GenericClass.TA(a: 1, b: 4.0) do { - let x1: GenericClass.TA = GenericClass.TA(a: 4.0, b: 1) // FIXME - let x2: GenericClass.TA = GenericClass.TA(a: 1, b: 4.0) // FIXME + let x1: GenericClass.TA = GenericClass.TA(a: 4.0, b: 1) + let x2: GenericClass.TA = GenericClass.TA(a: 1, b: 4.0) - // FIXME: Should not diagnose - let _: MyType = x1 // expected-error {{cannot assign value of type 'MyType' to type 'MyType'}} - let _: MyType = x2 // expected-error {{cannot assign value of type 'MyType' to type 'MyType'}} + let _: MyType = x1 + let _: MyType = x2 } let _: GenericClass.TA = GenericClass.TA(a: 4.0, b: 1) // expected-error {{cannot convert value of type 'Double' to expected argument type 'Int'}} @@ -301,8 +287,8 @@ let _: GenericClass.TA = GenericClass.TA(a: 1, b: 4.0) let _: GenericClass.TA = GenericClass.TA(a: 4.0, b: 1) // expected-error {{cannot convert value of type 'Double' to expected argument type 'Int'}} let _: GenericClass.TA = GenericClass.TA(a: 1, b: 4.0) -let _: GenericClass.TA = GenericClass.TA(a: 4.0, b: 1) // expected-error {{cannot assign value of type 'MyType' to type 'MyType'}} -let _: GenericClass.TA = GenericClass.TA(a: 1, b: 4.0) // expected-error {{cannot assign value of type 'MyType' to type 'MyType'}} +let _: GenericClass.TA = GenericClass.TA(a: 4.0, b: 1) // expected-error {{cannot convert value of type 'Double' to expected argument type 'Int'}} +let _: GenericClass.TA = GenericClass.TA(a: 1, b: 4.0) let _: GenericClass.TA = GenericClass.TA(a: 4.0, b: 1) // expected-error {{cannot convert value of type 'Double' to expected argument type 'Int'}} let _: GenericClass.TA = GenericClass.TA(a: 1, b: 4.0) @@ -313,8 +299,8 @@ let _: GenericClass.TA = GenericClass.TA(a: 1, b: 4.0) let _: GenericClass.TA = GenericClass.TA(a: 4.0, b: 1) // expected-error {{cannot convert value of type 'Double' to expected argument type 'Int'}} let _: GenericClass.TA = GenericClass.TA(a: 1, b: 4.0) -let _: GenericClass.TA = GenericClass.TA(a: 4.0, b: 1) // expected-error {{cannot assign value of type 'MyType' to type 'GenericClass.TA' (aka 'MyType')}} -let _: GenericClass.TA = GenericClass.TA(a: 1, b: 4.0) // expected-error {{cannot assign value of type 'MyType' to type 'GenericClass.TA' (aka 'MyType')}} +let _: GenericClass.TA = GenericClass.TA(a: 4.0, b: 1) // expected-error {{cannot convert value of type 'Double' to expected argument type 'Int'}} +let _: GenericClass.TA = GenericClass.TA(a: 1, b: 4.0) let _: GenericClass.TA = GenericClass.TA(a: 4.0, b: 1) // expected-error {{cannot convert value of type 'Double' to expected argument type 'Int'}} let _: GenericClass.TA = GenericClass.TA(a: 1, b: 4.0) diff --git a/test/lit.cfg b/test/lit.cfg index 05bf54c07f73f..d2cecb5015ddc 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -219,6 +219,7 @@ config.llvm_src_root = getattr(config, 'llvm_src_root', None) config.llvm_obj_root = getattr(config, 'llvm_obj_root', None) lto_flags = "" +use_just_built_liblto = "" if platform.system() == 'OpenBSD': llvm_libs_dir = getattr(config, 'llvm_libs_dir', None) @@ -231,8 +232,10 @@ elif platform.system() == 'Darwin': if not llvm_libs_dir: lit_config.fatal('No LLVM libs dir set.') lto_flags = "-Xlinker -lto_library -Xlinker %s/libLTO.dylib" % llvm_libs_dir + use_just_built_liblto = "LIBLTO_PATH=%s/libLTO.dylib" % llvm_libs_dir config.substitutions.append( ('%lto_flags', lto_flags) ) +config.substitutions.append( ('%use_just_built_liblto', use_just_built_liblto) ) def append_to_env_path(directory): config.environment['PATH'] = \ @@ -2808,3 +2811,4 @@ if kIsWindows and visual_studio_version: config.available_features.add('MSVC_VER=%s' % visual_studio_version) lit_config.note("Available features: " + ", ".join(sorted(config.available_features))) +config.substitutions.append( ('%use_no_opaque_pointers', '-Xcc -Xclang -Xcc -no-opaque-pointers' ) ) diff --git a/test/multifile/nested_types.swift b/test/multifile/nested_types.swift index 08a634d1e9562..cba3de34bc41f 100644 --- a/test/multifile/nested_types.swift +++ b/test/multifile/nested_types.swift @@ -1,4 +1,5 @@ -// RUN: %target-build-swift -module-name test -wmo -O -emit-ir -Xfrontend -num-threads -Xfrontend 0 %s %S/Inputs/nested_types_defs.swift -o - | %FileCheck %s +// RUN: %target-build-swift %use_no_opaque_pointers -module-name test -wmo -O -emit-ir -Xfrontend -num-threads -Xfrontend 0 %s %S/Inputs/nested_types_defs.swift -o - | %FileCheck %s +// RUN: %target-build-swift -module-name test -wmo -O -emit-ir -Xfrontend -num-threads -Xfrontend 0 %s %S/Inputs/nested_types_defs.swift -o - // Make sure we generate the outer metadata. diff --git a/test/multifile/require-layout-generic-arg-closure.swift b/test/multifile/require-layout-generic-arg-closure.swift index 73b5de1314c8b..712d4f596464b 100644 --- a/test/multifile/require-layout-generic-arg-closure.swift +++ b/test/multifile/require-layout-generic-arg-closure.swift @@ -1,8 +1,11 @@ -// RUN: %target-swift-frontend -module-name test -enable-objc-interop -emit-ir -verify -primary-file %s %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefixes=FILE1,FILE1-objc %s -// RUN: %target-swift-frontend -module-name test -enable-objc-interop -emit-ir -verify %s -primary-file %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefix=FILE2 %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name test -enable-objc-interop -emit-ir -verify -primary-file %s %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefixes=FILE1,FILE1-objc %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name test -enable-objc-interop -emit-ir -verify %s -primary-file %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefix=FILE2 %s -// RUN: %target-swift-frontend -module-name test -disable-objc-interop -emit-ir -verify -primary-file %s %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefixes=FILE1,FILE1-native %s -// RUN: %target-swift-frontend -module-name test -disable-objc-interop -emit-ir -verify %s -primary-file %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefix=FILE2 %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name test -disable-objc-interop -emit-ir -verify -primary-file %s %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefixes=FILE1,FILE1-native %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name test -disable-objc-interop -emit-ir -verify %s -primary-file %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefix=FILE2 %s + +// RUN: %target-swift-frontend -module-name test -enable-objc-interop -emit-ir -verify -primary-file %s %S/Inputs/require-layout-generic-class.swift +// RUN: %target-swift-frontend -module-name test -disable-objc-interop -emit-ir -verify -primary-file %s %S/Inputs/require-layout-generic-class.swift // REQUIRES: CPU=x86_64 diff --git a/test/multifile/require-layout-generic-arg-subscript.swift b/test/multifile/require-layout-generic-arg-subscript.swift index fc9c2c42dd87d..6d8ef0524078c 100644 --- a/test/multifile/require-layout-generic-arg-subscript.swift +++ b/test/multifile/require-layout-generic-arg-subscript.swift @@ -1,8 +1,11 @@ -// RUN: %target-swift-frontend -module-name test -enable-objc-interop -emit-ir -verify -primary-file %s %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefixes=FILE1,FILE1-objc %s -// RUN: %target-swift-frontend -module-name test -enable-objc-interop -emit-ir -verify %s -primary-file %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefix=FILE2 %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name test -enable-objc-interop -emit-ir -verify -primary-file %s %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefixes=FILE1,FILE1-objc %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name test -enable-objc-interop -emit-ir -verify %s -primary-file %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefix=FILE2 %s -// RUN: %target-swift-frontend -module-name test -disable-objc-interop -emit-ir -verify -primary-file %s %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefixes=FILE1,FILE1-native %s -// RUN: %target-swift-frontend -module-name test -disable-objc-interop -emit-ir -verify %s -primary-file %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefix=FILE2 %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name test -disable-objc-interop -emit-ir -verify -primary-file %s %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefixes=FILE1,FILE1-native %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name test -disable-objc-interop -emit-ir -verify %s -primary-file %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefix=FILE2 %s + +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name test -enable-objc-interop -emit-ir -verify -primary-file %s %S/Inputs/require-layout-generic-class.swift +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name test -disable-objc-interop -emit-ir -verify -primary-file %s %S/Inputs/require-layout-generic-class.swift // REQUIRES: CPU=x86_64 diff --git a/test/multifile/require-layout-generic-arg.swift b/test/multifile/require-layout-generic-arg.swift index 459bc3700992c..2457096a4c4c3 100644 --- a/test/multifile/require-layout-generic-arg.swift +++ b/test/multifile/require-layout-generic-arg.swift @@ -1,8 +1,14 @@ -// RUN: %target-swift-frontend -module-name test -enable-objc-interop -emit-ir -verify -primary-file %s %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefixes=FILE1,FILE1-objc %s -// RUN: %target-swift-frontend -module-name test -enable-objc-interop -emit-ir -verify %s -primary-file %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefix=FILE2 %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name test -enable-objc-interop -emit-ir -verify -primary-file %s %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefixes=FILE1,FILE1-objc %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name test -enable-objc-interop -emit-ir -verify %s -primary-file %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefix=FILE2 %s -// RUN: %target-swift-frontend -module-name test -disable-objc-interop -emit-ir -verify -primary-file %s %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefixes=FILE1,FILE1-native %s -// RUN: %target-swift-frontend -module-name test -disable-objc-interop -emit-ir -verify %s -primary-file %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefix=FILE2 %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name test -disable-objc-interop -emit-ir -verify -primary-file %s %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefixes=FILE1,FILE1-native %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -module-name test -disable-objc-interop -emit-ir -verify %s -primary-file %S/Inputs/require-layout-generic-class.swift | %FileCheck --check-prefix=FILE2 %s + +// RUN: %target-swift-frontend -module-name test -enable-objc-interop -emit-ir -verify -primary-file %s %S/Inputs/require-layout-generic-class.swift +// RUN: %target-swift-frontend -module-name test -enable-objc-interop -emit-ir -verify %s -primary-file %S/Inputs/require-layout-generic-class.swift + +// RUN: %target-swift-frontend -module-name test -disable-objc-interop -emit-ir -verify -primary-file %s %S/Inputs/require-layout-generic-class.swift +// RUN: %target-swift-frontend -module-name test -disable-objc-interop -emit-ir -verify %s -primary-file %S/Inputs/require-layout-generic-class.swift // REQUIRES: CPU=x86_64 diff --git a/test/sil-llvm-gen/alloc.sil b/test/sil-llvm-gen/alloc.sil index 4927df7d1a735..b39802a90cfea 100644 --- a/test/sil-llvm-gen/alloc.sil +++ b/test/sil-llvm-gen/alloc.sil @@ -22,6 +22,6 @@ struct Huge { var unalign: Builtin.Int8 } -// CHECK: define linkonce_odr hidden i8* @__swift_memcpy4097_8(i8* %0, i8* %1, %swift.type* %2) -// CHECK: call void @llvm.memcpy.p0i8.p0i8.{{(i64|i32)}}(i8* align 8 %0, i8* align 8 %1, {{(i64|i32)}} 4097, i1 false) -// CHECK: ret i8* %0 +// CHECK: define linkonce_odr hidden ptr @__swift_memcpy4097_8(ptr %0, ptr %1, ptr %2) +// CHECK: call void @llvm.memcpy.p0.p0.{{(i64|i32)}}(ptr align 8 %0, ptr align 8 %1, {{(i64|i32)}} 4097, i1 false) +// CHECK: ret ptr %0 diff --git a/test/stdlib/Observation/Observable.swift b/test/stdlib/Observation/Observable.swift index bf3a8e117439e..5c4ecffcacd4c 100644 --- a/test/stdlib/Observation/Observable.swift +++ b/test/stdlib/Observation/Observable.swift @@ -2,6 +2,9 @@ // RUN: %target-run-simple-swift( -Xfrontend -disable-availability-checking -parse-as-library -enable-experimental-feature InitAccessors -enable-experimental-feature Macros -Xfrontend -plugin-path -Xfrontend %swift-host-lib-dir/plugins) +// Asserts is required for '-enable-experimental-feature InitAccessors'. +// REQUIRES: asserts + // REQUIRES: observation // REQUIRES: concurrency // REQUIRES: objc_interop diff --git a/tools/swift-ide-test/swift-ide-test.cpp b/tools/swift-ide-test/swift-ide-test.cpp index 463f801d3949d..9d4908cc9be47 100644 --- a/tools/swift-ide-test/swift-ide-test.cpp +++ b/tools/swift-ide-test/swift-ide-test.cpp @@ -4513,15 +4513,12 @@ int main(int argc, char *argv[]) { } } - for (auto path : options::PluginPath) { - InitInvok.getSearchPathOptions().PluginSearchPaths.push_back(path); - } if (!options::LoadPluginLibrary.empty()) { std::vector paths; for (auto path: options::LoadPluginLibrary) { - paths.push_back(path); + InitInvok.getSearchPathOptions().PluginSearchOpts.emplace_back( + PluginSearchOption::LoadPluginLibrary{path}); } - InitInvok.getSearchPathOptions().setCompilerPluginLibraryPaths(paths); } if (!options::LoadPluginExecutable.empty()) { std::vector pairs; @@ -4533,10 +4530,14 @@ int main(int argc, char *argv[]) { for (auto name : llvm::split(modulesStr, ',')) { moduleNames.emplace_back(name); } - pairs.push_back({std::string(path), std::move(moduleNames)}); + InitInvok.getSearchPathOptions().PluginSearchOpts.emplace_back( + PluginSearchOption::LoadPluginExecutable{std::string(path), + std::move(moduleNames)}); } - - InitInvok.getSearchPathOptions().setCompilerPluginExecutablePaths(std::move(pairs)); + } + for (auto path : options::PluginPath) { + InitInvok.getSearchPathOptions().PluginSearchOpts.emplace_back( + PluginSearchOption::PluginPath{path}); } // Process the clang arguments last and allow them to override previously diff --git a/utils/build-windows-toolchain.bat b/utils/build-windows-toolchain.bat index f7084bcb18584..c514d047f5f18 100644 --- a/utils/build-windows-toolchain.bat +++ b/utils/build-windows-toolchain.bat @@ -928,23 +928,61 @@ endlocal :PackageToolchain setlocal enableextensions enabledelayedexpansion -:: Package toolchain.msi -msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\toolchain.wixproj ^ +:: Package bld.msi +msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\bld.wixproj ^ -restore ^ + -p:Configuration=Release ^ + -p:IntermediateOutputPath=%PackageRoot%\bld\ ^ + -p:OutputPath=%PackageRoot%\bld\ ^ -p:RunWixToolsOutOfProc=true ^ - -p:OutputPath=%PackageRoot%\toolchain\ ^ - -p:IntermediateOutputPath=%PackageRoot%\toolchain\ ^ -p:DEVTOOLS_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain ^ -p:TOOLCHAIN_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain :: TODO(compnerd) actually perform the code-signing -:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\toolchain\toolchain.msi +:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\bld\bld.msi + +:: Package cli.msi +msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\cli.wixproj ^ + -restore ^ + -p:Configuration=Release ^ + -p:IntermediateOutputPath=%PackageRoot%\cli\ ^ + -p:OutputPath=%PackageRoot%\cli\ ^ + -p:RunWixToolsOutOfProc=true ^ + -p:DEVTOOLS_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain ^ + -p:TOOLCHAIN_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain +:: TODO(compnerd) actually perform the code-signing +:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\cli\cli.msi + +:: Package dbg.msi +msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\dbg.wixproj ^ + -restore ^ + -p:Configuration=Release ^ + -p:IntermediateOutputPath=%PackageRoot%\dbg\ ^ + -p:OutputPath=%PackageRoot%\dbg\ ^ + -p:RunWixToolsOutOfProc=true ^ + -p:DEVTOOLS_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain ^ + -p:TOOLCHAIN_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain +:: TODO(compnerd) actually perform the code-signing +:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\dbg\dbg.msi + +:: Package ide.msi +msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\ide.wixproj ^ + -restore ^ + -p:Configuration=Release ^ + -p:IntermediateOutputPath=%PackageRoot%\ide\ ^ + -p:OutputPath=%PackageRoot%\ide\ ^ + -p:RunWixToolsOutOfProc=true ^ + -p:DEVTOOLS_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain ^ + -p:TOOLCHAIN_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain +:: TODO(compnerd) actually perform the code-signing +:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\ide\ide.msi :: Package sdk.msi msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\sdk.wixproj ^ -restore ^ - -p:RunWixToolsOutOfProc=true ^ - -p:OutputPath=%PackageRoot%\sdk\ ^ + -p:Configuration=Release ^ -p:IntermediateOutputPath=%PackageRoot%\sdk\ ^ + -p:OutputPath=%PackageRoot%\sdk\ ^ + -p:RunWixToolsOutOfProc=true ^ -p:PLATFORM_ROOT=%PlatformRoot%\ ^ -p:SDK_ROOT=%SDKInstallRoot%\ :: TODO(compnerd) actually perform the code-signing @@ -953,35 +991,29 @@ msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\sdk.wixproj ^ :: Package runtime.msi msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\runtime.wixproj ^ -restore ^ - -p:RunWixToolsOutOfProc=true ^ - -p:OutputPath=%PackageRoot%\runtime\ ^ + -p:Configuration=Release ^ -p:IntermediateOutputPath=%PackageRoot%\runtime\ ^ + -p:OutputPath=%PackageRoot%\runtime\ ^ + -p:RunWixToolsOutOfProc=true ^ -p:SDK_ROOT=%SDKInstallRoot%\ :: TODO(compnerd) actually perform the code-signing :: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\runtime\runtime.msi -:: Package devtools.msi -msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\devtools.wixproj ^ - -restore ^ - -p:RunWixToolsOutOfProc=true ^ - -p:OutputPath=%PackageRoot%\devtools\ ^ - -p:IntermediateOutputPath=%PackageRoot%\devtools\ ^ - -p:DEVTOOLS_ROOT=%BuildRoot%\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain -:: TODO(compnerd) actually perform the code-signing -:: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\devtools\devtools.msi - :: Collate MSIs -move %PackageRoot%\toolchain\toolchain.msi %PackageRoot% || (exit /b) +move %PackageRoot%\bld\bld.msi %PackageRoot% || (exit /b) +move %PackageRoot%\cli\cli.msi %PackageRoot% || (exit /b) +move %PackageRoot%\dbg\dbg.msi %PackageRoot% || (exit /b) +move %PackageRoot%\ide\ide.msi %PackageRoot% || (exit /b) move %PackageRoot%\sdk\sdk.msi %PackageRoot% || (exit /b) move %PackageRoot%\runtime\runtime.msi %PackageRoot% || (exit /b) -move %PackageRoot%\devtools\devtools.msi %PackageRoot% || (exit /b) :: Build Installer msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\installer.wixproj ^ -restore ^ - -p:RunWixToolsOutOfProc=true ^ - -p:OutputPath=%PackageRoot%\installer\ ^ + -p:Configuration=Release ^ -p:IntermediateOutputPath=%PackageRoot%\installer\ ^ + -p:OutputPath=%PackageRoot%\installer\ ^ + -p:RunWixToolsOutOfProc=true ^ -p:MSI_LOCATION=%PackageRoot%\ :: TODO(compnerd) actually perform the code-signing :: signtool sign /f Apple_CodeSign.pfx /p Apple_CodeSign_Password /tr http://timestamp.digicert.com /fd sha256 %PackageRoot%\installer\installer.exe @@ -990,12 +1022,19 @@ msbuild %SourceRoot%\swift-installer-scripts\platforms\Windows\installer.wixproj md %BuildRoot%\artifacts :: Redistributable libraries for developers -move %PackageRoot%\runtime.msi %BuildRoot%\artifacts || (exit /b) -:: Toolchain -move %PackageRoot%\toolchain.msi %BuildRoot%\artifacts || (exit /b) -:: SDK +:: bld +move %PackageRoot%\bld.msi %BuildRoot%\artifacts || (exit /b) +:: cli +move %PackageRoot%\cli.msi %BuildRoot%\artifacts || (exit /b) +:: dbg +move %PackageRoot%\dbg.msi %BuildRoot%\artifacts || (exit /b) +:: ide +move %PackageRoot%\ide.msi %BuildRoot%\artifacts || (exit /b) +:: sdk move %PackageRoot%\sdk.msi %BuildRoot%\artifacts || (exit /b) -:: Installer +:: runtime +move %PackageRoot%\runtime.msi %BuildRoot%\artifacts || (exit /b) +:: installer move %PackageRoot%\installer\installer.exe %BuildRoot%\artifacts || (exit /b) goto :eof diff --git a/validation-test/IRGen/issue-49393.swift b/validation-test/IRGen/issue-49393.swift index 5306ef43f8654..984d05da5a918 100644 --- a/validation-test/IRGen/issue-49393.swift +++ b/validation-test/IRGen/issue-49393.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend -target %target-swift-abi-5.8-triple -emit-ir %s -module-name M -import-objc-header %S/Inputs/issue-49393.h | %FileCheck %s --check-prefix=CHECK-%is-darwin --check-prefix=CHECK +// RUN: %target-swift-frontend %use_no_opaque_pointers -target %target-swift-abi-5.8-triple -emit-ir %s -module-name M -import-objc-header %S/Inputs/issue-49393.h | %FileCheck %s --check-prefix=CHECK-%is-darwin --check-prefix=CHECK +// RUN: %target-swift-frontend -target %target-swift-abi-5.8-triple -emit-ir %s -module-name M -import-objc-header %S/Inputs/issue-49393.h // REQUIRES: objc_interop // https://github.com/apple/swift/issues/49393 diff --git a/validation-test/IRGen/pack_stack_metadata_alloc_loop.sil b/validation-test/IRGen/pack_stack_metadata_alloc_loop.sil index 87043145341f3..20d812ff63cc4 100644 --- a/validation-test/IRGen/pack_stack_metadata_alloc_loop.sil +++ b/validation-test/IRGen/pack_stack_metadata_alloc_loop.sil @@ -1,5 +1,6 @@ // RUN: %target-run-simple-swift(-parse-sil -Xfrontend -enable-pack-metadata-stack-promotion=true) -// RUN: %target-swift-frontend -parse-sil -enable-pack-metadata-stack-promotion=true -emit-ir -primary-file %s | %IRGenFileCheck %s +// RUN: %target-swift-frontend %use_no_opaque_pointers -parse-sil -enable-pack-metadata-stack-promotion=true -emit-ir -primary-file %s | %IRGenFileCheck %s +// RUN: %target-swift-frontend -parse-sil -enable-pack-metadata-stack-promotion=true -emit-ir -primary-file %s // REQUIRES: executable_test