From 3b04d1b013bee788015c1d214ad7f130f497433a Mon Sep 17 00:00:00 2001 From: Dmitri Hrybenko Date: Mon, 19 Jan 2015 06:52:49 +0000 Subject: [PATCH] tests: reorganize tests so that they actually use the target platform Most tests were using %swift or similar substitutions, which did not include the target triple and SDK. The driver was defaulting to the host OS. Thus, we could not run the tests when the standard library was not built for OS X. Swift SVN r24504 --- test/1_stdlib/ArrayDiagnostics.swift | 2 +- test/1_stdlib/CharacterTypes.swift | 2 +- test/1_stdlib/RangeDiagnostics.swift | 2 +- test/1_stdlib/StringDiagnostics.swift | 2 +- test/1_stdlib/UnicodeScalarDiagnostics.swift | 2 +- .../basicDeclarations.swift | 2 +- test/BuildConfigurations/basicIdentity.swift | 24 +- .../basicParseErrors.swift | 2 +- .../decl_parse_errors.swift | 2 +- .../module_top_level.swift | 2 +- .../no_configuration_error1.swift | 2 +- .../no_configuration_error2.swift | 2 +- .../pound-if-inside-function-2.swift | 2 +- .../pound-if-inside-function-3.swift | 2 +- .../pound-if-inside-function-4.swift | 2 +- .../pound-if-inside-function.swift | 2 +- .../pound-if-inside-statement-2.swift | 2 +- .../pound-if-inside-statement.swift | 2 +- .../pound-if-top-level-clean.swift | 2 +- .../pound-if-top-level.swift | 2 +- .../topLevelDeclarations.swift | 2 +- .../trailingClosureOnTargetConfig.swift | 8 +- test/ClangModules/CoreServices_test.swift | 2 +- test/ClangModules/Darwin_test.swift | 2 +- .../MixedSource/broken-modules.swift | 8 +- .../MixedSource/import-mixed-framework.swift | 8 +- .../import-mixed-with-header-twice.swift | 8 +- .../import-mixed-with-header.swift | 6 +- .../MixedSource/mixed-nsuinteger.swift | 2 +- .../mixed-target-using-header.swift | 2 +- .../mixed-target-using-module.swift | 6 +- .../MixedSource/resolve-cross-language.swift | 4 +- test/ClangModules/Security_test.swift | 2 +- .../accessibility_framework.swift | 4 +- test/ClangModules/adapter.swift | 2 +- test/ClangModules/autolinking.swift | 6 +- test/ClangModules/availability.swift | 6 +- .../availability_app_extension.swift | 2 +- test/ClangModules/availability_ios.swift | 2 +- test/ClangModules/availability_macosx.swift | 10 + test/ClangModules/blocks_parse.swift | 2 +- test/ClangModules/broken-modules.swift | 2 +- test/ClangModules/cf.swift | 2 +- test/ClangModules/cfuncs_ir.swift | 4 +- test/ClangModules/cfuncs_parse.swift | 2 +- test/ClangModules/clang_builtin.swift | 2 +- test/ClangModules/cstring_parse.swift | 2 +- test/ClangModules/ctypes_ir.swift | 4 +- test/ClangModules/ctypes_parse.swift | 15 +- test/ClangModules/ctypes_parse_macosx.swift | 15 + test/ClangModules/ctypes_parse_union.swift | 2 +- test/ClangModules/custom-include.swift | 2 +- test/ClangModules/cvars_ir.swift | 4 +- test/ClangModules/cvars_parse.swift | 2 +- test/ClangModules/diags_from_module.swift | 4 +- test/ClangModules/macros.swift | 2 +- test/ClangModules/mapped-integers.swift.gyb | 2 +- test/ClangModules/missing-adapter.swift | 6 +- test/ClangModules/no-sdk.swift | 2 +- test/ClangModules/non-modular-include.swift | 2 +- test/ClangModules/nullability.swift | 2 +- .../ClangModules/objc_bridge_categories.swift | 2 +- test/ClangModules/objc_bridging.swift | 2 +- .../ClangModules/objc_bridging_generics.swift | 2 +- test/ClangModules/objc_diags.swift | 11 +- test/ClangModules/objc_factory_method.swift | 2 +- test/ClangModules/objc_failable_inits.swift | 2 +- .../objc_implicit_properties.swift | 2 +- test/ClangModules/objc_implicit_with.swift | 2 +- test/ClangModules/objc_init.swift | 5 +- test/ClangModules/objc_init_conformance.swift | 2 +- test/ClangModules/objc_ir.swift | 4 +- test/ClangModules/objc_ns_enum.swift | 4 +- test/ClangModules/objc_ns_enum_aliases.swift | 2 +- test/ClangModules/objc_ns_options.swift | 4 +- test/ClangModules/objc_nsmanagedobject.swift | 2 +- test/ClangModules/objc_override.swift | 2 +- test/ClangModules/objc_parse.swift | 2 +- test/ClangModules/objc_parse_split.swift | 2 +- test/ClangModules/objc_proxies.swift | 2 +- test/ClangModules/optional.swift | 2 +- .../protocol_metatype_object_conversion.swift | 2 +- test/ClangModules/script.swift | 2 +- test/ClangModules/sdk-protocol-class.swift | 8 +- test/ClangModules/sdk.swift | 2 +- test/ClangModules/serialization.swift | 4 +- test/ClangModules/swift_modules.swift | 4 +- test/ClangModules/uikit_hacks.swift | 7 +- test/Constraints/array_literal.swift | 2 +- test/Constraints/assignment.swift | 2 +- test/Constraints/associated_self_types.swift | 2 +- test/Constraints/associated_types.swift | 2 +- test/Constraints/bridging.swift | 3 +- test/Constraints/casts.swift | 2 +- test/Constraints/class.swift | 2 +- test/Constraints/closures.swift | 2 +- test/Constraints/condition.swift | 2 +- test/Constraints/construction.swift | 2 +- test/Constraints/default_literals.swift | 2 +- test/Constraints/diag_ambiguities.swift | 2 +- .../Constraints/diag_ambiguities_module.swift | 4 +- test/Constraints/diagnostics.swift | 2 +- test/Constraints/dictionary_literal.swift | 2 +- test/Constraints/dynamic_lookup.swift | 2 +- test/Constraints/fixes.swift | 2 +- test/Constraints/function.swift | 2 +- .../generic_construction_deduction.swift | 2 +- test/Constraints/generic_overload.swift | 2 +- .../generic_protocol_witness.swift | 2 +- test/Constraints/generics.swift | 2 +- test/Constraints/if_expr.swift | 2 +- .../Constraints/incomplete_function_ref.swift | 2 +- .../invalid_archetype_constraint.swift | 2 +- .../invalid_constraint_lookup.swift | 2 +- .../invalid_logicvalue_coercion.swift | 2 +- test/Constraints/invalid_stdlib.swift | 2 +- test/Constraints/invalid_stdlib_2.swift | 2 +- test/Constraints/keyword_arguments.swift | 2 +- test/Constraints/lvalues.swift | 2 +- test/Constraints/members.swift | 2 +- test/Constraints/metatypes.swift | 2 +- test/Constraints/nested_generics.swift | 2 +- test/Constraints/optional.swift | 2 +- test/Constraints/overload.swift | 2 +- test/Constraints/patterns.swift | 2 +- test/Constraints/protocols.swift | 2 +- test/Constraints/ranking.swift | 2 +- .../recursive_concrete_constraints.swift | 2 +- test/Constraints/same_types.swift | 2 +- test/Constraints/subscript.swift | 2 +- test/Constraints/super_constructor.swift | 2 +- test/Constraints/super_method.swift | 2 +- test/Constraints/tuple.swift | 2 +- test/Constraints/unchecked_optional.swift | 2 +- test/Constraints/unconstrained_generic.swift | 3 +- test/DebugInfo/ASTSection_linker.swift | 2 +- test/DebugInfo/Constructors.swift | 2 +- test/DebugInfo/Destructors.swift | 5 +- test/DebugInfo/DynamicSelf.swift | 3 +- test/DebugInfo/GlobalMetatype.swift | 3 +- test/DebugInfo/Imports.swift | 6 +- test/DebugInfo/LinetableArtificialFn.swift | 6 +- test/DebugInfo/PrivateDiscriminator.swift | 4 +- test/DebugInfo/ProtocolContainer.swift | 5 +- test/DebugInfo/accessors.swift | 2 +- test/DebugInfo/alloca-init.swift | 3 +- test/DebugInfo/anonymous.swift | 3 +- test/DebugInfo/any.swift | 5 +- test/DebugInfo/apple-types-accel.swift | 7 +- test/DebugInfo/archetype.swift | 2 +- test/DebugInfo/archetypes2.swift | 3 +- test/DebugInfo/argument.swift | 2 +- test/DebugInfo/attributes.swift | 2 +- test/DebugInfo/atype.swift | 3 +- test/DebugInfo/autoclosure.swift | 3 +- test/DebugInfo/basic.swift | 24 +- test/DebugInfo/bool.swift | 3 +- test/DebugInfo/bound-namealiastype.swift | 2 +- test/DebugInfo/byref-capture.swift | 3 +- test/DebugInfo/callexpr.swift | 3 +- test/DebugInfo/closure-args.swift | 13 +- test/DebugInfo/closure-args2.swift | 3 +- test/DebugInfo/closure-multivalue.swift | 10 +- test/DebugInfo/closure.swift | 2 +- test/DebugInfo/dynamic_layout.swift | 3 +- test/DebugInfo/enum.swift | 7 +- test/DebugInfo/fnptr.swift | 2 +- test/DebugInfo/generic_arg2.swift | 5 +- test/DebugInfo/generic_args.swift | 3 +- test/DebugInfo/generic_enum.swift | 3 +- test/DebugInfo/generic_enum_closure.swift | 3 +- test/DebugInfo/hello.swift | 6 +- test/DebugInfo/if-branchlocations.swift | 3 +- test/DebugInfo/implicitdecl.swift | 6 +- test/DebugInfo/implicitreturn.swift | 3 +- test/DebugInfo/initializer.swift | 2 +- test/DebugInfo/inlinescopes.swift | 16 +- test/DebugInfo/inout.swift | 5 +- test/DebugInfo/inout2.swift | 4 +- test/DebugInfo/iteration.swift | 5 +- test/DebugInfo/iuo_arg.swift | 6 +- test/DebugInfo/let.swift | 3 +- test/DebugInfo/letclause.swift | 3 +- test/DebugInfo/letstring.swift | 5 +- test/DebugInfo/line-directive.swift | 2 +- test/DebugInfo/linetable-cleanups.swift | 2 +- test/DebugInfo/linetable.swift | 4 +- test/DebugInfo/mangling.swift | 2 +- test/DebugInfo/multi-file.swift | 8 +- test/DebugInfo/nested_functions.swift | 3 +- test/DebugInfo/nostorage.swift | 3 +- test/DebugInfo/patternmatching.swift | 9 +- test/DebugInfo/pcomp.swift | 2 +- test/DebugInfo/prologue.swift | 5 +- test/DebugInfo/protocol.swift | 8 +- test/DebugInfo/protocolarg.swift | 3 +- test/DebugInfo/return.swift | 6 +- test/DebugInfo/returnlocation.swift | 62 +-- test/DebugInfo/scopes.swift | 3 +- test/DebugInfo/sdk.swift | 4 +- test/DebugInfo/self.swift | 11 +- test/DebugInfo/shadow_copies.swift | 11 +- test/DebugInfo/shadowcopy-linetable.swift | 7 +- test/DebugInfo/simple.sil | 2 +- test/DebugInfo/structs.swift | 4 +- test/DebugInfo/test-foundation.swift | 12 +- test/DebugInfo/test_ints.swift | 2 +- test/DebugInfo/top_level_code.swift | 7 +- test/DebugInfo/top_level_var.swift | 5 +- test/DebugInfo/trap-optimized.swift | 2 +- test/DebugInfo/trap.swift | 2 +- test/DebugInfo/typealias.swift | 3 +- test/DebugInfo/typearg.swift | 4 +- test/DebugInfo/unowned-capture.swift | 3 +- test/DebugInfo/variables.swift | 6 +- test/Demangle/lookup.swift | 42 +- test/Driver/color-diagnostics.swift | 2 +- test/Driver/debug-output.swift | 2 +- test/Driver/dump-parse.swift | 4 +- test/Driver/emit-objc-header.swift | 4 +- test/Driver/multiple_input.swift | 6 +- test/Driver/options.swift | 28 +- test/Driver/output.swift | 14 +- test/Driver/sdk-link.swift | 2 +- test/Driver/temp-files.swift | 12 +- test/Frontend/InternalChecks.swift | 4 +- ...timizationOptions-with-stdlib-checks.swift | 6 +- ...izationOptions-without-stdlib-checks.swift | 6 +- test/Frontend/dependencies.swift | 12 +- test/Generics/algorithms.swift | 2 +- .../associated_self_constraints.swift | 2 +- test/Generics/associated_type_typo.swift | 4 +- test/Generics/associated_types.swift | 2 +- test/Generics/associated_types_inherit.swift | 2 +- .../associated_types_multi_file.swift | 2 +- .../constrained_optional_params.swift | 2 +- test/Generics/deduction.swift | 2 +- test/Generics/existential_restrictions.swift | 2 +- test/Generics/function_decls.swift | 2 +- test/Generics/function_defs.swift | 2 +- test/Generics/generic_types.swift | 2 +- test/Generics/inheritance.swift | 2 +- test/Generics/non_generic_derived_class.swift | 2 +- test/Generics/requirement_inference.swift | 4 +- test/Generics/same_type_constraints.swift | 2 +- test/Generics/slice_test.swift | 2 +- test/Generics/unbound.swift | 2 +- test/IDE/annotation.swift | 2 +- test/IDE/coloring.swift | 4 +- test/IDE/coloring_configs.swift | 2 +- test/IDE/comment_attach.swift | 2 +- test/IDE/comment_attach_huge.swift | 2 +- test/IDE/comment_brief.swift | 2 +- test/IDE/comment_merge.swift | 2 +- test/IDE/comment_to_xml.swift | 4 +- test/IDE/complete_after_self.swift | 16 +- test/IDE/complete_after_super.swift | 38 +- test/IDE/complete_associated_types.swift | 14 +- test/IDE/complete_at_eof_1.swift | 2 +- test/IDE/complete_at_eof_no_newline_1.swift | 2 +- test/IDE/complete_at_eof_no_newline_2.swift | 2 +- test/IDE/complete_at_start_1.swift | 2 +- test/IDE/complete_at_top_level.swift | 46 +-- test/IDE/complete_attributes.swift | 4 +- test/IDE/complete_constructor.swift | 22 +- test/IDE/complete_crashes.swift | 8 +- test/IDE/complete_default_arguments.swift | 12 +- test/IDE/complete_dynamic_lookup.swift | 32 +- test/IDE/complete_enum_elements.swift | 40 +- test/IDE/complete_expr_postfix_begin.swift | 60 +-- test/IDE/complete_expr_tuple.swift | 14 +- test/IDE/complete_from_clang_framework.swift | 22 +- ...ete_from_clang_framework_typechecker.swift | 2 +- ...mplete_from_clang_importer_framework.swift | 2 +- .../complete_from_foundation_overlay.swift | 7 +- test/IDE/complete_from_reexport.swift | 6 +- test/IDE/complete_from_stdlib.swift | 4 +- test/IDE/complete_from_swift_module.swift | 18 +- .../IDE/complete_func_body_typechecking.swift | 40 +- test/IDE/complete_func_no_closing_brace.swift | 2 +- ...plete_func_no_closing_brace_at_eof_1.swift | 2 +- ...plete_func_no_closing_brace_at_eof_2.swift | 2 +- ...plete_func_no_closing_brace_at_eof_3.swift | 2 +- test/IDE/complete_in_accessors.swift | 88 ++-- test/IDE/complete_in_closures.swift | 76 ++-- test/IDE/complete_in_enum_decl.swift | 12 +- test/IDE/complete_init_inherited.swift | 8 +- test/IDE/complete_keywords.swift | 32 +- ...ember_decls_from_parent_decl_context.swift | 64 +-- test/IDE/complete_members_optional.swift | 6 +- test/IDE/complete_multiple_files.swift | 6 +- test/IDE/complete_name_lookup.swift | 4 +- test/IDE/complete_not_recommended.swift | 2 +- test/IDE/complete_overridden_decls.swift | 8 +- test/IDE/complete_override.swift | 38 +- .../complete_override_access_control.swift | 26 +- test/IDE/complete_override_objc.swift | 2 +- test/IDE/complete_pattern.swift | 30 +- test/IDE/complete_repl_empty_file.swift | 2 +- .../complete_repl_identifier_prefix_1.swift | 2 +- test/IDE/complete_repl_in_func_1.swift | 2 +- test/IDE/complete_return.swift | 6 +- test/IDE/complete_stdlib_builtin.swift | 4 +- test/IDE/complete_stdlib_optional.swift | 34 +- test/IDE/complete_stmt_controlling_expr.swift | 94 ++--- test/IDE/complete_type.swift | 160 ++++---- test/IDE/complete_type_in_func_param.swift | 84 ++-- test/IDE/complete_unicode.swift | 2 +- test/IDE/complete_unwrapping_if_while.swift | 32 +- test/IDE/complete_value_expr.swift | 206 +++++----- test/IDE/complete_vararg.swift | 24 +- test/IDE/complete_weak.swift | 10 +- test/IDE/complete_with_closure_param.swift | 2 +- test/IDE/complete_with_header_import.swift | 4 +- test/IDE/complete_with_multiple_imports.swift | 2 +- test/IDE/module_api_smoketest.swift | 2 +- test/IDE/print_ast_non_typechecked.swift | 2 +- test/IDE/print_ast_overlay.swift | 8 +- test/IDE/print_ast_tc_decls.swift | 16 +- test/IDE/print_ast_tc_decls_errors.swift | 6 +- test/IDE/print_ast_tc_function_bodies.swift | 6 +- test/IDE/print_clang_decls.swift | 44 +- test/IDE/print_clang_decls_AppKit.swift | 43 ++ test/IDE/print_clang_framework.swift | 21 +- test/IDE/print_module_comments.swift | 4 +- test/IDE/print_stdlib.swift | 6 +- test/IDE/print_types.swift | 6 +- test/IDE/print_usrs.swift | 4 +- test/IDE/print_usrs_invalid.swift | 2 +- test/IDE/sdk_sugar.swift | 3 +- test/IRGen/Inputs/ObjectiveC.swift | 27 +- test/IRGen/abitypes.swift | 58 +-- test/IRGen/alloc.sil | 10 +- test/IRGen/array_value_witnesses.sil | 8 +- test/IRGen/asmname.swift | 4 +- test/IRGen/assert_conf_default.sil | 6 +- test/IRGen/associated_types.swift | 5 +- test/IRGen/autorelease.sil | 2 +- test/IRGen/bitcast.sil | 55 ++- test/IRGen/bitcast_different_size.sil | 4 +- test/IRGen/bitcast_specialization.swift | 2 +- test/IRGen/boxes.sil | 20 +- test/IRGen/bridge_object.sil | 6 +- test/IRGen/builtin_word.sil | 3 +- test/IRGen/builtins.swift | 4 +- test/IRGen/c_function_pointer.sil | 4 +- test/IRGen/c_layout.sil | 4 +- test/IRGen/casts.sil | 8 +- test/IRGen/cf.sil | 12 +- test/IRGen/clang_inline.swift | 16 +- test/IRGen/clang_inline_reverse.swift | 13 +- test/IRGen/class.sil | 9 +- test/IRGen/class_bounded_generics.swift | 4 +- test/IRGen/class_isa_pointers.sil | 5 +- test/IRGen/class_with_stub_initializers.swift | 4 +- test/IRGen/closure.swift | 4 +- test/IRGen/deallocate.swift | 5 +- test/IRGen/decls.swift | 8 +- test/IRGen/dependent_reabstraction.swift | 2 +- test/IRGen/dynamic_cast.sil | 18 +- test/IRGen/dynamic_init.sil | 5 +- test/IRGen/dynamic_lookup.sil | 13 +- test/IRGen/dynamic_self.sil | 5 +- test/IRGen/dynamic_self_metadata.swift | 4 +- test/IRGen/empty_array.sil | 21 +- test/IRGen/empty_objc_ivar.swift | 2 +- test/IRGen/enum.sil | 4 +- test/IRGen/enum_32_bit.sil | 5 +- test/IRGen/enum_function.sil | 4 +- test/IRGen/enum_function_payload.swift | 2 +- test/IRGen/enum_pack.sil | 2 +- test/IRGen/enum_spare_bits.sil | 20 +- test/IRGen/enum_value_semantics.sil | 4 +- .../enum_value_semantics_special_cases.sil | 4 +- test/IRGen/exactcast.sil | 4 +- test/IRGen/exactcast2.sil | 1 + test/IRGen/existential_metatypes.swift | 4 +- test/IRGen/existentials.sil | 4 +- test/IRGen/expressions.swift | 4 +- test/IRGen/field_type_vectors.sil | 4 +- test/IRGen/fixlifetime.sil | 6 +- test/IRGen/foreign_class_extension.swift | 4 +- test/IRGen/fulfillment.sil | 4 +- test/IRGen/function_metadata.swift | 4 +- test/IRGen/function_types.sil | 10 +- test/IRGen/generic_casts.swift | 5 +- test/IRGen/generic_class_anyobject.swift | 5 +- test/IRGen/generic_classes.sil | 6 +- test/IRGen/generic_classes_objc.sil | 5 +- .../generic_classes_osx_iphonesimulator.sil | 83 ++++ test/IRGen/generic_metatypes.swift | 24 +- test/IRGen/generic_same_type.swift | 4 +- test/IRGen/generic_structs.sil | 4 +- test/IRGen/generic_ternary.swift | 4 +- test/IRGen/generic_tuples.swift | 6 +- test/IRGen/generic_types.swift | 12 +- test/IRGen/globals.swift | 4 +- test/IRGen/indexing.sil | 4 +- test/IRGen/indirect_return.swift | 4 +- test/IRGen/infinite_archetype.swift | 4 +- test/IRGen/lazy_globals.swift | 4 +- test/IRGen/lazy_multi_file.swift | 4 +- test/IRGen/lifetime.sil | 4 +- test/IRGen/lit.local.cfg | 4 +- test/IRGen/literals.sil | 4 +- test/IRGen/mangle-anonclosure.swift | 4 +- test/IRGen/metatype.sil | 4 +- test/IRGen/metatype_casts.sil | 4 +- test/IRGen/method_linkage.swift | 2 +- ...xed_objc_native_protocol_constraints.swift | 2 +- test/IRGen/noinline.swift | 2 +- test/IRGen/nondominant.sil | 4 +- test/IRGen/objc.swift | 4 +- test/IRGen/objc_attr_NSManaged.sil | 6 +- test/IRGen/objc_block.sil | 4 +- test/IRGen/objc_block_storage.sil | 4 +- test/IRGen/objc_bridge.swift | 4 +- test/IRGen/objc_class_export.swift | 9 +- test/IRGen/objc_class_property.swift | 5 +- test/IRGen/objc_dealloc.sil | 4 +- test/IRGen/objc_extensions.swift | 4 +- test/IRGen/objc_factory_method.sil | 4 +- test/IRGen/objc_implicit_with.sil | 4 +- test/IRGen/objc_local.swift | 8 +- test/IRGen/objc_methods.swift | 5 +- test/IRGen/objc_methods_split.swift | 5 +- test/IRGen/objc_ns_enum.swift | 4 +- test/IRGen/objc_pointers.swift | 4 +- test/IRGen/objc_properties.swift | 5 +- test/IRGen/objc_properties_imported.swift | 5 +- test/IRGen/objc_property_attrs.swift | 5 +- test/IRGen/objc_protocol_conversion.sil | 5 +- .../objc_protocol_extended_method_types.swift | 5 +- test/IRGen/objc_protocol_multi_file.swift | 3 +- test/IRGen/objc_protocols.swift | 6 +- test/IRGen/objc_remapped_inits.swift | 8 +- test/IRGen/objc_structs.swift | 5 +- test/IRGen/objc_subclass.swift | 383 ++++++++++++------ test/IRGen/objc_subscripts.swift | 5 +- test/IRGen/objc_super.swift | 5 +- test/IRGen/objc_type_encoding.swift | 6 +- test/IRGen/ordering.sil | 7 +- test/IRGen/partial_apply.sil | 5 +- test/IRGen/partial_apply_generic.swift | 5 +- test/IRGen/pic.swift | 4 +- test/IRGen/playground.swift | 5 +- test/IRGen/protocol_conformance_records.swift | 5 +- test/IRGen/protocol_metadata.swift | 4 +- test/IRGen/rdar15304329.swift | 2 +- test/IRGen/select_enum.sil | 14 +- test/IRGen/select_enum_optimized.swift | 2 +- test/IRGen/sil_generic_witness_methods.swift | 4 +- test/IRGen/sil_irgen_library.swift | 2 +- test/IRGen/sil_irgen_standalone.swift | 2 +- test/IRGen/sil_linkage.sil | 2 +- test/IRGen/sil_witness_methods.sil | 4 +- test/IRGen/sil_witness_tables.swift | 6 +- ..._witness_tables_external_conformance.swift | 2 +- ...witness_tables_external_witnesstable.swift | 4 +- test/IRGen/static_initializer.sil | 4 +- test/IRGen/subclass.swift | 9 +- test/IRGen/typemetadata.sil | 4 +- test/IRGen/unconditional_checked_cast.sil | 4 +- test/IRGen/undef.sil | 4 +- test/IRGen/unimplemented_enums.sil | 2 +- .../unimplemented_objc_generic_class.swift | 3 +- test/IRGen/unowned.sil | 4 +- test/IRGen/unused.sil | 4 +- test/IRGen/upcast.sil | 2 +- test/IRGen/value_buffers.sil | 4 +- test/IRGen/vector_reduction.swift | 6 +- test/IRGen/vtable.sil | 7 +- test/IRGen/vtable_multi_file.swift | 4 +- test/IRGen/weak.sil | 4 +- test/IRGen/weak_class_protocol.sil | 4 +- test/IRGen/weak_import.swift | 13 +- test/IRGen/weak_value_witnesses.sil | 4 +- test/IRGen/witness_method.sil | 7 +- .../usr/include/Foundation.h | 4 +- test/Interpreter/SDK/autorelease.swift | 2 +- test/Interpreter/complex.swift | 2 +- test/Interpreter/import.swift | 2 +- .../interpret_load_framework.swift | 2 + test/Interpreter/process_arguments.swift | 2 + test/Interpreter/protocol_lookup.swift | 4 +- test/Interpreter/protocol_lookup_jit.swift | 1 + test/Interpreter/shebang.swift | 2 + test/Misc/expression_too_complex.swift | 2 +- test/Misc/fatal_error.swift | 4 +- test/Misc/misc_diagnostics.swift | 3 +- .../opt-debug-forbid-typecheck-prefix.swift | 16 +- test/Misc/serialized-diagnostics.swift | 4 +- test/NameBinding/MutualDependency.swift | 8 +- test/NameBinding/accessibility.swift | 10 +- .../debug-client-discriminator.swift | 8 +- test/NameBinding/import-resolution-2.swift | 10 +- .../import-resolution-overload.swift | 8 +- test/NameBinding/import-resolution.swift | 16 +- test/NameBinding/import-specific-decl.swift | 10 +- test/NameBinding/import-specific-fixits.swift | 10 +- test/NameBinding/library.swift | 2 +- test/NameBinding/multi-file-with-main.swift | 2 +- test/NameBinding/multi-file.swift | 2 +- test/NameBinding/name-binding.swift | 2 +- test/NameBinding/name_lookup.swift | 2 +- ...eference-dependencies-dynamic-lookup.swift | 2 +- test/NameBinding/reference-dependencies.swift | 2 +- test/NameBinding/stdlib-case-sensitive.swift | 4 +- test/NameBinding/stdlib.swift | 2 +- test/Parse/BOM.swift | 2 +- .../EOF/block-comment-missing-newline.swift | 2 +- test/Parse/EOF/block-comment-nested.swift | 2 +- test/Parse/EOF/block-comment.swift | 2 +- .../EOF/interpolated-string-literal.swift | 2 +- test/Parse/EOF/unfinished-for-at-eof.swift | 2 +- .../unterminated-character-literal-1.swift | 2 +- .../unterminated-character-literal-2.swift | 2 +- ...ed-character-literal-missing-newline.swift | 2 +- ...nated-string-literal-missing-newline.swift | 2 +- test/Parse/availability_query.swift | 4 +- test/Parse/brace_recovery_eof.swift | 2 +- test/Parse/builtin_bridge_object.swift | 2 +- test/Parse/builtin_word.swift | 2 +- test/Parse/consecutive_statements.swift | 2 +- test/Parse/debugger.swift | 2 +- test/Parse/debugger_parse_only.swift | 2 +- ...diagnostic_points_to_first_bad_token.swift | 2 +- test/Parse/enum.swift | 7 +- test/Parse/escaped_identifiers.swift | 2 +- test/Parse/foreach.swift | 2 +- test/Parse/form_feed_char.swift | 2 +- test/Parse/generic_disambiguation.swift | 3 +- test/Parse/hashbang_library.swift | 2 +- test/Parse/hashbang_main.swift | 2 +- test/Parse/identifiers.swift | 2 +- test/Parse/if_expr.swift | 2 +- test/Parse/implicit_getter_incomplete.swift | 2 +- test/Parse/init_deinit.swift | 2 +- test/Parse/invalid-utf8.swift | 2 +- test/Parse/invalid.swift | 2 +- test/Parse/invalid_if_expr.swift | 2 +- test/Parse/invalid_nested_types.swift | 2 +- test/Parse/keyword_in_pattern_recovery.swift | 2 +- test/Parse/line-directive.swift | 3 +- test/Parse/matching_patterns.swift | 2 +- test/Parse/metatype_object_conversion.swift | 2 +- test/Parse/objc_enum.swift | 2 +- test/Parse/operator_decl.swift | 2 +- test/Parse/operators.swift | 2 +- test/Parse/optional.swift | 2 +- test/Parse/optional_chain_lvalues.swift | 2 +- test/Parse/optional_lvalues.swift | 2 +- test/Parse/pattern_without_variables.swift | 2 +- .../pattern_without_variables_script.swift | 2 +- test/Parse/playground_lvalues.swift | 2 +- test/Parse/pointer_conversion.swift | 2 +- test/Parse/recovery.swift | 2 +- test/Parse/recovery_library.swift | 2 +- test/Parse/self_keyword_recovery.swift | 2 +- test/Parse/strange-characters.swift | Bin 271 -> 273 bytes test/Parse/subscripting.swift | 3 +- test/Parse/super.swift | 2 +- test/Parse/switch.swift | 2 +- test/Parse/switch_incomplete.swift | 2 +- test/Parse/toplevel_library.swift | 2 +- test/Parse/toplevel_library_invalid.swift | 2 +- test/Parse/trailing-semi.swift | 2 +- test/Parse/type_expr.swift | 2 +- test/Parse/typealias.swift | 2 +- test/Parse/unsupported_nested_generics.swift | 2 +- ...nsupported_recursive_local_functions.swift | 2 +- test/PlaygroundTransform/array.swift | 1 + test/PlaygroundTransform/control-flow.swift | 1 + test/PlaygroundTransform/declarations.swift | 1 + .../declarations_error.swift | 2 +- .../disable_transform_only.swift | 1 + test/PlaygroundTransform/import_error.swift | 3 +- test/PlaygroundTransform/init.swift | 1 + test/PlaygroundTransform/mutation.swift | 1 + test/PrintAsObjC/accessibility.swift | 4 +- test/PrintAsObjC/blocks.swift | 4 +- test/PrintAsObjC/classes.swift | 4 +- test/PrintAsObjC/classes_objc_generics.swift | 4 +- test/PrintAsObjC/comments.swift | 4 +- test/PrintAsObjC/empty.swift | 2 +- test/PrintAsObjC/enums.swift | 4 +- test/PrintAsObjC/extensions.swift | 4 +- test/PrintAsObjC/imports.swift | 4 +- test/PrintAsObjC/local-types.swift | 4 +- test/PrintAsObjC/mixed-framework-fwd.swift | 8 +- test/PrintAsObjC/mixed-framework.swift | 4 +- test/PrintAsObjC/pragma-clang.swift | 2 +- test/PrintAsObjC/protocols.swift | 4 +- test/SIL/Parser/apply_with_conformance.sil | 2 +- test/SIL/Parser/apply_with_substitution.sil | 2 +- test/SIL/Parser/available.sil | 1 + test/SIL/Parser/basic.sil | 2 +- test/SIL/Parser/basic_objc.sil | 4 +- test/SIL/Parser/bound_generic.sil | 2 +- test/SIL/Parser/enum_in_class.sil | 2 +- test/SIL/Parser/errors.sil | 2 +- test/SIL/Parser/generics.sil | 2 +- test/SIL/Parser/global_init_attribute.sil | 2 +- test/SIL/Parser/overloaded_member.sil | 3 +- test/SIL/Parser/polymorphic_function.sil | 3 +- .../Parser/projection_lowered_type_parse.sil | 2 +- test/SIL/Parser/protocol_getter.sil | 2 +- test/SIL/Parser/self_substitution.sil | 2 +- test/SIL/Parser/static_initializer.sil | 2 +- test/SIL/Parser/stored_property.sil | 2 +- test/SIL/Parser/string_literal.sil | 2 +- test/SIL/Parser/unmanaged.sil | 2 +- test/SIL/Parser/where_clause.sil | 2 +- test/SIL/Parser/witness_bug.sil | 3 +- .../Parser/witness_protocol_from_import.sil | 2 +- test/SIL/Parser/witness_specialize.sil | 2 +- test/SIL/Parser/witness_tables.sil | 2 +- test/SIL/Parser/witness_with_inherited_gp.sil | 3 +- test/SIL/Serialization/deserialize_appkit.sil | 1 + .../deserialize_coregraphics.swift | 1 + test/SIL/Serialization/deserialize_darwin.sil | 1 + .../Serialization/deserialize_foundation.sil | 1 + .../SIL/Serialization/deserialize_generic.sil | 1 + .../Serialization/deserialize_objectivec.sil | 1 + test/SIL/Serialization/effectsattr.sil | 1 + test/SIL/Serialization/lit.local.cfg | 7 - .../projection_lowered_type_parse.sil | 2 +- test/SIL/Serialization/public_external.sil | 2 +- .../shared_function_serialization.sil | 4 +- .../specializer_can_deserialize.swift | 4 +- test/SIL/Serialization/visibility.sil | 4 +- .../vtable_deserialization.swift | 4 +- test/SIL/Serialization/witness_tables.sil | 2 +- test/SIL/clone_select_switch_value.sil | 2 +- test/SIL/parse_swift_decls_in_sil_mode.sil | 2 +- test/SIL/printer_include_decls.swift | 4 +- test/SIL/unimplemented_initializer.swift | 4 +- test/SIL/verifier-fail-bb.sil | 2 +- test/SIL/verifier-fail-instruction.sil | 4 +- test/SIL/whole_module_optimization.swift | 5 +- test/SILAnalysis/DestructorAnalysis.swift | 2 +- test/SILAnalysis/alias-crash.sil | 2 +- test/SILAnalysis/basic-aa.sil | 3 +- test/SILAnalysis/typed-access-tb-aa.sil | 3 +- test/SILGen/Inputs/witness_tables_b.swift | 3 +- test/SILGen/NSApplicationMain.swift | 6 +- test/SILGen/UIApplicationMain.swift | 6 +- test/SILGen/accessibility_vtables.swift | 4 +- test/SILGen/accessors.swift | 2 +- test/SILGen/address_only_types.swift | 2 +- test/SILGen/addressors.swift | 4 +- test/SILGen/apply_abstraction_nested.swift | 3 +- test/SILGen/arguments.swift | 2 +- test/SILGen/array_literal_abstraction.swift | 2 +- test/SILGen/assignment.swift | 2 +- test/SILGen/auto_closures.swift | 2 +- .../auto_generated_super_init_call.swift | 2 +- test/SILGen/availability_optionals.swift | 4 +- test/SILGen/availability_query.swift | 4 +- test/SILGen/break_continue.swift | 2 +- test/SILGen/builtins.swift | 4 +- test/SILGen/call_chain_reabstraction.swift | 3 +- test/SILGen/capture_inout.swift | 2 +- test/SILGen/capture_typealias.swift | 2 +- test/SILGen/casts.swift | 2 +- test/SILGen/cf.swift | 4 +- test/SILGen/class_bound_protocols.swift | 2 +- test/SILGen/closure_inline_initializer.swift | 2 +- test/SILGen/closures.swift | 3 +- test/SILGen/collection_cast_crash.swift | 2 +- test/SILGen/collection_downcast.swift | 4 +- test/SILGen/collection_upcast.swift | 2 +- test/SILGen/complete_object_init.swift | 3 +- test/SILGen/conditionally_unreachable.swift | 10 +- test/SILGen/copy_lvalue_peepholes.swift | 2 +- test/SILGen/decls.swift | 2 +- test/SILGen/default_arguments.swift | 4 +- test/SILGen/default_arguments_generic.swift | 3 +- test/SILGen/default_constructor.swift | 4 +- test/SILGen/deinit_in_vtable.swift | 4 +- test/SILGen/dependent_member_lowering.swift | 2 +- test/SILGen/downcast_reabstraction.swift | 2 +- test/SILGen/dynamic.swift | 6 +- test/SILGen/dynamic_init.swift | 2 +- test/SILGen/dynamic_lookup.swift | 2 +- test/SILGen/dynamic_self.swift | 2 +- test/SILGen/effectsattr.swift | 2 +- test/SILGen/enum.swift | 2 +- test/SILGen/enum_derived.swift | 2 +- test/SILGen/erasure_reabstraction.swift | 2 +- test/SILGen/expressions.swift | 5 +- test/SILGen/extensions.swift | 2 +- test/SILGen/external_definitions.swift | 2 +- test/SILGen/failable_initializers.swift | 2 +- test/SILGen/final.swift | 2 +- test/SILGen/force_cast_chained_optional.swift | 2 +- test/SILGen/fragile_globals.swift | 6 +- test/SILGen/functions.swift | 2 +- test/SILGen/generic_casts.swift | 2 +- test/SILGen/generic_closures.swift | 2 +- test/SILGen/generic_literals.swift | 2 +- .../generic_property_base_lifetime.swift | 2 +- test/SILGen/generic_signatures.swift | 2 +- test/SILGen/generic_tuples.swift | 2 +- test/SILGen/generic_witness.swift | 2 +- test/SILGen/global_init_attribute.swift | 4 +- test/SILGen/guaranteed_self.swift | 2 +- test/SILGen/if_expr.swift | 2 +- test/SILGen/if_while_binding.swift | 2 +- .../implicitly_unwrapped_optional.swift | 2 +- test/SILGen/init_ref_delegation.swift | 2 +- test/SILGen/lazy_global_access.swift | 4 +- test/SILGen/lazy_globals.swift | 2 +- test/SILGen/let_decls.swift | 3 +- test/SILGen/lifetime.swift | 2 +- test/SILGen/lifetime_unions.swift | 2 +- test/SILGen/mangling.swift | 2 +- test/SILGen/mangling_ext_structA.swift | 4 +- test/SILGen/mangling_private.swift | 10 +- test/SILGen/materializeForSet.swift | 4 +- test/SILGen/metatype_abstraction.swift | 2 +- test/SILGen/metatype_casts.swift | 2 +- test/SILGen/metatype_object_conversion.swift | 4 +- test/SILGen/metatypes.swift | 2 +- test/SILGen/multi_file.swift | 2 +- test/SILGen/objc_attr_NSManaged.swift | 2 +- test/SILGen/objc_attr_NSManaged_multi.swift | 2 +- test/SILGen/objc_blocks_bridging.swift | 4 +- test/SILGen/objc_bridging.swift | 97 ++++- test/SILGen/objc_currying.swift | 4 +- test/SILGen/objc_dealloc.swift | 2 +- test/SILGen/objc_dictionary_bridging.swift | 4 +- test/SILGen/objc_enum.swift | 2 +- test/SILGen/objc_extensions.swift | 4 +- test/SILGen/objc_factory_method.swift | 6 +- test/SILGen/objc_final.swift | 4 +- test/SILGen/objc_generic_class.swift | 4 +- test/SILGen/objc_imported_init.swift | 4 +- test/SILGen/objc_init_ref_delegation.swift | 4 +- test/SILGen/objc_local.swift | 4 +- test/SILGen/objc_metatypes.swift | 4 +- test/SILGen/objc_nonnull_lie_hack.swift | 6 +- test/SILGen/objc_options.swift | 4 +- test/SILGen/objc_ownership_conventions.swift | 4 +- test/SILGen/objc_properties.swift | 4 +- test/SILGen/objc_protocols.swift | 4 +- test/SILGen/objc_set_bridging.swift | 5 +- test/SILGen/objc_subscript.swift | 4 +- test/SILGen/objc_super.swift | 4 +- test/SILGen/objc_thunks.swift | 8 +- test/SILGen/objc_witnesses.swift | 4 +- test/SILGen/optional-cast.swift | 2 +- test/SILGen/optional.swift | 2 +- test/SILGen/optional_lvalue.swift | 2 +- test/SILGen/partial_apply_generic.swift | 2 +- test/SILGen/pointer_conversion.swift | 2 +- test/SILGen/properties.swift | 2 +- test/SILGen/property_abstraction.swift | 2 +- test/SILGen/protocol_cast_toplevel.swift | 4 +- test/SILGen/protocol_class_refinement.swift | 2 +- test/SILGen/protocol_optional.swift | 2 +- test/SILGen/protocols.swift | 2 +- test/SILGen/reabstract.swift | 2 +- test/SILGen/required_init.swift | 2 +- test/SILGen/result_abstraction.swift | 2 +- test/SILGen/same_type_abstraction.swift | 2 +- test/SILGen/sil_locations.swift | 2 +- test/SILGen/sil_locations_top_level.swift | 2 +- test/SILGen/specialize_thunk.swift | 2 +- test/SILGen/statements.swift | 2 +- test/SILGen/super_class_method.swift | 2 +- test/SILGen/super_init_refcounting.swift | 2 +- test/SILGen/switch.swift | 2 +- test/SILGen/switch_abstraction.swift | 2 +- test/SILGen/switch_fallthrough.swift | 2 +- test/SILGen/switch_isa.swift | 2 +- test/SILGen/switch_objc.swift | 4 +- test/SILGen/switch_var.swift | 2 +- test/SILGen/toplevel.swift | 2 +- test/SILGen/transparent_attribute.swift | 2 +- test/SILGen/tuples.swift | 2 +- test/SILGen/types.swift | 2 +- test/SILGen/unicode_scalar_concat.swift | 2 +- test/SILGen/union.swift | 2 +- test/SILGen/unmanaged.swift | 2 +- test/SILGen/unowned.swift | 2 +- test/SILGen/unreachable_code.swift | 2 +- .../unsupported_recursive_value_type.swift | 2 +- test/SILGen/upcast_existential.swift | 2 +- test/SILGen/vtables.swift | 2 +- test/SILGen/weak.swift | 2 +- test/SILGen/witness_same_type.swift | 2 +- test/SILGen/witness_tables.swift | 5 +- test/SILGen/witnesses.swift | 2 +- test/SILGen/witnesses_class.swift | 2 +- test/SILGen/witnesses_inheritance.swift | 2 +- test/SILGen/witnesses_refinement.swift | 2 +- test/SILGen/writeback.swift | 2 +- .../writeback_conflict_diagnostics.swift | 2 +- test/SILPasses/abcopts.sil | 4 +- test/SILPasses/allocbox_to_stack.sil | 2 +- .../allocbox_to_stack_with_false.swift | 2 +- test/SILPasses/always_inline.sil | 2 +- test/SILPasses/array_mutable.swift | 2 +- test/SILPasses/assert_configuration.sil | 6 +- test/SILPasses/canonicalize_switch_enum.sil | 2 +- test/SILPasses/capture_promotion.sil | 2 +- test/SILPasses/capture_promotion.swift | 2 +- .../capture_promotion_reachability.sil | 2 +- test/SILPasses/capture_propagation.sil | 4 +- test/SILPasses/closure_specialize.sil | 2 +- test/SILPasses/closure_specialize_bug.sil | 3 +- test/SILPasses/closure_specialize_simple.sil | 2 +- test/SILPasses/codemotion.sil | 2 +- test/SILPasses/constant_propagation.sil | 4 +- test/SILPasses/constant_propagation2.sil | 3 +- test/SILPasses/copyforward.sil | 4 +- test/SILPasses/cse.sil | 2 +- test/SILPasses/cse_apply.sil | 3 +- test/SILPasses/dead_alloc_elim.sil | 2 +- test/SILPasses/dead_code_elimination.sil | 3 +- test/SILPasses/dead_func.swift | 3 +- .../SILPasses/dead_function_elimination.swift | 2 +- test/SILPasses/dead_inlined_func.swift | 5 +- test/SILPasses/dead_internal_func.swift | 1 - test/SILPasses/dead_method.swift | 2 +- test/SILPasses/dead_witness_module.swift | 4 +- test/SILPasses/definite_init.sil | 2 +- test/SILPasses/definite_init_crashes.sil | 2 +- .../SILPasses/definite_init_diagnostics.swift | 2 +- .../definite_init_failable_initializers.swift | 4 +- test/SILPasses/definite_init_hang.swift | 2 +- test/SILPasses/devirt_access.sil | 3 +- test/SILPasses/devirt_access.swift | 6 +- test/SILPasses/devirt_archetype_method.swift | 3 +- test/SILPasses/devirt_base_class.swift | 3 +- .../SILPasses/devirt_contravariant_args.swift | 2 +- test/SILPasses/devirt_covariant_return.swift | 2 +- test/SILPasses/devirt_ctors.sil | 3 +- test/SILPasses/devirt_default_case.swift | 3 +- .../devirt_inherited_conformance.swift | 2 +- test/SILPasses/devirt_jump_thread.sil | 2 +- test/SILPasses/devirt_override.sil | 2 +- .../devirt_protocol_method_invocations.swift | 3 +- ...evirt_single_module_in_multple_files.swift | 2 +- .../devirt_specialized_conformance.swift | 2 +- ...virt_specialized_inherited_interplay.swift | 2 +- test/SILPasses/devirt_type_subst_bug.swift | 3 +- test/SILPasses/devirtualize.sil | 3 +- test/SILPasses/devirtualize1.swift | 2 +- test/SILPasses/devirtualize2.sil | 3 +- test/SILPasses/devirtualize_cast.swift | 3 +- test/SILPasses/devirtualize_existential.swift | 3 +- test/SILPasses/diagnose_unreachable.sil | 2 +- .../diagnostic_constant_propagation.swift | 7 +- test/SILPasses/enum_jump_thread.sil | 2 +- test/SILPasses/external_defs_to_decls.sil | 4 +- test/SILPasses/functionsigopts.sil | 4 +- test/SILPasses/functionsigopts_sroa.sil | 2 +- ...lobal_arc_opts_layout_compatible_casts.sil | 2 +- test/SILPasses/global_arc_opts_loops.sil.gyb | 2 +- test/SILPasses/global_arc_unique_check.sil | 2 +- test/SILPasses/globalarcopts.sil | 2 +- .../globalarcopts_rcidentityanalysis.sil | 2 +- test/SILPasses/globalloadstoreopts.sil | 2 +- .../globalloadstoreopts_self_cycle_bug.sil | 4 +- test/SILPasses/globalopt.sil | 3 +- test/SILPasses/inline_addressor.swift | 2 +- test/SILPasses/inline_caches.sil | 2 +- test/SILPasses/inline_heuristics.sil | 4 +- test/SILPasses/inline_recursive.swift | 2 +- test/SILPasses/inline_semantics.sil | 3 +- test/SILPasses/inlinecaches_arc.sil | 3 +- test/SILPasses/inlinecaches_objc.sil | 3 +- test/SILPasses/inout_deshadow.sil | 2 +- .../inout_deshadow_integration.swift | 2 +- test/SILPasses/iv_info_printer.sil | 4 +- test/SILPasses/licm.sil | 2 +- test/SILPasses/linker.swift | 4 +- test/SILPasses/loop_info_printer.sil | 3 +- test/SILPasses/looprotate.sil | 4 +- test/SILPasses/loweraggregateinstrs.sil | 2 +- test/SILPasses/mandatory_inlining.sil | 2 +- test/SILPasses/mandatory_inlining.swift | 2 +- .../SILPasses/mandatory_inlining_circular.sil | 2 +- .../mandatory_inlining_circular.swift | 2 +- test/SILPasses/mem2reg.sil | 2 +- test/SILPasses/mem2reg_liveness.sil | 2 +- test/SILPasses/mem2reg_simple.sil | 3 +- test/SILPasses/mem2reg_unreachable.sil | 4 +- test/SILPasses/mm_inlinecaches_multiple.sil | 2 +- test/SILPasses/move_cond_fail.sil | 2 +- test/SILPasses/noreturn_folding.sil | 2 +- test/SILPasses/pa_removal.sil | 3 +- .../peephole_thick_to_objc_metatype.sil | 2 +- test/SILPasses/peephole_trunc_and_ext.sil | 3 +- test/SILPasses/performance_inliner.sil | 2 +- .../SILPasses/polymorphic_inline_caches.swift | 2 +- test/SILPasses/predictable_memopt.sil | 2 +- test/SILPasses/pure_apply.swift | 2 +- test/SILPasses/recursive_func.sil | 2 +- test/SILPasses/recursive_single.sil | 2 +- test/SILPasses/ref_elt_addr.sil | 3 +- test/SILPasses/remove_unused_func.sil | 2 +- test/SILPasses/return.swift | 2 +- .../select_enum_addr_reads_memory.sil | 2 +- test/SILPasses/sil_combine.sil | 2 +- test/SILPasses/sil_combine_devirt.sil | 2 +- test/SILPasses/sil_combine_enum_addr.sil | 3 +- test/SILPasses/sil_combine_enums.sil | 3 +- test/SILPasses/sil_combine_same_ops.sil | 2 +- test/SILPasses/sil_combine_uncheck.sil | 2 +- test/SILPasses/sil_concat_string_literals.sil | 5 +- test/SILPasses/sil_locations.sil | 2 +- test/SILPasses/sil_locations.swift | 2 +- test/SILPasses/sil_simplify_instrs.sil | 2 +- ...witness_tables_external_witnesstable.swift | 4 +- test/SILPasses/simp_enum.sil | 2 +- test/SILPasses/simplify_cfg.sil | 5 +- test/SILPasses/simplify_cfg_args.sil | 5 +- test/SILPasses/spec_archetype_method.swift | 3 +- test/SILPasses/spec_conf1.swift | 3 +- test/SILPasses/spec_conf2.swift | 4 +- test/SILPasses/spec_recursion.swift | 3 +- test/SILPasses/specialize.sil | 2 +- test/SILPasses/specialize_apply_conf.swift | 2 +- test/SILPasses/specialize_chain.swift | 2 +- .../specialize_checked_cast_branch.swift | 3 +- .../specialize_dont_touch_transparent.swift | 2 +- test/SILPasses/specialize_ext.swift | 2 +- test/SILPasses/specialize_inherited.sil | 2 +- ...tatypes_with_nondefault_representation.sil | 2 +- ...pecialize_unconditional_checked_cast.swift | 2 +- test/SILPasses/split_critical_edges.sil | 2 +- test/SILPasses/sroa.sil | 2 +- .../SILPasses/sroa_unreferenced_members.swift | 2 +- test/SILPasses/static_initializer.sil | 3 +- test/SILPasses/static_report.sil | 3 +- test/SILPasses/strip_debug_info.sil | 2 +- test/SILPasses/swap_refcnt.swift | 2 +- test/SILPasses/switch.swift | 2 +- test/SILPasses/unreachable_code.swift | 2 +- test/SILPasses/unused_containers.swift | 2 +- test/Sema/accessibility.swift | 2 +- test/Sema/accessibility_multi.swift | 2 +- test/Sema/availability.swift | 4 +- test/Sema/availability_versions.swift | 4 +- .../Sema/availability_versions_objc_api.swift | 5 +- .../availability_versions_optionals.swift | 5 +- ...g_metatype_cast_to_reference_no_objc.swift | 6 +- test/Sema/diag_self_assign.swift | 2 +- test/Sema/diag_unreachable_after_return.swift | 2 +- test/Sema/diag_values_of_module_type.swift | 2 +- test/Sema/enum_equatable_hashable.swift | 2 +- test/Sema/enum_raw_multi.swift | 4 +- test/Sema/enum_raw_representable.swift | 2 +- .../Sema/enum_raw_representable_migrate.swift | 2 +- .../enum_raw_representable_multi_file.swift | 2 +- test/Sema/extension_binding_multi.swift | 2 +- test/Sema/immutability.swift | 2 +- test/Sema/implicit_initializer_multi.swift | 2 +- test/Sema/import_and_define_class.swift | 3 + test/Sema/infer_block_type.swift | 2 +- test/Sema/objc_attr_requires_module.swift | 3 +- test/Serialization/always_inline.swift | 4 +- test/Serialization/array.swift | 4 +- test/Serialization/autolinking.swift | 20 +- .../Serialization/autolinking_immediate.swift | 5 +- test/Serialization/basic_sil.swift | 4 +- test/Serialization/builtin.swift | 4 +- .../class-roundtrip-module.swift | 6 +- test/Serialization/class.swift | 6 +- test/Serialization/comments-framework.swift | 8 +- test/Serialization/comments.swift | 12 +- ...lfunction_deserializationfrom_stdlib.swift | 2 +- .../duplicate_normalprotocolconformance.swift | 4 +- test/Serialization/empty.swift | 2 +- test/Serialization/function.swift | 4 +- test/Serialization/generic_witness.swift | 4 +- test/Serialization/global_init.swift | 4 +- test/Serialization/import_source.swift | 2 +- .../Serialization/inherited-conformance.swift | 6 +- test/Serialization/load-invalid.swift | 8 +- .../load-missing-dependencies.swift | 10 +- .../load-missing-dependency.swift | 18 +- test/Serialization/load-wrong-name.swift | 4 +- test/Serialization/load.swift | 6 +- test/Serialization/multi-file.swift | 6 +- test/Serialization/noinline.swift | 4 +- test/Serialization/objc.swift | 4 +- test/Serialization/objc_method_table.swift | 4 +- test/Serialization/objc_xref.swift | 4 +- test/Serialization/operator.swift | 7 +- test/Serialization/optimized.swift | 6 +- test/Serialization/override.swift | 6 +- test/Serialization/print.swift | 7 +- test/Serialization/semantics.swift | 4 +- test/Serialization/struct.swift | 4 +- test/Serialization/target-incompatible.swift | 4 +- test/Serialization/target-too-new.swift | 10 +- test/Serialization/too-new.swift | 2 +- test/Serialization/transparent-std.swift | 4 +- test/Serialization/transparent.swift | 4 +- test/Serialization/union.swift | 6 +- .../vtable-function-deserialization.swift | 4 +- ...itnesstable-function-deserialization.swift | 4 +- test/Serialization/xref.swift | 10 +- test/TypeCoercion/constructor_return.swift | 2 +- .../constructor_return_type.swift | 2 +- test/TypeCoercion/integer_literals.swift | 2 +- test/TypeCoercion/interpolation.swift | 2 +- test/TypeCoercion/overload_member.swift | 2 +- test/TypeCoercion/overload_noncall.swift | 2 +- test/TypeCoercion/overload_parens.swift | 2 +- test/TypeCoercion/protocols.swift | 2 +- test/TypeCoercion/return_coercion.swift | 2 +- test/TypeCoercion/subtyping.swift | 2 +- test/TypeCoercion/unknowable.swift | 2 +- test/UpdateCode/fixits-apply.swift | 2 +- test/UpdateCode/fixits-apply.swift.result | 2 +- test/UpdateCode/unfixed.swift | 2 +- test/UpdateCode/unfixed.swift.result | 2 +- test/attr/accessibility.swift | 2 +- test/attr/accessibility_print.swift | 6 +- test/attr/attr_NSApplicationMain.swift | 2 +- .../attr/attr_NSApplicationMain_generic.swift | 2 +- .../attr_NSApplicationMain_inherited.swift | 2 +- .../attr_NSApplicationMain_multiple.swift | 2 +- ...cationMain_not_NSApplicationDelegate.swift | 2 +- .../delegate.swift | 2 +- .../main.swift | 2 +- test/attr/attr_NSManaged.swift | 2 +- test/attr/attr_UIApplicationMain.swift | 2 +- .../attr/attr_UIApplicationMain_generic.swift | 2 +- .../attr_UIApplicationMain_inherited.swift | 2 +- .../attr_UIApplicationMain_multiple.swift | 2 +- ...cationMain_not_UIApplicationDelegate.swift | 2 +- .../delegate.swift | 2 +- .../main.swift | 2 +- test/attr/attr_asmname.swift | 2 +- test/attr/attr_autoclosure.swift | 2 +- test/attr/attr_availability.swift | 2 +- test/attr/attr_availability_osx.swift | 2 + test/attr/attr_dynamic.swift | 4 +- test/attr/attr_dynamic_infer.swift | 2 +- test/attr/attr_final.swift | 2 +- test/attr/attr_ibaction.swift | 2 +- test/attr/attr_iboutlet.swift | 2 +- test/attr/attr_inout.swift | 2 +- test/attr/attr_noescape.swift | 2 +- test/attr/attr_noreturn.swift | 2 +- test/attr/attr_objc.swift | 4 +- test/attr/attr_objc_clang.swift | 4 +- test/attr/attr_objc_foreign.swift | 8 +- test/attr/attr_objc_overlays.swift | 4 +- test/attr/attr_override.swift | 2 +- test/attr/attr_required.swift | 2 +- .../attr_requires_stored_property_inits.swift | 3 +- test/attr/attr_semantics.swift | 2 +- test/attr/attributes.swift | 3 +- test/decl/class/circular_inheritance.swift | 2 +- test/decl/class/classes.swift | 2 +- test/decl/class/override.swift | 2 +- test/decl/enumtest.swift | 2 +- test/decl/ext/extensions.swift | 2 +- test/decl/ext/forward_references.swift | 4 +- test/decl/ext/generic.swift | 2 +- test/decl/ext/generic_restrictions.swift | 2 +- test/decl/func/arg_rename.swift | 2 +- test/decl/func/complete_object_init.swift | 2 +- test/decl/func/constructor.swift | 2 +- test/decl/func/default-values.swift | 2 +- test/decl/func/dynamic_self.swift | 2 +- test/decl/func/functions.swift | 2 +- .../decl/func/keyword-argument-defaults.swift | 2 +- test/decl/func/static_func.swift | 2 +- test/decl/func/vararg.swift | 2 +- test/decl/import/import.swift | 4 +- test/decl/inherit/inherit.swift | 2 +- test/decl/inherit/initializer.swift | 2 +- test/decl/inherit/override.swift | 2 +- test/decl/init/default-initialization.swift | 2 +- test/decl/init/failable.swift | 2 +- test/decl/init/recursive_references.swift | 2 +- test/decl/objc_override.swift | 2 +- test/decl/objc_override_multi.swift | 4 +- test/decl/objc_redeclaration.swift | 2 +- test/decl/objc_redeclaration_multi.swift | 2 +- test/decl/operators.swift | 2 +- test/decl/overload.swift | 2 +- test/decl/protocol/conforms/inherited.swift | 2 +- test/decl/protocol/conforms/init.swift | 2 +- .../indirectly_recursive_requirement.swift | 2 +- .../protocol/operators_in_protocols.swift | 2 +- .../protocol_overload_selection.swift | 2 +- .../protocol/protocol_with_default_args.swift | 2 +- test/decl/protocol/protocols.swift | 2 +- test/decl/protocol/protocols_in_library.swift | 2 +- .../decl/protocol/recursive_requirement.swift | 2 +- .../req/associated_type_default.swift | 2 +- test/decl/protocol/req/class.swift | 2 +- test/decl/protocol/req/dynamic_self.swift | 3 +- test/decl/protocol/req/func.swift | 2 +- test/decl/protocol/req/name_mismatch.swift | 2 +- test/decl/protocol/req/optional.swift | 2 +- test/decl/protocol/req/subscript.swift | 2 +- test/decl/protocol/req/unavailable.swift | 2 +- test/decl/protocol/substituted_aliases.swift | 2 +- test/decl/recursive_enum_declaration.swift | 2 +- test/decl/subscript/addressors.swift | 2 +- test/decl/subscript/subscripting.swift | 2 +- test/decl/typealias/associated_types.swift | 2 +- test/decl/typealias/dependent_types.swift | 2 +- test/decl/var/NSCopying.swift | 2 +- test/decl/var/NSManaged_properties.swift | 2 +- test/decl/var/default_init.swift | 2 +- test/decl/var/lazy_properties.swift | 2 +- test/decl/var/properties.swift | 2 +- test/decl/var/static_var.swift | 2 +- test/decl/var/variables.swift | 2 +- test/expr/capture/inout.swift | 2 +- test/expr/capture/nested.swift | 2 +- test/expr/capture/nested_class.swift | 2 +- test/expr/capture/order.swift | 2 +- test/expr/cast/CoreFoundation.swift | 2 +- test/expr/cast/array_bridge.swift | 2 +- test/expr/cast/array_coerce.swift | 2 +- test/expr/cast/array_downcast.swift | 2 +- .../expr/cast/array_downcast_Foundation.swift | 6 +- test/expr/cast/array_iteration.swift | 2 +- test/expr/cast/as_coerce.swift | 2 +- test/expr/cast/bridged.swift | 2 +- test/expr/cast/chains.swift | 2 +- test/expr/cast/dictionary_bridge.swift | 2 +- test/expr/cast/dictionary_coerce.swift | 2 +- test/expr/cast/dictionary_downcast.swift | 2 +- test/expr/cast/metatype_casts.swift | 2 +- test/expr/cast/nil_value_to_optional.swift | 2 +- test/expr/cast/optional.swift | 2 +- test/expr/cast/precedence.swift | 2 +- test/expr/cast/set_bridge.swift | 2 +- test/expr/cast/set_coerce.swift | 2 +- test/expr/cast/set_downcast.swift | 2 +- test/expr/character_literals.swift | 2 +- test/expr/closure/anonymous.swift | 2 +- test/expr/closure/basic.swift | 2 +- test/expr/closure/closures.swift | 2 +- test/expr/closure/default_args.swift | 2 +- test/expr/closure/inference.swift | 2 +- .../expr/closure/invalid_parameter_type.swift | 2 +- test/expr/closure/nested_inner_closures.swift | 2 +- test/expr/closure/single_expr.swift | 2 +- test/expr/closure/trailing.swift | 2 +- test/expr/delayed-ident/enum.swift | 2 +- test/expr/delayed-ident/static_func.swift | 2 +- test/expr/delayed-ident/static_var.swift | 2 +- test/expr/dynamic_lookup.swift | 2 +- test/expr/expressions.swift | 2 +- test/expr/postfix/call/construction.swift | 2 +- .../postfix/dot/init_ref_delegation.swift | 2 +- .../postfix/dot/optional_context_member.swift | 2 +- .../dot/optional_context_member_enum.swift | 2 +- test/expr/postfix/dot/selector.swift | 2 +- test/expr/postfix/dot/self.swift | 2 +- test/expr/primary/literal/boolean.swift | 2 +- test/multifile/protocol-conformance.swift | 3 +- test/sil-extract/basic.sil | 2 +- test/sil-extract/load-serialized-sil.swift | 2 +- test/sil-opt/sil-opt.swift | 2 +- test/stmt/foreach.swift | 2 +- test/stmt/if_while_var.swift | 2 +- test/stmt/statements.swift | 2 +- test/type/array.swift | 2 +- test/type/dictionary.swift | 2 +- test/type/infer/closures.swift | 2 +- test/type/infer/global_variables.swift | 2 +- test/type/infer/instance_variables.swift | 2 +- test/type/infer/local_variables.swift | 2 +- test/type/metatype/metatypes.swift | 2 +- test/type/nested_types.swift | 2 +- test/type/protocol_composition.swift | 2 +- test/type/protocol_types.swift | 2 +- test/type/self.swift | 2 +- test/type/types.swift | 2 +- tools/sil-extract/SILExtract.cpp | 5 + .../035-multiple-typecheck-segfault.swift | 4 +- validation-test/parser/parse_stdlib.sil | 4 +- .../stdlib/AssertDiagnostics.swift | 2 +- .../stdlib/AtomicsDiagnostics.swift | 2 +- .../stdlib/FixedPointDiagnostics.swift.gyb | 2 +- 1190 files changed, 3556 insertions(+), 2656 deletions(-) create mode 100644 test/ClangModules/availability_macosx.swift create mode 100644 test/ClangModules/ctypes_parse_macosx.swift create mode 100644 test/IDE/print_clang_decls_AppKit.swift create mode 100644 test/IRGen/generic_classes_osx_iphonesimulator.sil delete mode 100644 test/SIL/Serialization/lit.local.cfg diff --git a/test/1_stdlib/ArrayDiagnostics.swift b/test/1_stdlib/ArrayDiagnostics.swift index f4e42a26338e8..ee6a334925f0a 100644 --- a/test/1_stdlib/ArrayDiagnostics.swift +++ b/test/1_stdlib/ArrayDiagnostics.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift class NotEquatable {} diff --git a/test/1_stdlib/CharacterTypes.swift b/test/1_stdlib/CharacterTypes.swift index f1bd2a9258df5..48c9989babbec 100644 --- a/test/1_stdlib/CharacterTypes.swift +++ b/test/1_stdlib/CharacterTypes.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify -enable-character-literals +// RUN: %target-parse-verify-swift -enable-character-literals func testTypeInference() { func isUnicodeScalar(inout _: UnicodeScalar) {} diff --git a/test/1_stdlib/RangeDiagnostics.swift b/test/1_stdlib/RangeDiagnostics.swift index 6b053eb014429..fb533de244991 100644 --- a/test/1_stdlib/RangeDiagnostics.swift +++ b/test/1_stdlib/RangeDiagnostics.swift @@ -9,7 +9,7 @@ // See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors // //===----------------------------------------------------------------------===// -// RUN: %swift -verify -parse %s +// RUN: %target-parse-verify-swift func assertCollection(_: C) {} assertCollection(0..<10) diff --git a/test/1_stdlib/StringDiagnostics.swift b/test/1_stdlib/StringDiagnostics.swift index a6e883afc88ba..1529d0b7705ed 100644 --- a/test/1_stdlib/StringDiagnostics.swift +++ b/test/1_stdlib/StringDiagnostics.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Common pitfall: trying to subscript a string with integers. func testIntSubscripting(s: String, i: Int) { diff --git a/test/1_stdlib/UnicodeScalarDiagnostics.swift b/test/1_stdlib/UnicodeScalarDiagnostics.swift index 52f5c3c1b1ccb..e5ce8c69ffd15 100644 --- a/test/1_stdlib/UnicodeScalarDiagnostics.swift +++ b/test/1_stdlib/UnicodeScalarDiagnostics.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift func isString(inout s: String) {} diff --git a/test/BuildConfigurations/basicDeclarations.swift b/test/BuildConfigurations/basicDeclarations.swift index 1ef747435d48b..1ebef409fa0c3 100644 --- a/test/BuildConfigurations/basicDeclarations.swift +++ b/test/BuildConfigurations/basicDeclarations.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify -D FOO -D BAR -target x86_64-apple-macosx10.9 +// RUN: %target-parse-verify-swift -D FOO -D BAR class A {} diff --git a/test/BuildConfigurations/basicIdentity.swift b/test/BuildConfigurations/basicIdentity.swift index 8cbb3b00ec079..1e4383d8f9f54 100644 --- a/test/BuildConfigurations/basicIdentity.swift +++ b/test/BuildConfigurations/basicIdentity.swift @@ -1,51 +1,53 @@ -// RUN: %swift -parse %s -verify -D FOO -D BAZ -target x86_64-apple-macosx10.9 +// RUN: %swift -parse %s -verify -D FOO -D BAZ -target x86_64-apple-macosx10.9 -parse-stdlib + +struct Foo {} #if FOO -var a = 0 +var a = Foo() #endif var b = a #if !BAR -var c = 0 +var c = Foo() #endif var d = c #if FOO || BAR -var e = 0 +var e = Foo() #endif var f = e #if BAR || FOO -var g = 0 +var g = Foo() #endif var h = g #if FOO && BAZ -var i = 0 +var i = Foo() #endif var j = i #if os(OSX) -var k = 0 +var k = Foo() #endif var l = k #if arch(x86_64) -var m = 0 +var m = Foo() #endif var n = m #if FOO && !BAR && BAZ && os(OSX) && arch(x86_64) && _runtime(_ObjC) -var o = 0 +var o = Foo() #endif var p = o #if FOO && (!BAR && BAZ && os(OSX) && arch(x86_64)) && _runtime(_ObjC) -var q = 0 +var q = Foo() #endif var r = q #if FOO && !(!BAZ && BAZ && os(OSX) && arch(x86_64)) && _runtime(_ObjC) -var s = 0 +var s = Foo() #endif var t = s diff --git a/test/BuildConfigurations/basicParseErrors.swift b/test/BuildConfigurations/basicParseErrors.swift index 213937c62ece9..9e8fe38428bf2 100644 --- a/test/BuildConfigurations/basicParseErrors.swift +++ b/test/BuildConfigurations/basicParseErrors.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify -D FOO -D BAZ -target x86_64-apple-macosx10.9 +// RUN: %target-parse-verify-swift -D FOO -D BAZ #if FOO == BAZ // expected-error{{expected '&&' or '||' expression}} var x = 0 diff --git a/test/BuildConfigurations/decl_parse_errors.swift b/test/BuildConfigurations/decl_parse_errors.swift index 7917a00895edd..8209daaf27652 100644 --- a/test/BuildConfigurations/decl_parse_errors.swift +++ b/test/BuildConfigurations/decl_parse_errors.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift class C { diff --git a/test/BuildConfigurations/module_top_level.swift b/test/BuildConfigurations/module_top_level.swift index b3ea65f603813..6ccdd61a5aa5d 100644 --- a/test/BuildConfigurations/module_top_level.swift +++ b/test/BuildConfigurations/module_top_level.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify -parse-as-library +// RUN: %target-parse-verify-swift -parse-as-library #if FAIL class C {} diff --git a/test/BuildConfigurations/no_configuration_error1.swift b/test/BuildConfigurations/no_configuration_error1.swift index a69fe8b859ad6..789bf153fc6bc 100644 --- a/test/BuildConfigurations/no_configuration_error1.swift +++ b/test/BuildConfigurations/no_configuration_error1.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // With a space next to the '#if' #if // expected-error {{expected a build configuration expression to follow the #if clause}} diff --git a/test/BuildConfigurations/no_configuration_error2.swift b/test/BuildConfigurations/no_configuration_error2.swift index dbd7491c828ee..39f7e0140314f 100644 --- a/test/BuildConfigurations/no_configuration_error2.swift +++ b/test/BuildConfigurations/no_configuration_error2.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // No space next to the '#if' diff --git a/test/BuildConfigurations/pound-if-inside-function-2.swift b/test/BuildConfigurations/pound-if-inside-function-2.swift index 637eca8a97aec..c8a8d4722a013 100644 --- a/test/BuildConfigurations/pound-if-inside-function-2.swift +++ b/test/BuildConfigurations/pound-if-inside-function-2.swift @@ -1,4 +1,4 @@ -// RUN: %swift -D BLAH %s -verify -parse +// RUN: %target-parse-verify-swift -D BLAH // Check that if config statement has range properly nested in its parent // EOF. diff --git a/test/BuildConfigurations/pound-if-inside-function-3.swift b/test/BuildConfigurations/pound-if-inside-function-3.swift index 0f60d4c03e534..4927beaf82b53 100644 --- a/test/BuildConfigurations/pound-if-inside-function-3.swift +++ b/test/BuildConfigurations/pound-if-inside-function-3.swift @@ -1,4 +1,4 @@ -// RUN: %swift -D BLAH %s -verify -parse +// RUN: %target-parse-verify-swift -D BLAH // Check that if config statement has range properly nested in its parent // EOF. diff --git a/test/BuildConfigurations/pound-if-inside-function-4.swift b/test/BuildConfigurations/pound-if-inside-function-4.swift index 616be05368585..241686eb4c204 100644 --- a/test/BuildConfigurations/pound-if-inside-function-4.swift +++ b/test/BuildConfigurations/pound-if-inside-function-4.swift @@ -1,4 +1,4 @@ -// RUN: %swift -D BLAH %s -verify -parse +// RUN: %target-parse-verify-swift -D BLAH // Check that if config statement has range properly nested in its parent // EOF. diff --git a/test/BuildConfigurations/pound-if-inside-function.swift b/test/BuildConfigurations/pound-if-inside-function.swift index b87f031d5ff1d..5886d7541545e 100644 --- a/test/BuildConfigurations/pound-if-inside-function.swift +++ b/test/BuildConfigurations/pound-if-inside-function.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -verify -parse +// RUN: %target-parse-verify-swift // Check that if config statement has range properly nested in its parent // EOF. diff --git a/test/BuildConfigurations/pound-if-inside-statement-2.swift b/test/BuildConfigurations/pound-if-inside-statement-2.swift index 616e49b5dea69..2db4b6aba3f7b 100644 --- a/test/BuildConfigurations/pound-if-inside-statement-2.swift +++ b/test/BuildConfigurations/pound-if-inside-statement-2.swift @@ -1,4 +1,4 @@ -// RUN: %swift -D BLAH %s -verify -parse +// RUN: %target-parse-verify-swift -D BLAH func foo() { // expected-note {{to match this opening '{'}} if true { diff --git a/test/BuildConfigurations/pound-if-inside-statement.swift b/test/BuildConfigurations/pound-if-inside-statement.swift index be7756914fedf..d42bf120eb19c 100644 --- a/test/BuildConfigurations/pound-if-inside-statement.swift +++ b/test/BuildConfigurations/pound-if-inside-statement.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -verify -parse +// RUN: %target-parse-verify-swift func foo() { // expected-note {{to match this opening '{'}} if true { diff --git a/test/BuildConfigurations/pound-if-top-level-clean.swift b/test/BuildConfigurations/pound-if-top-level-clean.swift index febe8b2b31d77..c6d16a8313fcc 100644 --- a/test/BuildConfigurations/pound-if-top-level-clean.swift +++ b/test/BuildConfigurations/pound-if-top-level-clean.swift @@ -1,4 +1,4 @@ -// RUN: %swift -D FOO %s -verify -parse +// RUN: %target-parse-verify-swift -D FOO var x = 0 diff --git a/test/BuildConfigurations/pound-if-top-level.swift b/test/BuildConfigurations/pound-if-top-level.swift index 1485ed5386a86..86e4b2862f1c6 100644 --- a/test/BuildConfigurations/pound-if-top-level.swift +++ b/test/BuildConfigurations/pound-if-top-level.swift @@ -1,4 +1,4 @@ -// RUN: %swift -D BLAH %s -verify -parse +// RUN: %target-parse-verify-swift -D BLAH // Check that if config statement has range properly nested in its parent // EOF. diff --git a/test/BuildConfigurations/topLevelDeclarations.swift b/test/BuildConfigurations/topLevelDeclarations.swift index 34e8432adcfdf..427aa21ca934f 100644 --- a/test/BuildConfigurations/topLevelDeclarations.swift +++ b/test/BuildConfigurations/topLevelDeclarations.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify -D FOO +// RUN: %target-parse-verify-swift -D FOO // This test is meant to ensure that mixes of top-level declarations, statements // and expressions within #if blocks parse correctly diff --git a/test/BuildConfigurations/trailingClosureOnTargetConfig.swift b/test/BuildConfigurations/trailingClosureOnTargetConfig.swift index d53e2cfd57a8e..7f5e11e12cc7c 100644 --- a/test/BuildConfigurations/trailingClosureOnTargetConfig.swift +++ b/test/BuildConfigurations/trailingClosureOnTargetConfig.swift @@ -1,5 +1,9 @@ -// RUN: %swift -parse %s -verify -D FOO -D BAZ -target x86_64-apple-macosx10.9 +// RUN: %swift -parse %s -verify -D FOO -D BAZ -target x86_64-apple-macosx10.9 -parse-stdlib + +struct Foo {} + +func useFoo(foo: Foo) {} #if arch(x86_64) && os(OSX) - println("Mac") // This should not be parsed as a trailing closure + useFoo(Foo()) // This should not be parsed as a trailing closure #endif diff --git a/test/ClangModules/CoreServices_test.swift b/test/ClangModules/CoreServices_test.swift index 8243d6f30d8a9..15246e78d99de 100644 --- a/test/ClangModules/CoreServices_test.swift +++ b/test/ClangModules/CoreServices_test.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse %s -verify +// RUN: %target-parse-verify-swift %clang-importer-sdk import CoreServices diff --git a/test/ClangModules/Darwin_test.swift b/test/ClangModules/Darwin_test.swift index ab3711a40e9c9..8ffc11ed82c46 100644 --- a/test/ClangModules/Darwin_test.swift +++ b/test/ClangModules/Darwin_test.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse %s -verify +// RUN: %target-parse-verify-swift %clang-importer-sdk import Darwin diff --git a/test/ClangModules/MixedSource/broken-modules.swift b/test/ClangModules/MixedSource/broken-modules.swift index 6891c9c60b657..36c4172ac698f 100644 --- a/test/ClangModules/MixedSource/broken-modules.swift +++ b/test/ClangModules/MixedSource/broken-modules.swift @@ -1,13 +1,13 @@ // RUN: rm -rf %t && mkdir -p %t -// RUN: not %swift -parse %s -I %S/Inputs/broken-modules/ -enable-source-import -show-diagnostics-after-fatal 2> %t/err.txt +// RUN: not %target-swift-frontend -parse %s -I %S/Inputs/broken-modules/ -enable-source-import -show-diagnostics-after-fatal 2> %t/err.txt // RUN: FileCheck -check-prefix CHECK -check-prefix CLANG-CHECK %s < %t/err.txt -// RUN: not %swift -parse %s -import-objc-header %S/Inputs/broken-modules/BrokenClangModule.h -enable-source-import 2> %t/err.bridging-header.txt +// RUN: not %target-swift-frontend -parse %s -import-objc-header %S/Inputs/broken-modules/BrokenClangModule.h -enable-source-import 2> %t/err.bridging-header.txt // RUN: FileCheck -check-prefix CHECK-BRIDGING-HEADER -check-prefix CLANG-CHECK %s < %t/err.bridging-header.txt -// RUN: not %swift -parse %s -import-objc-header %t/fake.h 2>&1 | FileCheck -check-prefix=MISSING-HEADER %s +// RUN: not %target-swift-frontend -parse %s -import-objc-header %t/fake.h 2>&1 | FileCheck -check-prefix=MISSING-HEADER %s -// RUN: not %swift -parse %s -import-objc-header %S/../../Inputs/empty.swift 2>&1 | FileCheck -check-prefix=EMPTY-HEADER %s +// RUN: not %target-swift-frontend -parse %s -import-objc-header %S/../../Inputs/empty.swift 2>&1 | FileCheck -check-prefix=EMPTY-HEADER %s // MISSING-HEADER: error: bridging header '{{.*}}/fake.h' does not exist // MISSING-HEADER-NOT: error diff --git a/test/ClangModules/MixedSource/import-mixed-framework.swift b/test/ClangModules/MixedSource/import-mixed-framework.swift index 8663e422042a6..a42e205b17da4 100644 --- a/test/ClangModules/MixedSource/import-mixed-framework.swift +++ b/test/ClangModules/MixedSource/import-mixed-framework.swift @@ -3,12 +3,10 @@ // RUN: cp -r %S/Inputs/mixed-framework/Mixed.framework %t // Don't crash if a generated header is present but the swiftmodule is missing. -// RUN: not %swift %clang-importer-sdk -F %t -parse %s +// RUN: not %target-swift-frontend %clang-importer-sdk -F %t -parse %s -// RUN: %swiftc_driver -emit-module -o %t/Mixed.framework/Modules/Mixed.swiftmodule/x86_64.swiftmodule %S/Inputs/mixed-framework/Mixed.swift -import-underlying-module -F %t -module-name Mixed -Xfrontend -disable-objc-attr-requires-foundation-module -// RUN: %swift %clang-importer-sdk -F %t -parse %s -verify - -// REQUIRES: X86 +// RUN: %target-swift-frontend -emit-module -o %t/Mixed.framework/Modules/Mixed.swiftmodule/%target-swiftmodule-name %S/Inputs/mixed-framework/Mixed.swift -import-underlying-module -F %t -module-name Mixed -disable-objc-attr-requires-foundation-module +// RUN: %target-swift-frontend %clang-importer-sdk -F %t -parse %s -verify import Mixed diff --git a/test/ClangModules/MixedSource/import-mixed-with-header-twice.swift b/test/ClangModules/MixedSource/import-mixed-with-header-twice.swift index ed22d634e4205..15926e3a7d284 100644 --- a/test/ClangModules/MixedSource/import-mixed-with-header-twice.swift +++ b/test/ClangModules/MixedSource/import-mixed-with-header-twice.swift @@ -1,12 +1,12 @@ // RUN: rm -rf %t && mkdir -p %t // RUN: cp -R %S/Inputs/mixed-target %t -// RUN: %swiftc_driver -Xfrontend %clang-importer-sdk -I %S/../Inputs/custom-modules -import-objc-header %t/mixed-target/header.h -emit-module-path %t/MixedWithHeader.swiftmodule %S/Inputs/mixed-with-header.swift %S/../../Inputs/empty.swift -module-name MixedWithHeader -// RUN: %swiftc_driver -Xfrontend %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -import-objc-header %t/mixed-target/header-again.h -emit-module-path %t/MixedWithHeaderAgain.swiftmodule %S/Inputs/mixed-with-header-again.swift %S/../../Inputs/empty.swift -module-name MixedWithHeaderAgain -// RUN: %swift %clang-importer-sdk -I %S/../Inputs/custom-modules -I %t -parse %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -I %S/../Inputs/custom-modules -import-objc-header %t/mixed-target/header.h -emit-module-path %t/MixedWithHeader.swiftmodule %S/Inputs/mixed-with-header.swift %S/../../Inputs/empty.swift -module-name MixedWithHeader +// RUN: %target-swift-frontend %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -import-objc-header %t/mixed-target/header-again.h -emit-module-path %t/MixedWithHeaderAgain.swiftmodule %S/Inputs/mixed-with-header-again.swift %S/../../Inputs/empty.swift -module-name MixedWithHeaderAgain +// RUN: %target-swift-frontend %clang-importer-sdk -I %S/../Inputs/custom-modules -I %t -parse %s -verify // RUN: rm %t/mixed-target/header.h -// RUN: not %swift %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -parse %s 2>&1 | FileCheck %s -check-prefix=USE-SERIALIZED-HEADER +// RUN: not %target-swift-frontend %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -parse %s 2>&1 | FileCheck %s -check-prefix=USE-SERIALIZED-HEADER // USE-SERIALIZED-HEADER: redefinition of 'Point2D' // USE-SERIALIZED-HEADER: previous definition is here diff --git a/test/ClangModules/MixedSource/import-mixed-with-header.swift b/test/ClangModules/MixedSource/import-mixed-with-header.swift index 078484f4dc2b9..89da5e70a6b01 100644 --- a/test/ClangModules/MixedSource/import-mixed-with-header.swift +++ b/test/ClangModules/MixedSource/import-mixed-with-header.swift @@ -1,11 +1,11 @@ // RUN: rm -rf %t && mkdir -p %t // RUN: cp -R %S/Inputs/mixed-target %t -// RUN: %swiftc_driver -Xfrontend %clang-importer-sdk -I %S/../Inputs/custom-modules -import-objc-header %t/mixed-target/header.h -emit-module-path %t/MixedWithHeader.swiftmodule %S/Inputs/mixed-with-header.swift %S/../../Inputs/empty.swift -module-name MixedWithHeader -// RUN: %swift %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -parse %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -I %S/../Inputs/custom-modules -import-objc-header %t/mixed-target/header.h -emit-module-path %t/MixedWithHeader.swiftmodule %S/Inputs/mixed-with-header.swift %S/../../Inputs/empty.swift -module-name MixedWithHeader +// RUN: %target-swift-frontend %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -parse %s -verify // RUN: rm -rf %t/mixed-target/ -// RUN: %swift %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -parse %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -I %t -I %S/../Inputs/custom-modules -parse %s -verify import MixedWithHeader diff --git a/test/ClangModules/MixedSource/mixed-nsuinteger.swift b/test/ClangModules/MixedSource/mixed-nsuinteger.swift index 31ddf77571c7e..eb0746da891bc 100644 --- a/test/ClangModules/MixedSource/mixed-nsuinteger.swift +++ b/test/ClangModules/MixedSource/mixed-nsuinteger.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -I %S/Inputs/user-module -parse -target x86_64-apple-darwin13 %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -I %S/Inputs/user-module -parse %s -verify // Type checker should not report any errors in the code below. diff --git a/test/ClangModules/MixedSource/mixed-target-using-header.swift b/test/ClangModules/MixedSource/mixed-target-using-header.swift index a8c846cca0fbd..00b09600d64b7 100644 --- a/test/ClangModules/MixedSource/mixed-target-using-header.swift +++ b/test/ClangModules/MixedSource/mixed-target-using-header.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 -I %S/../Inputs/custom-modules -import-objc-header %S/Inputs/mixed-target/header.h -parse %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -I %S/../Inputs/custom-modules -import-objc-header %S/Inputs/mixed-target/header.h -parse %s -verify func test(foo : FooProto) { let _: CInt = foo.bar diff --git a/test/ClangModules/MixedSource/mixed-target-using-module.swift b/test/ClangModules/MixedSource/mixed-target-using-module.swift index 36a561552667b..4a9f4effb12de 100644 --- a/test/ClangModules/MixedSource/mixed-target-using-module.swift +++ b/test/ClangModules/MixedSource/mixed-target-using-module.swift @@ -1,6 +1,6 @@ -// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 -F %S/Inputs/mixed-target/ -module-name Mixed -import-underlying-module -parse %s -verify -// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 -F %S/Inputs/mixed-target/ -module-name Mixed -import-underlying-module -emit-ir %S/../../Inputs/empty.swift - | FileCheck -check-prefix=CHECK-AUTOLINK %s -// RUN: not %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 -F %S/Inputs/mixed-target/ -module-name WrongName -import-underlying-module -parse %s 2>&1 | FileCheck -check-prefix=CHECK-WRONG-NAME %s +// RUN: %target-swift-frontend %clang-importer-sdk -F %S/Inputs/mixed-target/ -module-name Mixed -import-underlying-module -parse %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -F %S/Inputs/mixed-target/ -module-name Mixed -import-underlying-module -emit-ir %S/../../Inputs/empty.swift - | FileCheck -check-prefix=CHECK-AUTOLINK %s +// RUN: not %target-swift-frontend %clang-importer-sdk -F %S/Inputs/mixed-target/ -module-name WrongName -import-underlying-module -parse %s 2>&1 | FileCheck -check-prefix=CHECK-WRONG-NAME %s // CHECK-AUTOLINK: !{{[0-9]+}} = !{i32 {{[0-9]+}}, !"Linker Options", ![[LINK_LIST:[0-9]+]]} // CHECK-AUTOLINK: ![[LINK_LIST]] = !{ diff --git a/test/ClangModules/MixedSource/resolve-cross-language.swift b/test/ClangModules/MixedSource/resolve-cross-language.swift index 3358c3f93df05..9b66c1dfee3e6 100644 --- a/test/ClangModules/MixedSource/resolve-cross-language.swift +++ b/test/ClangModules/MixedSource/resolve-cross-language.swift @@ -1,9 +1,9 @@ // RUN: rm -rf %t // RUN: mkdir -p %t -// RUN: %swiftc_driver -emit-module -emit-objc-header -o %t/Base.swiftmodule %S/Inputs/resolve-cross-language/Base.swift -Xfrontend -disable-objc-attr-requires-foundation-module +// RUN: %target-swift-frontend -emit-module -emit-objc-header -o %t/Base.swiftmodule %S/Inputs/resolve-cross-language/Base.swift -disable-objc-attr-requires-foundation-module // RUN: cp %S/Inputs/resolve-cross-language/Base-module.map %t/module.map -// RUN: %swift %clang-importer-sdk -parse -I %t -F %S/Inputs/resolve-cross-language %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -parse -I %t -F %S/Inputs/resolve-cross-language %s -verify import Base import BaseUser diff --git a/test/ClangModules/Security_test.swift b/test/ClangModules/Security_test.swift index 628207cad9190..63638b63a090c 100644 --- a/test/ClangModules/Security_test.swift +++ b/test/ClangModules/Security_test.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -parse %s -verify import Security diff --git a/test/ClangModules/accessibility_framework.swift b/test/ClangModules/accessibility_framework.swift index 0d7fcf7947162..3f98e46a008b0 100644 --- a/test/ClangModules/accessibility_framework.swift +++ b/test/ClangModules/accessibility_framework.swift @@ -1,4 +1,6 @@ -// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify %s + +// REQUIRES: OS=macosx // The accessibility APIs are handled differently. A class might conform to both // NSAccessibility (containing accessibility properties) and individual diff --git a/test/ClangModules/adapter.swift b/test/ClangModules/adapter.swift index af96d03da13a9..15b270fa9af21 100644 --- a/test/ClangModules/adapter.swift +++ b/test/ClangModules/adapter.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %clang-importer-sdk -I %S/Inputs/custom-modules %s +// RUN: %target-swift-frontend -parse -verify %clang-importer-sdk -I %S/Inputs/custom-modules %s // Do not import Foundation! This tests indirect visibility. import Redeclaration diff --git a/test/ClangModules/autolinking.swift b/test/ClangModules/autolinking.swift index 4906fcf3df166..91586666289c0 100644 --- a/test/ClangModules/autolinking.swift +++ b/test/ClangModules/autolinking.swift @@ -1,10 +1,10 @@ // RUN: rm -rf %t // RUN: mkdir -p %t -// RUN: %swift %s -sdk %S/Inputs -I %S/Inputs/custom-modules -emit-ir -o %t/without-adapter.ll +// RUN: %target-swift-frontend %s -sdk %S/Inputs -I %S/Inputs/custom-modules -emit-ir -o %t/without-adapter.ll // RUN: FileCheck %s < %t/without-adapter.ll -// RUN: %swift -emit-module %S/Inputs/adapter.swift -sdk %S/Inputs -module-link-name SwiftAdapter -module-name ClangModuleWithAdapter -I=%S/Inputs/custom-modules -o %t -// RUN: %swift %s -sdk %S/Inputs -I %S/Inputs/custom-modules -I %t -emit-ir -o %t/with-adapter.ll +// RUN: %target-swift-frontend -emit-module %S/Inputs/adapter.swift -sdk %S/Inputs -module-link-name SwiftAdapter -module-name ClangModuleWithAdapter -I %S/Inputs/custom-modules -o %t +// RUN: %target-swift-frontend %s -sdk %S/Inputs -I %S/Inputs/custom-modules -I %t -emit-ir -o %t/with-adapter.ll // RUN: FileCheck %s < %t/with-adapter.ll // RUN: FileCheck --check-prefix=CHECK-WITH-SWIFT %s < %t/with-adapter.ll diff --git a/test/ClangModules/availability.swift b/test/ClangModules/availability.swift index abf9e49e70f50..acc9d648a0fd2 100644 --- a/test/ClangModules/availability.swift +++ b/test/ClangModules/availability.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -verify -I %S/Inputs/custom-modules -target x86_64-apple-macosx10.9 %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify -I %S/Inputs/custom-modules %s import Dispatch import Foundation @@ -36,10 +36,6 @@ func test_class_avail(x:NSObject, obj: AnyObject) { obj.`class`!() // expected-error {{'class()' is unavailable: use 'dynamicType' instead}} } -func test_unavailable_because_deprecated() { - println(NSRealMemoryAvailable()) // expected-error {{'NSRealMemoryAvailable()' is unavailable: APIs deprecated as of OS X 10.9 and earlier are unavailable in Swift}} -} - func test_unavailable_app_extension() { // No expected error here. See corresponding App extension test. println(SomeCrazyAppExtensionForbiddenAPI()) // no-error diff --git a/test/ClangModules/availability_app_extension.swift b/test/ClangModules/availability_app_extension.swift index 48eb762e95232..daafd05b69b8c 100644 --- a/test/ClangModules/availability_app_extension.swift +++ b/test/ClangModules/availability_app_extension.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 -application-extension %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify -application-extension %s import Foundation diff --git a/test/ClangModules/availability_ios.swift b/test/ClangModules/availability_ios.swift index 3acce378d8a85..fb9bb59a0637c 100644 --- a/test/ClangModules/availability_ios.swift +++ b/test/ClangModules/availability_ios.swift @@ -1,4 +1,4 @@ -// RUN: %target-swift-frontend -parse -verify %s +// RUN: %target-parse-verify-swift // REQUIRES: OS=ios import Foundation diff --git a/test/ClangModules/availability_macosx.swift b/test/ClangModules/availability_macosx.swift new file mode 100644 index 0000000000000..91d7e5939e17e --- /dev/null +++ b/test/ClangModules/availability_macosx.swift @@ -0,0 +1,10 @@ +// RUN: %target-parse-verify-swift + +// REQUIRES: OS=macosx + +import Foundation + +func test_unavailable_because_deprecated() { + println(NSRealMemoryAvailable()) // expected-error {{APIs deprecated as of OS X 10.9 and earlier are unavailable in Swift}} +} + diff --git a/test/ClangModules/blocks_parse.swift b/test/ClangModules/blocks_parse.swift index 6b303979d4116..70835c479166b 100644 --- a/test/ClangModules/blocks_parse.swift +++ b/test/ClangModules/blocks_parse.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify %s import blocks import Foundation diff --git a/test/ClangModules/broken-modules.swift b/test/ClangModules/broken-modules.swift index 362414b46f945..38e506a406831 100644 --- a/test/ClangModules/broken-modules.swift +++ b/test/ClangModules/broken-modules.swift @@ -1,5 +1,5 @@ // RUN: rm -rf %t && mkdir -p %t -// RUN: not %swift -parse %s -I %S/Inputs/custom-modules/ -show-diagnostics-after-fatal 2> %t/err.txt +// RUN: not %target-swift-frontend -parse %s -I %S/Inputs/custom-modules/ -show-diagnostics-after-fatal 2> %t/err.txt // RUN: FileCheck %s < %t/err.txt import MissingHeader diff --git a/test/ClangModules/cf.swift b/test/ClangModules/cf.swift index 797628844f46b..cab8313480ac0 100644 --- a/test/ClangModules/cf.swift +++ b/test/ClangModules/cf.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify -import-cf-types -I %S/Inputs/custom-modules -target x86_64-apple-macosx10.9 %s +// RUN: %target-swift-frontend -parse -verify -import-cf-types -I %S/Inputs/custom-modules %s import CoreCooling diff --git a/test/ClangModules/cfuncs_ir.swift b/test/ClangModules/cfuncs_ir.swift index f343a607c3b44..cfadc04c8dde6 100644 --- a/test/ClangModules/cfuncs_ir.swift +++ b/test/ClangModules/cfuncs_ir.swift @@ -1,4 +1,6 @@ -// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 %s -emit-ir -o - | FileCheck %s +// RUN: %target-swift-frontend %clang-importer-sdk %s -emit-ir -o - | FileCheck %s + +// REQUIRES: OS=macosx import cfuncs diff --git a/test/ClangModules/cfuncs_parse.swift b/test/ClangModules/cfuncs_parse.swift index 078a2956d2e68..6b35b6cd160d8 100644 --- a/test/ClangModules/cfuncs_parse.swift +++ b/test/ClangModules/cfuncs_parse.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 -I %S/Inputs %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify -I %S/Inputs %s import cfuncs diff --git a/test/ClangModules/clang_builtin.swift b/test/ClangModules/clang_builtin.swift index daaaced636fb0..a0f58d5768c6a 100644 --- a/test/ClangModules/clang_builtin.swift +++ b/test/ClangModules/clang_builtin.swift @@ -1,7 +1,7 @@ // Note: this test intentionally uses a private module cache. // // RUN: rm -rf %t/clang-module-cache -// RUN: %target-build-swift -parse -Xfrontend -verify -module-cache-path %t/clang-module-cache -sdk %sdk -target %target-triple %s +// RUN: %target-swift-frontend -parse -verify -module-cache-path %t/clang-module-cache %s // RUN: ls -lR %t/clang-module-cache | FileCheck %s // CHECK: _Builtin_intrinsics{{.*}}.pcm // REQUIRES: sdk diff --git a/test/ClangModules/cstring_parse.swift b/test/ClangModules/cstring_parse.swift index 07a3593e5735b..c115ccb4b98e3 100644 --- a/test/ClangModules/cstring_parse.swift +++ b/test/ClangModules/cstring_parse.swift @@ -2,7 +2,7 @@ // // RUN: rm -rf %t // RUN: mkdir -p %t -// RUN: %swift %clang-importer-sdk -parse -verify -module-cache-path %t/clang-module-cache -target x86_64-apple-macosx10.9 -I %S/Inputs %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify -module-cache-path %t/clang-module-cache -I %S/Inputs %s // RUN: ls -lR %t/clang-module-cache | FileCheck %s // CHECK: cfuncs{{.*}}.pcm diff --git a/test/ClangModules/ctypes_ir.swift b/test/ClangModules/ctypes_ir.swift index 7006f664234e7..09b59a28a0cfe 100644 --- a/test/ClangModules/ctypes_ir.swift +++ b/test/ClangModules/ctypes_ir.swift @@ -1,4 +1,6 @@ -// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 -emit-ir -o - -primary-file %s | FileCheck %s +// RUN: %target-swift-frontend %clang-importer-sdk -emit-ir -o - -primary-file %s | FileCheck %s + +// REQUIRES: OS=macosx import ctypes diff --git a/test/ClangModules/ctypes_parse.swift b/test/ClangModules/ctypes_parse.swift index 5afca0f5a897f..d91fae905c139 100644 --- a/test/ClangModules/ctypes_parse.swift +++ b/test/ClangModules/ctypes_parse.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 %s +// RUN: %target-parse-verify-swift %clang-importer-sdk import ctypes import CoreGraphics @@ -22,7 +22,13 @@ func testTribool() { func testAnonEnum() { var a = AnonConst1 a = AnonConst2 +#if arch(i386) || arch(arm) + var a2: CUnsignedLongLong = a +#elseif arch(x86_64) || arch(arm64) var a2: CUnsignedLong = a +#else + __portMe() +#endif } func testAnonEnumSmall() { @@ -137,13 +143,6 @@ func testImportMacTypes() { var t9_qual : ctypes.Float32 = 0.0 // expected-error {{no type named 'Float32' in module 'ctypes'}} var t10_qual : ctypes.Float64 = 0.0 // expected-error {{no type named 'Float64' in module 'ctypes'}} - - // FIXME: this should work. We cannot map Float80 to 'long double' because - // 'long double' has size of 128 bits on SysV ABI, and 80 != 128. 'long - // double' is currently not handled by the importer, so it cannot be - // imported in normal way either. - var t11_unqual : Float80 = Float80_test // expected-error {{use of unresolved identifier 'Float80_test'}} - var t11_qual : ctypes.Float80 = 0.0 // expected-error {{no type named 'Float80' in module 'ctypes'}} } var word: Word = 0 diff --git a/test/ClangModules/ctypes_parse_macosx.swift b/test/ClangModules/ctypes_parse_macosx.swift new file mode 100644 index 0000000000000..0a5e2d1fe27d7 --- /dev/null +++ b/test/ClangModules/ctypes_parse_macosx.swift @@ -0,0 +1,15 @@ +// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify %s + +// REQUIRES: OS=macosx + +import ctypes + +func testImportMacTypes() { + // FIXME: this should work. We cannot map Float80 to 'long double' because + // 'long double' has size of 128 bits on SysV ABI, and 80 != 128. 'long + // double' is currently not handled by the importer, so it cannot be + // imported in normal way either. + var t11_unqual : Float80 = Float80_test // expected-error {{use of unresolved identifier 'Float80_test'}} + var t11_qual : ctypes.Float80 = 0.0 // expected-error {{no type named 'Float80' in module 'ctypes'}} +} + diff --git a/test/ClangModules/ctypes_parse_union.swift b/test/ClangModules/ctypes_parse_union.swift index 4351ed0b01cbb..4bc384a5f21d9 100644 --- a/test/ClangModules/ctypes_parse_union.swift +++ b/test/ClangModules/ctypes_parse_union.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -enable-union-import -parse -verify -target x86_64-apple-macosx10.9 %s +// RUN: %target-swift-frontend %clang-importer-sdk -enable-union-import -parse -verify %s import ctypes diff --git a/test/ClangModules/custom-include.swift b/test/ClangModules/custom-include.swift index 10d4ffae697b0..025ed336a0c75 100644 --- a/test/ClangModules/custom-include.swift +++ b/test/ClangModules/custom-include.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -I %S/Inputs/custom-modules %s -parse -verify +// RUN: %target-swift-frontend %clang-importer-sdk -I %S/Inputs/custom-modules %s -parse -verify import ExternIntX diff --git a/test/ClangModules/cvars_ir.swift b/test/ClangModules/cvars_ir.swift index 16bf95d82bb67..83d96665b235a 100644 --- a/test/ClangModules/cvars_ir.swift +++ b/test/ClangModules/cvars_ir.swift @@ -1,4 +1,6 @@ -// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 %s -emit-ir -o - | FileCheck %s +// RUN: %target-swift-frontend %clang-importer-sdk %s -emit-ir -o - | FileCheck %s + +// REQUIRES: OS=macosx import cvars diff --git a/test/ClangModules/cvars_parse.swift b/test/ClangModules/cvars_parse.swift index 764b1aa4306bc..f6bda9c05e86f 100644 --- a/test/ClangModules/cvars_parse.swift +++ b/test/ClangModules/cvars_parse.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify %s import cvars diff --git a/test/ClangModules/diags_from_module.swift b/test/ClangModules/diags_from_module.swift index c014eb81096b7..3849b60dcfdbe 100644 --- a/test/ClangModules/diags_from_module.swift +++ b/test/ClangModules/diags_from_module.swift @@ -1,4 +1,4 @@ -// RUN: not %swift -parse %s -F %S/Inputs/frameworks -Xcc -D -Xcc FOO 2> %t.err.txt +// RUN: not %target-swift-frontend -parse %s -F %S/Inputs/frameworks -Xcc -D -Xcc FOO 2> %t.err.txt // RUN: FileCheck -input-file=%t.err.txt %s import Module @@ -7,7 +7,7 @@ import Module // CHECK: Sub2.h:2:9: error: could not build module 'Another' // CHECK: diags_from_module.swift:[[@LINE-4]]:8: error: could not build Objective-C module 'Module' -// RUN: %swift -parse %s -F %S/Inputs/frameworks 2> %tw.err.txt +// RUN: %target-swift-frontend -parse %s -F %S/Inputs/frameworks 2> %tw.err.txt // RUN: FileCheck -input-file=%tw.err.txt %s -check-prefix=CHECK-WARN // CHECK-WARN: Sub2.h:7:2: warning: here is some warning about something diff --git a/test/ClangModules/macros.swift b/test/ClangModules/macros.swift index 12a04d452563d..f86fb99334482 100644 --- a/test/ClangModules/macros.swift +++ b/test/ClangModules/macros.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify %s @exported import macros diff --git a/test/ClangModules/mapped-integers.swift.gyb b/test/ClangModules/mapped-integers.swift.gyb index b0134286138aa..8d9d7bade6a7a 100644 --- a/test/ClangModules/mapped-integers.swift.gyb +++ b/test/ClangModules/mapped-integers.swift.gyb @@ -1,6 +1,6 @@ // RUN: rm -rf %t && mkdir -p %t // RUN: %S/../../utils/gyb %s -o %t/mapped-integers.swift -// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 %t/mapped-integers.swift +// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify %t/mapped-integers.swift import ctypes diff --git a/test/ClangModules/missing-adapter.swift b/test/ClangModules/missing-adapter.swift index 2985a6e89ae8d..07afb4f63c549 100644 --- a/test/ClangModules/missing-adapter.swift +++ b/test/ClangModules/missing-adapter.swift @@ -1,9 +1,9 @@ // RUN: rm -rf %t // RUN: mkdir -p %t -// RUN: %swift -emit-module %S/Inputs/adapter.swift -sdk %S/Inputs -I %S/Inputs/custom-modules -module-name ClangModuleWithAdapter -o %t -// RUN: %swift %s -sdk %S/Inputs -I %S/Inputs/custom-modules -I %t -parse -// RUN: %swift %s -I %t -parse -show-diagnostics-after-fatal -verify +// RUN: %target-swift-frontend -emit-module %S/Inputs/adapter.swift -sdk %S/Inputs -I %S/Inputs/custom-modules -module-name ClangModuleWithAdapter -o %t +// RUN: %target-swift-frontend %s -sdk %S/Inputs -I %S/Inputs/custom-modules -I %t -parse +// RUN: %target-swift-frontend %s -I %t -parse -show-diagnostics-after-fatal -verify // When run without the underlying SDK, we should get an error here. import ClangModuleWithAdapter // expected-error{{cannot load underlying module for 'ClangModuleWithAdapter'}} diff --git a/test/ClangModules/no-sdk.swift b/test/ClangModules/no-sdk.swift index 27b789e17d8d8..e4fddc726511c 100644 --- a/test/ClangModules/no-sdk.swift +++ b/test/ClangModules/no-sdk.swift @@ -1,5 +1,5 @@ // RUN: rm -rf %t -// RUN: %swift -parse -sdk "" -I %S/Inputs/custom-modules %s +// RUN: %target-swift-frontend -parse -sdk "" -I %S/Inputs/custom-modules %s // Verify that we can still import modules even without an SDK. import ExternIntX; diff --git a/test/ClangModules/non-modular-include.swift b/test/ClangModules/non-modular-include.swift index 9a1ff6977d349..7f3666d78d99d 100644 --- a/test/ClangModules/non-modular-include.swift +++ b/test/ClangModules/non-modular-include.swift @@ -1,5 +1,5 @@ // RUN: rm -rf %t && mkdir -p %t -// RUN: not %swift -parse %s -I %S/Inputs/non-modular -F %S/Inputs/non-modular 2>&1 | FileCheck %s +// RUN: not %target-swift-frontend -parse %s -I %S/Inputs/non-modular -F %S/Inputs/non-modular 2>&1 | FileCheck %s // CHECK: {{.+}}/non-modular/Foo.framework/Headers/Foo.h:1:9: error: include of non-modular header inside framework module 'Foo' // CHECK: error: could not build Objective-C module 'Foo' diff --git a/test/ClangModules/nullability.swift b/test/ClangModules/nullability.swift index f0b870196d2b8..3b51461dc899e 100644 --- a/test/ClangModules/nullability.swift +++ b/test/ClangModules/nullability.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -parse %s -verify import nullability; diff --git a/test/ClangModules/objc_bridge_categories.swift b/test/ClangModules/objc_bridge_categories.swift index d0473917462a8..09f09edb14f5e 100644 --- a/test/ClangModules/objc_bridge_categories.swift +++ b/test/ClangModules/objc_bridge_categories.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -I %S/Inputs/custom-modules %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -parse -I %S/Inputs/custom-modules %s -verify // Test the use of Objective-C categories on the value types that // bridge to Objective-C class types. diff --git a/test/ClangModules/objc_bridging.swift b/test/ClangModules/objc_bridging.swift index 9eb3ad2e1ca46..2243691ebf250 100644 --- a/test/ClangModules/objc_bridging.swift +++ b/test/ClangModules/objc_bridging.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -parse-as-library -verify -target x86_64-apple-macosx10.9 %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -parse-as-library -verify %s import Foundation diff --git a/test/ClangModules/objc_bridging_generics.swift b/test/ClangModules/objc_bridging_generics.swift index 13ae2db1ad516..84e094e6e99a3 100644 --- a/test/ClangModules/objc_bridging_generics.swift +++ b/test/ClangModules/objc_bridging_generics.swift @@ -1,4 +1,4 @@ -// RUN: %swift -sdk %S/../Inputs/objc-generics-sdk -I %S/../Inputs/objc-generics-sdk/swift-modules -enable-source-import -parse -parse-as-library -verify -target x86_64-apple-macosx10.9 %s +// RUN: %target-swift-frontend -sdk %S/../Inputs/objc-generics-sdk -I %S/../Inputs/objc-generics-sdk/swift-modules -enable-source-import -parse -parse-as-library -verify %s // REQUIRES: objc_generics diff --git a/test/ClangModules/objc_diags.swift b/test/ClangModules/objc_diags.swift index 7f1ec5ca2bf58..2daa1f5287cd3 100644 --- a/test/ClangModules/objc_diags.swift +++ b/test/ClangModules/objc_diags.swift @@ -1,14 +1,7 @@ -// RUN: not %swift %clang-importer-sdk -parse -target x86_64-apple-macosx10.9 %s -debug-constraints 2> %t.out -// RUN: FileCheck %s < %t.out +// RUN: %target-swift-frontend %clang-importer-sdk -parse %s -verify import ObjectiveC func instanceMethod(b: B) { - // CHECK: found solution - // CHECK: found solution - // CHECK: found solution - // CHECK: found solution - // CHECK: found solution - // FIXME: improve this diagnostic - b.method(1, 2.5) + b.method(1, 2.5) // expected-error {{cannot invoke 'method' with an argument list of type '(Int, Double)'}} } diff --git a/test/ClangModules/objc_factory_method.swift b/test/ClangModules/objc_factory_method.swift index d0f0eeecd1722..fa0b758c6937e 100644 --- a/test/ClangModules/objc_factory_method.swift +++ b/test/ClangModules/objc_factory_method.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -parse %s -verify import AppKit import NotificationCenter diff --git a/test/ClangModules/objc_failable_inits.swift b/test/ClangModules/objc_failable_inits.swift index 1cbff0d0ffd09..23b9c52697e30 100644 --- a/test/ClangModules/objc_failable_inits.swift +++ b/test/ClangModules/objc_failable_inits.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -parse %s -verify import Foundation diff --git a/test/ClangModules/objc_implicit_properties.swift b/test/ClangModules/objc_implicit_properties.swift index ca6031d77ac3e..1c0be60e51a73 100644 --- a/test/ClangModules/objc_implicit_properties.swift +++ b/test/ClangModules/objc_implicit_properties.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -target x86_64-apple-macosx10.9 -I %S/Inputs/custom-modules -enable-objc-implicit-properties %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -parse -I %S/Inputs/custom-modules -enable-objc-implicit-properties %s -verify import ObjectiveC import ObjCImplicitProperties diff --git a/test/ClangModules/objc_implicit_with.swift b/test/ClangModules/objc_implicit_with.swift index 7a34fc58afb1a..191ffbc18c8ae 100644 --- a/test/ClangModules/objc_implicit_with.swift +++ b/test/ClangModules/objc_implicit_with.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -parse %s -verify import AppKit diff --git a/test/ClangModules/objc_init.swift b/test/ClangModules/objc_init.swift index a9ccfacf9ef15..0e4748be7160c 100644 --- a/test/ClangModules/objc_init.swift +++ b/test/ClangModules/objc_init.swift @@ -1,4 +1,7 @@ -// RUN: %swift %clang-importer-sdk -emit-sil -I %S/Inputs/custom-modules -target x86_64-apple-macosx10.9 %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -emit-sil -I %S/Inputs/custom-modules %s -verify + +// REQUIRES: OS=macosx +// FIXME: test/ClangModules/objc_init.swift should not require REQUIRES: OS=macosx import AppKit import objc_ext diff --git a/test/ClangModules/objc_init_conformance.swift b/test/ClangModules/objc_init_conformance.swift index fe12ffcf391a6..4ef061eabd92a 100644 --- a/test/ClangModules/objc_init_conformance.swift +++ b/test/ClangModules/objc_init_conformance.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -parse %s -verify // Note: this is in a separate file because -verify doesn't complain // about diagnostics from other files. diff --git a/test/ClangModules/objc_ir.swift b/test/ClangModules/objc_ir.swift index ded2555dcc1e3..5679d1194abbe 100644 --- a/test/ClangModules/objc_ir.swift +++ b/test/ClangModules/objc_ir.swift @@ -1,4 +1,6 @@ -// RUN: %swift %clang-importer-sdk -I %S/Inputs/custom-modules -target x86_64-apple-macosx10.9 -emit-ir -o - -primary-file %s | FileCheck %s +// RUN: %target-swift-frontend %clang-importer-sdk -I %S/Inputs/custom-modules -emit-ir -o - -primary-file %s | FileCheck %s + +// REQUIRES: OS=macosx // CHECK: [[B:%CSo1B]] = type diff --git a/test/ClangModules/objc_ns_enum.swift b/test/ClangModules/objc_ns_enum.swift index 0dc5cd52dcfcf..34471c99d2740 100644 --- a/test/ClangModules/objc_ns_enum.swift +++ b/test/ClangModules/objc_ns_enum.swift @@ -1,6 +1,6 @@ -// RUN: %swift %clang-importer-sdk -parse -target x86_64-apple-macosx10.9 %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -parse %s -verify // -- Check that we can successfully round-trip. -// RUN: %swift %clang-importer-sdk -emit-ir -target x86_64-apple-macosx10.9 %s >/dev/null +// RUN: %target-swift-frontend %clang-importer-sdk -emit-ir %s >/dev/null import Foundation import user_objc diff --git a/test/ClangModules/objc_ns_enum_aliases.swift b/test/ClangModules/objc_ns_enum_aliases.swift index 9468f8648e25e..c295a98c60a2d 100644 --- a/test/ClangModules/objc_ns_enum_aliases.swift +++ b/test/ClangModules/objc_ns_enum_aliases.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -target x86_64-apple-macosx10.9 %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -parse %s -verify import Foundation diff --git a/test/ClangModules/objc_ns_options.swift b/test/ClangModules/objc_ns_options.swift index 1f594db36500c..7bac9246021c9 100644 --- a/test/ClangModules/objc_ns_options.swift +++ b/test/ClangModules/objc_ns_options.swift @@ -1,6 +1,6 @@ -// RUN: %swift %clang-importer-sdk -parse -target x86_64-apple-macosx10.9 %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -parse %s -verify // -- Check that we can successfully round-trip. -// RUN: %swift %clang-importer-sdk -emit-ir -target x86_64-apple-macosx10.9 %s >/dev/null +// RUN: %target-swift-frontend %clang-importer-sdk -emit-ir %s >/dev/null import Foundation diff --git a/test/ClangModules/objc_nsmanagedobject.swift b/test/ClangModules/objc_nsmanagedobject.swift index 1671ad58021fa..e166f0701cc76 100644 --- a/test/ClangModules/objc_nsmanagedobject.swift +++ b/test/ClangModules/objc_nsmanagedobject.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -I %S/Inputs/custom-modules -parse -parse-as-library -verify -target x86_64-apple-macosx10.9 %s %S/Inputs/objc_nsmanaged_other.swift +// RUN: %target-swift-frontend %clang-importer-sdk -I %S/Inputs/custom-modules -parse -parse-as-library -verify %s %S/Inputs/objc_nsmanaged_other.swift import CoreData diff --git a/test/ClangModules/objc_override.swift b/test/ClangModules/objc_override.swift index d2e73a399d660..1b0fa9f8fa811 100644 --- a/test/ClangModules/objc_override.swift +++ b/test/ClangModules/objc_override.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -emit-sil -I %S/Inputs/custom-modules -target x86_64-apple-macosx10.9 %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -emit-sil -I %S/Inputs/custom-modules %s -verify import Foundation diff --git a/test/ClangModules/objc_parse.swift b/test/ClangModules/objc_parse.swift index 73b485cb82005..ccff1f3f77f3d 100644 --- a/test/ClangModules/objc_parse.swift +++ b/test/ClangModules/objc_parse.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -emit-sil -I %S/Inputs/custom-modules -target x86_64-apple-macosx10.9 %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -emit-sil -I %S/Inputs/custom-modules %s -verify import AppKit import AVFoundation diff --git a/test/ClangModules/objc_parse_split.swift b/test/ClangModules/objc_parse_split.swift index 701befcad7442..86f3a41195c5a 100644 --- a/test/ClangModules/objc_parse_split.swift +++ b/test/ClangModules/objc_parse_split.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -emit-sil -I %S/Inputs/custom-modules -target x86_64-apple-macosx10.9 -split-objc-selectors %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -emit-sil -I %S/Inputs/custom-modules -split-objc-selectors %s -verify import AppKit import objc_ext diff --git a/test/ClangModules/objc_proxies.swift b/test/ClangModules/objc_proxies.swift index 8f95a1d316611..2b56fe5f7debd 100644 --- a/test/ClangModules/objc_proxies.swift +++ b/test/ClangModules/objc_proxies.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -target x86_64-apple-macosx10.9 -I %S/Inputs/custom-modules %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -parse -I %S/Inputs/custom-modules %s -verify import AppKit diff --git a/test/ClangModules/optional.swift b/test/ClangModules/optional.swift index 3d42529601d6e..94b4d730b59c6 100644 --- a/test/ClangModules/optional.swift +++ b/test/ClangModules/optional.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -I %S/Inputs/custom-modules -target x86_64-apple-macosx10.9 -emit-silgen -o - %s | FileCheck %s +// RUN: %target-swift-frontend %clang-importer-sdk -I %S/Inputs/custom-modules -emit-silgen -o - %s | FileCheck %s import ObjectiveC import Foundation diff --git a/test/ClangModules/protocol_metatype_object_conversion.swift b/test/ClangModules/protocol_metatype_object_conversion.swift index 5d5391dec8b00..c0ec283b42953 100644 --- a/test/ClangModules/protocol_metatype_object_conversion.swift +++ b/test/ClangModules/protocol_metatype_object_conversion.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify %s -disable-objc-attr-requires-foundation-module import ObjectiveC diff --git a/test/ClangModules/script.swift b/test/ClangModules/script.swift index f98ab839bc781..f75e7cd8474db 100644 --- a/test/ClangModules/script.swift +++ b/test/ClangModules/script.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -verify -I %S/Inputs/custom-modules %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify -I %S/Inputs/custom-modules %s import script // Clang module diff --git a/test/ClangModules/sdk-protocol-class.swift b/test/ClangModules/sdk-protocol-class.swift index c8a928ddf2c62..17732aa0baee7 100644 --- a/test/ClangModules/sdk-protocol-class.swift +++ b/test/ClangModules/sdk-protocol-class.swift @@ -1,9 +1,9 @@ // RUN: rm -rf %t -// RUN: %target-build-swift -parse %s +// RUN: %target-swift-frontend -parse %s -// RUN: %target-build-swift -parse %S/Inputs/sdk-protocol-class/os1.swift -// RUN: %target-build-swift -parse %S/Inputs/sdk-protocol-class/os2.swift -// RUN: %target-build-swift -parse %S/Inputs/sdk-protocol-class/os3.swift +// RUN: %target-swift-frontend -parse %S/Inputs/sdk-protocol-class/os1.swift +// RUN: %target-swift-frontend -parse %S/Inputs/sdk-protocol-class/os2.swift +// RUN: %target-swift-frontend -parse %S/Inputs/sdk-protocol-class/os3.swift // REQUIRES: sdk diff --git a/test/ClangModules/sdk.swift b/test/ClangModules/sdk.swift index 8e455181f988a..dda5faf56f94b 100644 --- a/test/ClangModules/sdk.swift +++ b/test/ClangModules/sdk.swift @@ -1,4 +1,4 @@ -// RUN: %target-swift-frontend -parse -verify %s +// RUN: %target-swift-frontend -parse -verify %s import Foundation diff --git a/test/ClangModules/serialization.swift b/test/ClangModules/serialization.swift index 3d41175e5b99f..af47398c8b97b 100644 --- a/test/ClangModules/serialization.swift +++ b/test/ClangModules/serialization.swift @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: mkdir -p %t -// RUN: %swift -emit-module-path %t/SerializationHelper.swiftmodule -I %S/Inputs/custom-modules %S/Inputs/SerializationHelper.swift -// RUN: %swift -parse -I %t -I %S/Inputs/custom-modules %s -verify +// RUN: %target-swift-frontend -emit-module-path %t/SerializationHelper.swiftmodule -I %S/Inputs/custom-modules %S/Inputs/SerializationHelper.swift +// RUN: %target-swift-frontend -parse -I %t -I %S/Inputs/custom-modules %s -verify import SerializationHelper diff --git a/test/ClangModules/swift_modules.swift b/test/ClangModules/swift_modules.swift index 3c7932110b135..3e3b2908314d0 100644 --- a/test/ClangModules/swift_modules.swift +++ b/test/ClangModules/swift_modules.swift @@ -1,3 +1,3 @@ -// RUN: %swift -parse -parse-as-library -verify -target x86_64-apple-macosx10.9 %clang-importer-sdk %S/../Inputs/clang-importer-sdk/swift-modules/Foundation.swift -// RUN: %swift -parse -parse-as-library -verify -target x86_64-apple-macosx10.9 %clang-importer-sdk %S/../Inputs/clang-importer-sdk/swift-modules/ObjectiveC.swift +// RUN: %target-swift-frontend -parse -parse-as-library -verify %clang-importer-sdk %S/../Inputs/clang-importer-sdk/swift-modules/Foundation.swift +// RUN: %target-swift-frontend -parse -parse-as-library -verify %clang-importer-sdk %S/../Inputs/clang-importer-sdk/swift-modules/ObjectiveC.swift diff --git a/test/ClangModules/uikit_hacks.swift b/test/ClangModules/uikit_hacks.swift index e594f7dd42f7f..b32c20e644e4a 100644 --- a/test/ClangModules/uikit_hacks.swift +++ b/test/ClangModules/uikit_hacks.swift @@ -1,4 +1,9 @@ -// RUN: %swift %clang-importer-sdk -parse -verify %s +// RUN: %target-swift-frontend -parse -verify %s + +// REQUIRES: OS=ios +// FIXME: this test could use the %clang-importer-sdk, but swift tries to +// deserialize the real UIKit module and match it up with the mock SDK, and +// crashes. Another reason to stop using source imports. import UIKit diff --git a/test/Constraints/array_literal.swift b/test/Constraints/array_literal.swift index b89ccd740a51a..e4aad21bf2629 100644 --- a/test/Constraints/array_literal.swift +++ b/test/Constraints/array_literal.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift struct IntList : ArrayLiteralConvertible { typealias Element = Int diff --git a/test/Constraints/assignment.swift b/test/Constraints/assignment.swift index 8309dfa01362d..3349435030774 100644 --- a/test/Constraints/assignment.swift +++ b/test/Constraints/assignment.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift struct X { } struct Y { } diff --git a/test/Constraints/associated_self_types.swift b/test/Constraints/associated_self_types.swift index 98b857fbc5ecd..46be04685a0de 100644 --- a/test/Constraints/associated_self_types.swift +++ b/test/Constraints/associated_self_types.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol P : CollectionType { init() diff --git a/test/Constraints/associated_types.swift b/test/Constraints/associated_types.swift index 6bd3edb300d68..0fa820f588b96 100644 --- a/test/Constraints/associated_types.swift +++ b/test/Constraints/associated_types.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift protocol Runcible { typealias Runcee diff --git a/test/Constraints/bridging.swift b/test/Constraints/bridging.swift index f01035309ef58..277f2c49e8f46 100644 --- a/test/Constraints/bridging.swift +++ b/test/Constraints/bridging.swift @@ -1,5 +1,4 @@ -// RUN: rm -rf %t && mkdir %t -// RUN: %target-swift-frontend %s -parse -verify +// RUN: %target-parse-verify-swift import Foundation diff --git a/test/Constraints/casts.swift b/test/Constraints/casts.swift index 2666be7dd0a32..61ddccc4625d3 100644 --- a/test/Constraints/casts.swift +++ b/test/Constraints/casts.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift class B { init() {} diff --git a/test/Constraints/class.swift b/test/Constraints/class.swift index 970f2130d931c..679996744fc97 100644 --- a/test/Constraints/class.swift +++ b/test/Constraints/class.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift class A { } class B : A { } diff --git a/test/Constraints/closures.swift b/test/Constraints/closures.swift index e7989260037fa..a046449e8db0c 100644 --- a/test/Constraints/closures.swift +++ b/test/Constraints/closures.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift func myMap(array: [T1], fn: (T1) -> T2) -> [T2] {} diff --git a/test/Constraints/condition.swift b/test/Constraints/condition.swift index ade72740041a5..3feafb24ca241 100644 --- a/test/Constraints/condition.swift +++ b/test/Constraints/condition.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Basic support for Bool func simpleIf(b: Bool) { diff --git a/test/Constraints/construction.swift b/test/Constraints/construction.swift index d673984e0955a..14a707af17f6c 100644 --- a/test/Constraints/construction.swift +++ b/test/Constraints/construction.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift struct X { var i : Int, j : Int diff --git a/test/Constraints/default_literals.swift b/test/Constraints/default_literals.swift index e242ac3093c24..bd922d9904e38 100644 --- a/test/Constraints/default_literals.swift +++ b/test/Constraints/default_literals.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift func acceptInt(inout _ : Int) {} func acceptDouble(inout _ : Double) {} diff --git a/test/Constraints/diag_ambiguities.swift b/test/Constraints/diag_ambiguities.swift index 558730b426d0f..40ca3c8646209 100644 --- a/test/Constraints/diag_ambiguities.swift +++ b/test/Constraints/diag_ambiguities.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift func f0(i: Int, d: Double) {} // expected-note{{found this candidate}} func f0(d: Double, i: Int) {} // expected-note{{found this candidate}} diff --git a/test/Constraints/diag_ambiguities_module.swift b/test/Constraints/diag_ambiguities_module.swift index aa9c274c6a0b4..1837cf93c7662 100644 --- a/test/Constraints/diag_ambiguities_module.swift +++ b/test/Constraints/diag_ambiguities_module.swift @@ -1,6 +1,6 @@ // RUN: rm -rf %t && mkdir %t -// RUN: %swift -emit-module -o %t %S/Inputs/has_ambiguities.swift -// RUN: not %swift -parse %s -I %t 2>&1 | FileCheck %s +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/has_ambiguities.swift +// RUN: not %target-swift-frontend -parse %s -I %t 2>&1 | FileCheck %s import has_ambiguities diff --git a/test/Constraints/diagnostics.swift b/test/Constraints/diagnostics.swift index a60472eb89213..da8ee55afc8b7 100644 --- a/test/Constraints/diagnostics.swift +++ b/test/Constraints/diagnostics.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol P { typealias SomeType diff --git a/test/Constraints/dictionary_literal.swift b/test/Constraints/dictionary_literal.swift index 5a5a59a214af3..887df682143b6 100644 --- a/test/Constraints/dictionary_literal.swift +++ b/test/Constraints/dictionary_literal.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift final class DictStringInt : DictionaryLiteralConvertible { typealias Key = String diff --git a/test/Constraints/dynamic_lookup.swift b/test/Constraints/dynamic_lookup.swift index 9397633eeaf51..7a70a48b1c7c3 100644 --- a/test/Constraints/dynamic_lookup.swift +++ b/test/Constraints/dynamic_lookup.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift @objc class A { diff --git a/test/Constraints/fixes.swift b/test/Constraints/fixes.swift index 9e3c7344b44b7..5810d1e7b3e30 100644 --- a/test/Constraints/fixes.swift +++ b/test/Constraints/fixes.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift func f1() -> Int { } func f2(Int = 5) -> Int { } diff --git a/test/Constraints/function.swift b/test/Constraints/function.swift index 423fe17edcfa3..3f8c416d5356d 100644 --- a/test/Constraints/function.swift +++ b/test/Constraints/function.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift func f0(x: Float) -> Float {} func f1(x: Float) -> Float {} diff --git a/test/Constraints/generic_construction_deduction.swift b/test/Constraints/generic_construction_deduction.swift index 91266e3dc5e0c..295513fe3d5dd 100644 --- a/test/Constraints/generic_construction_deduction.swift +++ b/test/Constraints/generic_construction_deduction.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift struct A { // Can deduce from this constructor diff --git a/test/Constraints/generic_overload.swift b/test/Constraints/generic_overload.swift index 17e984f7a2b24..5ec86d394d297 100644 --- a/test/Constraints/generic_overload.swift +++ b/test/Constraints/generic_overload.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol P1 { typealias Assoc } protocol P2 : P1 { typealias Assoc } diff --git a/test/Constraints/generic_protocol_witness.swift b/test/Constraints/generic_protocol_witness.swift index 016ec2d54966f..b83a9275f46e5 100644 --- a/test/Constraints/generic_protocol_witness.swift +++ b/test/Constraints/generic_protocol_witness.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift infix operator • { } diff --git a/test/Constraints/generics.swift b/test/Constraints/generics.swift index 11953e38e40a1..dc940cf684f9f 100644 --- a/test/Constraints/generics.swift +++ b/test/Constraints/generics.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift infix operator +++ {} diff --git a/test/Constraints/if_expr.swift b/test/Constraints/if_expr.swift index 8762fe338d44b..10c4743511dd8 100644 --- a/test/Constraints/if_expr.swift +++ b/test/Constraints/if_expr.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift struct MyLogicValue : BooleanType { var boolValue: Bool { diff --git a/test/Constraints/incomplete_function_ref.swift b/test/Constraints/incomplete_function_ref.swift index 23ae58247e4b6..66dd88c2fdd09 100644 --- a/test/Constraints/incomplete_function_ref.swift +++ b/test/Constraints/incomplete_function_ref.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift Array.map // expected-error{{argument for generic parameter 'T' could not be inferred}} diff --git a/test/Constraints/invalid_archetype_constraint.swift b/test/Constraints/invalid_archetype_constraint.swift index 3f1c023ff1856..20f01d5e59b84 100644 --- a/test/Constraints/invalid_archetype_constraint.swift +++ b/test/Constraints/invalid_archetype_constraint.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol P { typealias Element diff --git a/test/Constraints/invalid_constraint_lookup.swift b/test/Constraints/invalid_constraint_lookup.swift index 6e4bf7ac3ad0c..21445c8aa653a 100644 --- a/test/Constraints/invalid_constraint_lookup.swift +++ b/test/Constraints/invalid_constraint_lookup.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol P { typealias A diff --git a/test/Constraints/invalid_logicvalue_coercion.swift b/test/Constraints/invalid_logicvalue_coercion.swift index e43567bc9cb9c..25071eb5cb985 100644 --- a/test/Constraints/invalid_logicvalue_coercion.swift +++ b/test/Constraints/invalid_logicvalue_coercion.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class C {} var c = C() diff --git a/test/Constraints/invalid_stdlib.swift b/test/Constraints/invalid_stdlib.swift index 1b03f2c6a4437..1d86c59a307c5 100644 --- a/test/Constraints/invalid_stdlib.swift +++ b/test/Constraints/invalid_stdlib.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -parse-stdlib -verify %s +// RUN: %target-parse-verify-swift -parse-stdlib // This file is for tests that used to cause the type checker to crash. diff --git a/test/Constraints/invalid_stdlib_2.swift b/test/Constraints/invalid_stdlib_2.swift index c5afe6e3b9e05..62e06a9c6bb8e 100644 --- a/test/Constraints/invalid_stdlib_2.swift +++ b/test/Constraints/invalid_stdlib_2.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift class Dictionary : DictionaryLiteralConvertible { // expected-error {{type 'Dictionary' does not conform to protocol 'DictionaryLiteralConvertible'}} typealias Key = K diff --git a/test/Constraints/keyword_arguments.swift b/test/Constraints/keyword_arguments.swift index 2efa7b322eee9..e2a3f3c764756 100644 --- a/test/Constraints/keyword_arguments.swift +++ b/test/Constraints/keyword_arguments.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Single extraneous keyword argument (tuple-to-scalar) func f1(a: Int) { } diff --git a/test/Constraints/lvalues.swift b/test/Constraints/lvalues.swift index 63b5cad467813..3b0181c9ca2e1 100644 --- a/test/Constraints/lvalues.swift +++ b/test/Constraints/lvalues.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift func f0(inout x: Int) {} func f1(inout x: T) {} diff --git a/test/Constraints/members.swift b/test/Constraints/members.swift index d55be7eac966b..a0e42f61cead3 100644 --- a/test/Constraints/members.swift +++ b/test/Constraints/members.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift import Swift diff --git a/test/Constraints/metatypes.swift b/test/Constraints/metatypes.swift index 6beea36045142..718533e8b344c 100644 --- a/test/Constraints/metatypes.swift +++ b/test/Constraints/metatypes.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift class A {} class B : A {} diff --git a/test/Constraints/nested_generics.swift b/test/Constraints/nested_generics.swift index db7cd2b07647d..9983bfe764abe 100644 --- a/test/Constraints/nested_generics.swift +++ b/test/Constraints/nested_generics.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift struct G { init() {} diff --git a/test/Constraints/optional.swift b/test/Constraints/optional.swift index 35f3ddf8c6911..6a98191043beb 100644 --- a/test/Constraints/optional.swift +++ b/test/Constraints/optional.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift class A { @objc func do_a() {} diff --git a/test/Constraints/overload.swift b/test/Constraints/overload.swift index 6d0d44a3a00b1..348fe0179f920 100644 --- a/test/Constraints/overload.swift +++ b/test/Constraints/overload.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift func f0(_: Float) -> Float {} func f0(_: Int) -> Int {} diff --git a/test/Constraints/patterns.swift b/test/Constraints/patterns.swift index 81213a80a1832..fdbe6c7423c1e 100644 --- a/test/Constraints/patterns.swift +++ b/test/Constraints/patterns.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift // Leaf expression patterns are matched to corresponding pieces of a switch // subject (TODO: or ~= expression) using ~= overload resolution. diff --git a/test/Constraints/protocols.swift b/test/Constraints/protocols.swift index 2687a1a5105f4..17e0af072473e 100644 --- a/test/Constraints/protocols.swift +++ b/test/Constraints/protocols.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift protocol Fooable { func foo() } protocol Barable { func bar() } diff --git a/test/Constraints/ranking.swift b/test/Constraints/ranking.swift index a1e8ef050e910..2687121647cb1 100644 --- a/test/Constraints/ranking.swift +++ b/test/Constraints/ranking.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift func f0(x: T) {} diff --git a/test/Constraints/recursive_concrete_constraints.swift b/test/Constraints/recursive_concrete_constraints.swift index e433d5635650b..2826f1b7e11b7 100644 --- a/test/Constraints/recursive_concrete_constraints.swift +++ b/test/Constraints/recursive_concrete_constraints.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift struct S : CollectionType { typealias Element = A.Generator.Element diff --git a/test/Constraints/same_types.swift b/test/Constraints/same_types.swift index b9eeb10fa7ee9..9044a7543bc2d 100644 --- a/test/Constraints/same_types.swift +++ b/test/Constraints/same_types.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift protocol Fooable { typealias Foo diff --git a/test/Constraints/subscript.swift b/test/Constraints/subscript.swift index 9471a58c5835e..5778963ea452d 100644 --- a/test/Constraints/subscript.swift +++ b/test/Constraints/subscript.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Simple subscript of arrays: func simpleSubscript(array: [Float], x: Int) -> Float { diff --git a/test/Constraints/super_constructor.swift b/test/Constraints/super_constructor.swift index ecfb6a3b825c0..3aab8ac71534b 100644 --- a/test/Constraints/super_constructor.swift +++ b/test/Constraints/super_constructor.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -parse-as-library -verify -enable-character-literals +// RUN: %target-parse-verify-swift -parse-as-library -enable-character-literals struct S { init() { diff --git a/test/Constraints/super_method.swift b/test/Constraints/super_method.swift index 34c0f5ce11ac5..706a1796c63ad 100644 --- a/test/Constraints/super_method.swift +++ b/test/Constraints/super_method.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -parse-as-library -verify +// RUN: %target-parse-verify-swift -parse-as-library struct S { func foo() { diff --git a/test/Constraints/tuple.swift b/test/Constraints/tuple.swift index aeb769e107b99..83060c97352e2 100644 --- a/test/Constraints/tuple.swift +++ b/test/Constraints/tuple.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift // Test various tuple constraints. diff --git a/test/Constraints/unchecked_optional.swift b/test/Constraints/unchecked_optional.swift index 7faf2096bc5dc..6cac3c7a07798 100644 --- a/test/Constraints/unchecked_optional.swift +++ b/test/Constraints/unchecked_optional.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift class A { func do_a() {} diff --git a/test/Constraints/unconstrained_generic.swift b/test/Constraints/unconstrained_generic.swift index d838891760d44..72f053920a2c0 100644 --- a/test/Constraints/unconstrained_generic.swift +++ b/test/Constraints/unconstrained_generic.swift @@ -1,4 +1,5 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift +// RUN: %target-parse-verify-swift func unconstrained(x: T) {} diff --git a/test/DebugInfo/ASTSection_linker.swift b/test/DebugInfo/ASTSection_linker.swift index 683d39ea2b3aa..1c861d4ab8142 100644 --- a/test/DebugInfo/ASTSection_linker.swift +++ b/test/DebugInfo/ASTSection_linker.swift @@ -3,7 +3,7 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -c -emit-module -o %t %S/ASTSection.swift +// RUN: %target-swift-frontend -c -emit-module -o %t %S/ASTSection.swift // Test the inline section mechanism. // RUN: ld %t/ASTSection.o -sectcreate __SWIFT __ast %t/ASTSection.swiftmodule -o %t/ASTSection.dylib -L%libdir/swift/macosx -dylib -lSystem diff --git a/test/DebugInfo/Constructors.swift b/test/DebugInfo/Constructors.swift index 09f70c0f5228e..ef7fff3cc6bbf 100644 --- a/test/DebugInfo/Constructors.swift +++ b/test/DebugInfo/Constructors.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s struct Foo { // Allocating constructor - should have no line table info. // CHECK: _TFV12Constructors3FooCfMS0_FT1xSi_S0_{{.*}}[ DW_TAG_subprogram ] [line [[@LINE+1]]] [def] [scope 0] [init] diff --git a/test/DebugInfo/Destructors.swift b/test/DebugInfo/Destructors.swift index 654b3e7e96087..52270d414412f 100644 --- a/test/DebugInfo/Destructors.swift +++ b/test/DebugInfo/Destructors.swift @@ -1,7 +1,8 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + class Foo { + // CHECK: _TFC11Destructors3FooD{{.*}} ; [ DW_TAG_subprogram ] [line [[@LINE-1]]] [def] [deinit] var x : Int - // CHECK: _TFC11Destructors3FooD{{.*}} ; [ DW_TAG_subprogram ] [line 2] [def] [deinit] init(x: Int) { self.x = x } func bar() -> (() -> ()) { return { println(self.x) } } } diff --git a/test/DebugInfo/DynamicSelf.swift b/test/DebugInfo/DynamicSelf.swift index 97feb3420eb50..78fbc67d743b7 100644 --- a/test/DebugInfo/DynamicSelf.swift +++ b/test/DebugInfo/DynamicSelf.swift @@ -1,4 +1,5 @@ -// RUN: %swift %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + class C { let n : Int required init (number i :Int) { diff --git a/test/DebugInfo/GlobalMetatype.swift b/test/DebugInfo/GlobalMetatype.swift index d76d4fa4f6c77..0e1cdd24e8496 100644 --- a/test/DebugInfo/GlobalMetatype.swift +++ b/test/DebugInfo/GlobalMetatype.swift @@ -1,4 +1,5 @@ -// RUN: %swift %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + class Foo {} println("Hello World!") // Test that no static variable for the metatype of Foo is emitted. diff --git a/test/DebugInfo/Imports.swift b/test/DebugInfo/Imports.swift index 5da390c482852..51a2647de9cea 100644 --- a/test/DebugInfo/Imports.swift +++ b/test/DebugInfo/Imports.swift @@ -1,8 +1,8 @@ // RUN: rm -rf %t && mkdir -p %t -// RUN: %swift -emit-module-path %t/basic.swiftmodule %S/basic.swift +// RUN: %target-swift-frontend -emit-module-path %t/basic.swiftmodule %S/basic.swift -// RUN: %swift -emit-ir -module-name Foo %s -I %t -g -o - | FileCheck %s -// RUN: %swift -c -module-name Foo %s -I %t -g -o - | llvm-dwarfdump - | FileCheck --check-prefix=DWARF %s +// RUN: %target-swift-frontend -emit-ir -module-name Foo %s -I %t -g -o - | FileCheck %s +// RUN: %target-swift-frontend -c -module-name Foo %s -I %t -g -o - | llvm-dwarfdump - | FileCheck --check-prefix=DWARF %s // CHECK-DAG: ![[FOOMODULE:[0-9]+]] = {{.*}}[ DW_TAG_module ] [Foo] // CHECK-DAG: !"0x3a\001\00", ![[THISFILE:[0-9]+]], ![[FOOMODULE]]} ; [ DW_TAG_imported_module ] diff --git a/test/DebugInfo/LinetableArtificialFn.swift b/test/DebugInfo/LinetableArtificialFn.swift index 806b22c64e7fe..d412c3694107d 100644 --- a/test/DebugInfo/LinetableArtificialFn.swift +++ b/test/DebugInfo/LinetableArtificialFn.swift @@ -1,10 +1,10 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - -disable-sil-linking | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - -disable-sil-linking | FileCheck %s // Verify that a helper function that is generated on-the-fly does // not mess up the linetable of the calling function. -// CHECK: store i64{{.*}}getelementptr -// CHECK: store i64{{.*}}getelementptr{{.*}}, !dbg ![[DBG:[0-9]+]] +// CHECK: store {{(i32|i64)}} {{.*}}getelementptr +// CHECK: store {{(i32|i64)}} {{.*}}getelementptr{{.*}}, !dbg ![[DBG:[0-9]+]] // CHECK-NEXT: _TFSiCfMSiFT22_builtinIntegerLiteralBi2048__Si{{.*}}(i2048 -2) // CHECK-NOT: ![[DBG]] = !{i32 0, i32 0, diff --git a/test/DebugInfo/PrivateDiscriminator.swift b/test/DebugInfo/PrivateDiscriminator.swift index 7b0330ea1a734..233f12f3d2204 100644 --- a/test/DebugInfo/PrivateDiscriminator.swift +++ b/test/DebugInfo/PrivateDiscriminator.swift @@ -1,9 +1,9 @@ // Private discriminators should only be emitted for multi-file projects. -// RUN: %swift -emit-ir %s -g -o - | FileCheck --check-prefix=SINGLE %s +// RUN: %target-swift-frontend -emit-ir %s -g -o - | FileCheck --check-prefix=SINGLE %s // SINGLE-NOT: -private-discriminator{{.*}}; [ DW_TAG_compile_unit ] -// RUN: %swift %S/../Inputs/empty.swift -primary-file %s -emit-ir -g | FileCheck %s +// RUN: %target-swift-frontend %S/../Inputs/empty.swift -primary-file %s -emit-ir -g | FileCheck %s // CHECK: -private-discriminator [[DISCRIMINATOR:_[A-Z0-9]+]]{{.*}}; [ DW_TAG_compile_unit ] private class A { diff --git a/test/DebugInfo/ProtocolContainer.swift b/test/DebugInfo/ProtocolContainer.swift index 98c405a5f26cd..3b2ce1fcc8aa6 100644 --- a/test/DebugInfo/ProtocolContainer.swift +++ b/test/DebugInfo/ProtocolContainer.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + protocol AProtocol { func print() } @@ -10,7 +11,7 @@ class AClass : AProtocol { } // CHECK: define hidden void @_TF17ProtocolContainer3foo // CHECK-NEXT: entry: -// CHECK-NEXT: %[[X:.*]] = alloca %P17ProtocolContainer9AProtocol_, align 8 +// CHECK-NEXT: %[[X:.*]] = alloca %P17ProtocolContainer9AProtocol_, align {{(4|8)}} // CHECK: call void @llvm.dbg.declare(metadata %P17ProtocolContainer9AProtocol_* %[[X]], metadata ![[XMD:.*]], metadata !{{[0-9]+}}) // CHECK-NOT: variable ] [x] // CHECK: ![[XMD]] = {{.*}}[ DW_TAG_arg_variable ] [x] [line [[@LINE+2]]] diff --git a/test/DebugInfo/accessors.swift b/test/DebugInfo/accessors.swift index 5fab4e8fdcd47..1a1b0f4ed3eeb 100644 --- a/test/DebugInfo/accessors.swift +++ b/test/DebugInfo/accessors.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s // Verify that we generate appropriate names for accessors. // CHECK: DW_TAG_subprogram{{.*}}x.get diff --git a/test/DebugInfo/alloca-init.swift b/test/DebugInfo/alloca-init.swift index 951b0e5872675..3f94ff8c10881 100644 --- a/test/DebugInfo/alloca-init.swift +++ b/test/DebugInfo/alloca-init.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + class A { var a : A? // CHECK: define {{.*}}1AcfMS0_FT_S0_ diff --git a/test/DebugInfo/anonymous.swift b/test/DebugInfo/anonymous.swift index 0db82380315cb..2519ca2317e96 100644 --- a/test/DebugInfo/anonymous.swift +++ b/test/DebugInfo/anonymous.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s + // Don't crash when emitting debug info for anonymous variables. // CHECK: variable{{.*}}[_] protocol F_ { diff --git a/test/DebugInfo/any.swift b/test/DebugInfo/any.swift index b88d6e6df81b1..597ca9a8f0efd 100644 --- a/test/DebugInfo/any.swift +++ b/test/DebugInfo/any.swift @@ -1,8 +1,9 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + func main() { // CHECK: call void @llvm.dbg.declare(metadata %"protocol<>"* {{.*}}, metadata ![[S:.*]], metadata !{{[0-9]+}}), !dbg ![[DBG:.*]] // CHECK: ![[S]] ={{.*}}[ DW_TAG_auto_variable ] [s] [line [[@LINE+3]]] - // CHECK: ![[SCOPE:.*]] = !{!"0xb\002\0013\001"{{.*}}} ; [ DW_TAG_lexical_block ] + // CHECK: ![[SCOPE:.*]] = !{!"0xb\003\0013\001"{{.*}}} ; [ DW_TAG_lexical_block ] // CHECK: ![[DBG]] = !MDLocation(line: [[@LINE+1]], column: 6, scope: ![[SCOPE]]) var s : Any = "hello world" var n : Any = 12 diff --git a/test/DebugInfo/apple-types-accel.swift b/test/DebugInfo/apple-types-accel.swift index b1b7509001065..787141e381d8d 100644 --- a/test/DebugInfo/apple-types-accel.swift +++ b/test/DebugInfo/apple-types-accel.swift @@ -1,9 +1,10 @@ -// REQUIRES: OS=macosx -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s -// RUN: %swift -target x86_64-apple-macosx10.9 %s -c -g -o %t.o +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -c -g -o %t.o // RUN: dwarfdump --verify --apple-types %t.o | FileCheck --check-prefix=CHECK-ACCEL %s // RUN: dwarfdump --debug-info %t.o | FileCheck --check-prefix=CHECK-DWARF %s +// REQUIRES: OS=macosx + // Verify that the unmangles basenames end up in the accelerator table. // CHECK-ACCEL-DAG: str[0]{{.*}}"Int" // CHECK-ACCEL-DAG: str[0]{{.*}}"foo" diff --git a/test/DebugInfo/archetype.swift b/test/DebugInfo/archetype.swift index 9d2a2032d0363..0068ab61e1a6d 100644 --- a/test/DebugInfo/archetype.swift +++ b/test/DebugInfo/archetype.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s protocol IntegerArithmeticType { static func uncheckedSubtract(lhs: Self, rhs: Self) -> (Self, Bool) diff --git a/test/DebugInfo/archetypes2.swift b/test/DebugInfo/archetypes2.swift index 9938d7301283d..4aed5c29e1d12 100644 --- a/test/DebugInfo/archetypes2.swift +++ b/test/DebugInfo/archetypes2.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -verify -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -verify -g -o - | FileCheck %s + class C { // CHECK-DAG: ![[A:[0-9]+]] = {{.*}}; [ DW_TAG_structure_type ] [_TtQq_C11archetypes21C] // CHECK-DAG: ![[B:[0-9]+]] = {{.*}}; [ DW_TAG_structure_type ] [_TtQq_FC11archetypes21C3foo{{.*}}] diff --git a/test/DebugInfo/argument.swift b/test/DebugInfo/argument.swift index 61fb231da2c9c..a837f699c90b7 100644 --- a/test/DebugInfo/argument.swift +++ b/test/DebugInfo/argument.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s // CHECK-DAG: [ DW_TAG_arg_variable ] [arg] [line [[@LINE+1]]] func a(arg : Int) diff --git a/test/DebugInfo/attributes.swift b/test/DebugInfo/attributes.swift index 8c78bd9b53b06..eafb8679c3cc6 100644 --- a/test/DebugInfo/attributes.swift +++ b/test/DebugInfo/attributes.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module %s -emit-ir -g -o - | FileCheck %s // CHECK-DAG: \0030"{{.*}}, null, ![[TY0:.*]]} ; [ DW_TAG_structure_type ] [{{.*}}ObjCClass{{.*}}] [line [[@LINE+1]] @objc class ObjCClass { diff --git a/test/DebugInfo/atype.swift b/test/DebugInfo/atype.swift index 024a5861bea32..647d848ce7450 100644 --- a/test/DebugInfo/atype.swift +++ b/test/DebugInfo/atype.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + class Class { // CHECK: _TtQq_FC5atype5Class8function func function (x : T) { diff --git a/test/DebugInfo/autoclosure.swift b/test/DebugInfo/autoclosure.swift index aa586d893ca0e..eb657870d6d57 100644 --- a/test/DebugInfo/autoclosure.swift +++ b/test/DebugInfo/autoclosure.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + // CHECK: define linkonce_odr hidden void @_TFF11autoclosure7call_meFSiT_u_KT_PSs11BooleanType_ // CHECK: call void @llvm.dbg.declare{{.*}}, !dbg // CHECK: , !dbg ![[DBG:.*]] diff --git a/test/DebugInfo/basic.swift b/test/DebugInfo/basic.swift index ae6ce1f2fbe9d..88b14f7df9cf7 100644 --- a/test/DebugInfo/basic.swift +++ b/test/DebugInfo/basic.swift @@ -2,31 +2,31 @@ // A (no longer) basic test for debug info. // -------------------------------------------------------------------- // Verify that we don't emit any debug info by default. -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -o - | FileCheck %s --check-prefix NDEBUG +// RUN: %target-swift-frontend %s -emit-ir -o - | FileCheck %s --check-prefix NDEBUG // NDEBUG-NOT: !dbg // NDEBUG-NOT: DW_TAG // -------------------------------------------------------------------- // Verify that we don't emit any debug info with -gnone. -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -gnone -o - | FileCheck %s --check-prefix NDEBUG +// RUN: %target-swift-frontend %s -emit-ir -gnone -o - | FileCheck %s --check-prefix NDEBUG // -------------------------------------------------------------------- // Verify that we don't emit any type info with -gline-tables-only. -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -gline-tables-only -o - | FileCheck %s --check-prefix CHECK-LINETABLES +// RUN: %target-swift-frontend %s -emit-ir -gline-tables-only -o - | FileCheck %s --check-prefix CHECK-LINETABLES // CHECK: !dbg // CHECK-LINETABLES-NOT: DW_TAG_{{.*}}variable // CHECK-LINETABLES-NOT: DW_TAG_structure_type // CHECK-LINETABLES-NOT: DW_TAG_basic_type // -------------------------------------------------------------------- // Now check that we do generate line+scope info with -g. -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - -disable-sil-linking | FileCheck %s --check-prefix=CHECK-NOSIL +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - -disable-sil-linking | FileCheck %s --check-prefix=CHECK-NOSIL // -------------------------------------------------------------------- // // CHECK: foo // CHECK-DAG: ret{{.*}}, !dbg ![[RET:[0-9]+]] // CHECK-DAG: ![[FOO:[0-9]+]] ={{.*}}!"0x2e\00{{[^"]+}}\00[[@LINE+2]]"{{, [^,]+, [^,]+}}, ![[FOOTYPE:[0-9]+]],{{.*}} [ DW_TAG_subprogram ] {{.*}} [foo] public -func foo(var a: Int, var b: Int) -> Int { - // CHECK-DAG: !"0xb\00[[@LINE-1]]\0041\000"{{, [^,]+}}, ![[FOO]]} ; [ DW_TAG_lexical_block ] +func foo(var a: Int64, var b: Int64) -> Int64 { + // CHECK-DAG: !"0xb\00[[@LINE-1]]\0047\000"{{, [^,]+}}, ![[FOO]]} ; [ DW_TAG_lexical_block ] // CHECK-DAG: ![[ASCOPE:.*]] = !MDLocation(line: [[@LINE-2]], column: 14, scope: ![[FOO]]) // Check that a is the first and b is the second argument. // CHECK-DAG: store i64 %0, i64* [[AVAL:.*]], align 8 @@ -43,12 +43,12 @@ func foo(var a: Int, var b: Int) -> Int { // CHECK-DAG: smul{{.*}}, !dbg ![[MUL:[0-9]+]] // CHECK-DAG: [[MUL]] = !MDLocation(line: [[@LINE+4]], column: 16, // Runtime call to multiply function: - // CHECK-NOSIL: @_TFSsoi1mFTSiSi_Si{{.*}}, !dbg ![[MUL:[0-9]+]] - // CHECK-NOSIL: [[MUL]] = !MDLocation(line: [[@LINE+1]], column: 16, + // CHECK-NOSIL: @_TFSsoi1mFTVSs5Int64S__S_{{.*}}, !dbg ![[MUL:[0-9]+]] + // CHECK-NOSIL: [[MUL]] = !MDLocation(line: [[@LINE+1]], column: 16, return a*b } else { // CHECK-DAG: [[PARENT:[0-9]+]] = {{.*}}\00[[@LINE-1]]\0013\00{{.*}}DW_TAG_lexical_block - var c = 42 + var c: Int64 = 42 if a == 0 { // CHECK-DAG: \00[[@LINE-1]]\0018\00{{.*}}, ![[PARENT]]} ; [ DW_TAG_lexical_block ] // What about a nested scope? @@ -57,12 +57,12 @@ func foo(var a: Int, var b: Int) -> Int { return c } } -// CHECK-DAG: Swift version{{.*}}x86_64-apple-macosx10.9{{.*}}-emit-ir{{.*}} [ DW_TAG_compile_unit ] [{{.*}}basic.swift] +// CHECK-DAG: Swift version{{.*}}-emit-ir{{.*}} [ DW_TAG_compile_unit ] [{{.*}}basic.swift] // CHECK-DAG: \00main\00{{.*}} [ DW_TAG_subprogram ] // Function type for foo. // CHECK-DAG: ![[FOOTYPE]] = {{.*}} ![[PARAMTYPES:[0-9]+]],{{.*}}DW_TAG_subroutine_type -// CHECK-DAG: ![[PARAMTYPES]] = !{!"_TtSi", !"_TtSi", !"_TtSi"} +// CHECK-DAG: ![[PARAMTYPES]] = !{!"_TtVSs5Int64", !"_TtVSs5Int64", !"_TtVSs5Int64"} // Import of the main module. // CHECK-DAG: ![[MAINFILE:[0-9]+]] = {{.*}}DW_TAG_file_type{{.*}}basic.swift // CHECK-DAG: \001\00"{{.*}}, ![[MAINFILE]], ![[MAINMODULE:[0-9]+]]} ; [ DW_TAG_imported_module ] diff --git a/test/DebugInfo/bool.swift b/test/DebugInfo/bool.swift index baf151d6faf72..2bee501800816 100644 --- a/test/DebugInfo/bool.swift +++ b/test/DebugInfo/bool.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + // Int1 uses 1 bit, but is aligned at 8 bits. // CHECK: [ DW_TAG_base_type ] [_TtBi1_] [line 0, size 1, align 8, offset 0, enc DW_ATE_unsigned] func main() diff --git a/test/DebugInfo/bound-namealiastype.swift b/test/DebugInfo/bound-namealiastype.swift index 69caeab6a02f8..94e28fb5ff37e 100644 --- a/test/DebugInfo/bound-namealiastype.swift +++ b/test/DebugInfo/bound-namealiastype.swift @@ -1,4 +1,4 @@ -// RUN: %target-build-swift -emit-ir -g %s -o - | FileCheck %s +// RUN: %target-swift-frontend -emit-ir -g %s -o - | FileCheck %s import Dispatch // CHECK-DAG: ![[QUEUE_T:[0-9]+]] = {{.*}} [_TtGSQaSC21dispatch_queue_attr_t_] diff --git a/test/DebugInfo/byref-capture.swift b/test/DebugInfo/byref-capture.swift index 51260c976a40e..453520449c218 100644 --- a/test/DebugInfo/byref-capture.swift +++ b/test/DebugInfo/byref-capture.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + func makeIncrementor(inc : Int) -> () -> Int { var sum = 0 diff --git a/test/DebugInfo/callexpr.swift b/test/DebugInfo/callexpr.swift index 90ebb685db567..2cde6c01e1129 100644 --- a/test/DebugInfo/callexpr.swift +++ b/test/DebugInfo/callexpr.swift @@ -1,4 +1,5 @@ -// RUN: %target-build-swift %s -g -emit-ir -o - | FileCheck %s +// RUN: %target-swift-frontend %s -g -emit-ir -o - | FileCheck %s + func foo(a : Int, b : Int) -> Int { return a+b } diff --git a/test/DebugInfo/closure-args.swift b/test/DebugInfo/closure-args.swift index a3fd88b03dc6c..3383d6a18a6ee 100644 --- a/test/DebugInfo/closure-args.swift +++ b/test/DebugInfo/closure-args.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + import Swift func main() -> Void @@ -10,17 +11,17 @@ func main() -> Void var backward_ptr = // CHECK: define linkonce_odr hidden i1 @_TFF4main4mainFT_T_U_FTSSSS_Sb( - // CHECK: %[[RHS_ADDR:.*]] = alloca %SS*, align 8 - // CHECK: store %SS* %{{.*}}, %SS** %[[RHS_ADDR]], align 8 + // CHECK: %[[RHS_ADDR:.*]] = alloca %SS*, align {{(4|8)}} + // CHECK: store %SS* %{{.*}}, %SS** %[[RHS_ADDR]], align {{(4|8)}} // The shadow copying should happen in the prologue, because the // stack pointer will be decremented after it. // CHECK-NOT: !dbg // CHECK-NEXT: call void @llvm.dbg.declare(metadata %SS** %[[RHS_ADDR]], metadata !{{.*}}, metadata !{{[0-9]+}}), !dbg // CHECK-DAG: [ DW_TAG_arg_variable ] [lhs] [line [[@LINE+5]]] // CHECK-DAG: [ DW_TAG_arg_variable ] [rhs] [line [[@LINE+4]]] - // CHECK-DAG: [ DW_TAG_arg_variable ] [random_string] [line 7] - // CHECK-DAG: [ DW_TAG_arg_variable ] [random_int] [line 8] - // CHECK-DAG: [ DW_TAG_arg_variable ] [out_only] [line 9] + // CHECK-DAG: [ DW_TAG_arg_variable ] [random_string] [line 8] + // CHECK-DAG: [ DW_TAG_arg_variable ] [random_int] [line 9] + // CHECK-DAG: [ DW_TAG_arg_variable ] [out_only] [line 10] { (lhs : String, rhs : String) -> Bool in if rhs == random_string || count(rhs.unicodeScalars) == random_int diff --git a/test/DebugInfo/closure-args2.swift b/test/DebugInfo/closure-args2.swift index d63f137b878f0..79e14220516df 100644 --- a/test/DebugInfo/closure-args2.swift +++ b/test/DebugInfo/closure-args2.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + func main () -> Void { diff --git a/test/DebugInfo/closure-multivalue.swift b/test/DebugInfo/closure-multivalue.swift index 0b8da597ff86d..235dd5a453e75 100644 --- a/test/DebugInfo/closure-multivalue.swift +++ b/test/DebugInfo/closure-multivalue.swift @@ -1,4 +1,4 @@ -// RUN: %swift -Xllvm -debug-values-propagate-liveness -target x86_64-apple-macosx10.9 -O %s -disable-llvm-optzns -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend -Xllvm -debug-values-propagate-liveness -O %s -disable-llvm-optzns -emit-ir -g -o - | FileCheck %s // CHECK: define {{.*}}4main4sort // CHECK: call void @llvm.dbg.value({{.*}}, metadata ![[A:.*]], metadata ![[P1:.*]]) // CHECK: call void @llvm.dbg.value({{.*}}, metadata ![[A]], metadata ![[P2:.*]]) @@ -8,9 +8,9 @@ // CHECK: call void @llvm.dbg.value({{.*}}, metadata ![[B]], metadata ![[P3]]) // CHECK-DAG: ![[A]] = {{.*}} [ DW_TAG_a{{.*}}_variable ] [a] [line 15] // CHECK-DAG: ![[B]] = {{.*}} [ DW_TAG_a{{.*}}_variable ] [b] [line 15] -// CHECK-DAG: ![[P1]] = {{.*}}; [ DW_TAG_expression ] [DW_OP_piece offset=0, size=8] -// CHECK-DAG: ![[P2]] = {{.*}}; [ DW_TAG_expression ] [DW_OP_piece offset=8, size=8] -// CHECK-DAG: ![[P3]] = {{.*}}; [ DW_TAG_expression ] [DW_OP_piece offset=16, size=8] +// CHECK-DAG: ![[P1]] = {{.*}}; [ DW_TAG_expression ] [DW_OP_piece offset=0, size={{(4|8)}}] +// CHECK-DAG: ![[P2]] = {{.*}}; [ DW_TAG_expression ] [DW_OP_piece offset={{(4|8)}}, size={{(4|8)}}] +// CHECK-DAG: ![[P3]] = {{.*}}; [ DW_TAG_expression ] [DW_OP_piece offset={{(8|16)}}, size={{(4|8)}}] func sort(a : String, b : String) -> Bool { println("Sorting..\(a) & \(b)") @@ -29,7 +29,7 @@ func demo() { demo() // At -O0, we should have a single aggregate argument. -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s --check-prefix=CHECK-O0 +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s --check-prefix=CHECK-O0 // Verify that a reabstraction thunk does not have a line number. // CHECK-O0: _TTRXFo_oSSoSS_dSb_XFo_iSSiSS_dSb_{{.*}}; [ DW_TAG_subprogram ] [line 0] // CHECK-O0: [ DW_TAG_arg_variable ] [a] [line 15] diff --git a/test/DebugInfo/closure.swift b/test/DebugInfo/closure.swift index 13f0d3ff4c5aa..bc7272954e54d 100644 --- a/test/DebugInfo/closure.swift +++ b/test/DebugInfo/closure.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s func foldl1(list: [T], function: (a: T, b: T) -> T) -> T { assert(list.count > 1) diff --git a/test/DebugInfo/dynamic_layout.swift b/test/DebugInfo/dynamic_layout.swift index 7f0eb1b118bcb..6986ab4ce7678 100644 --- a/test/DebugInfo/dynamic_layout.swift +++ b/test/DebugInfo/dynamic_layout.swift @@ -1,4 +1,5 @@ -// RUN: %swift -enable-dynamic-value-type-layout -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend -enable-dynamic-value-type-layout %s -emit-ir -g -o - | FileCheck %s + class Class { var x : T diff --git a/test/DebugInfo/enum.swift b/test/DebugInfo/enum.swift index 6fc4e4cba351d..47364ccf5debf 100644 --- a/test/DebugInfo/enum.swift +++ b/test/DebugInfo/enum.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + // CHECK: [ DW_TAG_union_type ] [_TtO4enum5Color] [line [[@LINE+1]], size 8, align 8, enum Color : UInt { // CHECK: [ DW_TAG_member ] [Red] [line 0, size 8, align 8, offset 0] [from _TtSu] @@ -9,8 +10,8 @@ enum Color : UInt { enum MaybeIntPair { // CHECK: [ DW_TAG_member ] [None] [line 0, size 136, align 64, offset 0] [from _TtSi] case None -// CHECK: [ DW_TAG_member ] [Just] [line 0, size 136, align 64, offset 0] [from _TtTSiSi_] - case Just(Int, Int) +// CHECK: [ DW_TAG_member ] [Just] [line 0, size 136, align 64, offset 0] [from _TtTVSs5Int64S__] + case Just(Int64, Int64) } enum Maybe { diff --git a/test/DebugInfo/fnptr.swift b/test/DebugInfo/fnptr.swift index 4b37e688d070a..7d16ba5db9aef 100644 --- a/test/DebugInfo/fnptr.swift +++ b/test/DebugInfo/fnptr.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s // CHECK-DAG: ![[SINODE:.*]] = {{.*}} null, null, ![[SI:.*]]} ; [ DW_TAG_structure_type ] [Int] // CHECK-DAG: ![[SFNODE:.*]] = {{.*}} null, null, ![[SF:.*]]} ; [ DW_TAG_structure_type ] [Float] diff --git a/test/DebugInfo/generic_arg2.swift b/test/DebugInfo/generic_arg2.swift index 449b578ef8f5e..02633bde01d87 100644 --- a/test/DebugInfo/generic_arg2.swift +++ b/test/DebugInfo/generic_arg2.swift @@ -1,6 +1,7 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + // CHECK: @_TFC12generic_arg25Class3foo{{.*}}, %swift.type* %U -// CHECK: %[[Y:.*]] = call %swift.opaque* %allocateBuffer3([24 x i8]* %{{.*}}, %swift.type* %U) +// CHECK: %[[Y:.*]] = call %swift.opaque* %allocateBuffer3([{{(24|12)}} x i8]* %{{.*}}, %swift.type* %U) // store %swift.opaque* %[[Y]], %swift.opaque** %[[Y_SHADOW:.*]], align // CHECK: call void @llvm.dbg.value(metadata %swift.opaque* %[[Y]], {{.*}}metadata ![[U:.*]], metadata !{{[0-9]+}}), !dbg // Make sure there is no conflicting dbg.value for this variable.x diff --git a/test/DebugInfo/generic_args.swift b/test/DebugInfo/generic_args.swift index 3bf3896a55e43..aded78ea804e0 100644 --- a/test/DebugInfo/generic_args.swift +++ b/test/DebugInfo/generic_args.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir -verify -g -o - | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -verify -g -o - | FileCheck %s + protocol AProtocol { func f() -> String; } diff --git a/test/DebugInfo/generic_enum.swift b/test/DebugInfo/generic_enum.swift index 11189b147593a..aabcddfdd21e8 100644 --- a/test/DebugInfo/generic_enum.swift +++ b/test/DebugInfo/generic_enum.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + enum TrivialGeneric { case x(T, U) } diff --git a/test/DebugInfo/generic_enum_closure.swift b/test/DebugInfo/generic_enum_closure.swift index 8a54c7db5519f..84068aaf5677a 100644 --- a/test/DebugInfo/generic_enum_closure.swift +++ b/test/DebugInfo/generic_enum_closure.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s + struct __CurrentErrno {} struct CErrorOr { diff --git a/test/DebugInfo/hello.swift b/test/DebugInfo/hello.swift index 6b2f2791fc068..461c9cdaee5c3 100644 --- a/test/DebugInfo/hello.swift +++ b/test/DebugInfo/hello.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s -// This program is so short that it doesn't refer the swift stdlib. +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + println("Hello World!") -// CHECK: [ DW_TAG_file_type ]{{.*}}lib/swift/macosx/Swift.swiftmodule +// CHECK: [ DW_TAG_file_type ] [{{.*}}/lib/swift/{{[^/]+(/32)?}}/Swift.swiftmodule] diff --git a/test/DebugInfo/if-branchlocations.swift b/test/DebugInfo/if-branchlocations.swift index 6ab2ccf8972a2..36dfaea12925a 100644 --- a/test/DebugInfo/if-branchlocations.swift +++ b/test/DebugInfo/if-branchlocations.swift @@ -1,4 +1,5 @@ -// RUN: %swift %s -emit-sil -emit-verbose-sil -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-sil -emit-verbose-sil -g -o - | FileCheck %s + class NSURL {} class NSPathControlItem { diff --git a/test/DebugInfo/implicitdecl.swift b/test/DebugInfo/implicitdecl.swift index eb9c36d31bf1d..79b256a1cbfce 100644 --- a/test/DebugInfo/implicitdecl.swift +++ b/test/DebugInfo/implicitdecl.swift @@ -1,8 +1,10 @@ -// RUN: %target-build-swift -emit-ir -g %s -o - | FileCheck %s +// RUN: %target-swift-frontend -emit-ir -g %s -o - | FileCheck %s + // CHECK: \0030"{{, [^,]+}}, ![[ObjectiveC:[0-9]+]], {{.*}}!"_TtCSo8Protocol"} ; [ DW_TAG_structure_type ] [Protocol] // CHECK: ![[ObjectiveC]] = !{{.*}} ; [ DW_TAG_module ] [ObjectiveC] [line 1] import Foundation -func f() { +public func f() { var protocolObject = NSProtocolFromString("HelperTool")! } + diff --git a/test/DebugInfo/implicitreturn.swift b/test/DebugInfo/implicitreturn.swift index e5d802fb01d64..0c75f1599ca10 100644 --- a/test/DebugInfo/implicitreturn.swift +++ b/test/DebugInfo/implicitreturn.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -S -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -S -g -o - | FileCheck %s + func app() { // Make sure we don't jump back to before the prologue. // CHECK: .loc [[FILEID:[0-9]]] [[@LINE+2]] diff --git a/test/DebugInfo/initializer.swift b/test/DebugInfo/initializer.swift index f4cbc2766bb6c..bb4e0b20e9979 100644 --- a/test/DebugInfo/initializer.swift +++ b/test/DebugInfo/initializer.swift @@ -1,4 +1,4 @@ -// RUN: %swift -disable-objc-attr-requires-foundation-module -target x86_64-apple-macosx10.9 %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 - | FileCheck %s protocol Named { var name : String { get } diff --git a/test/DebugInfo/inlinescopes.swift b/test/DebugInfo/inlinescopes.swift index 1ead19f1afb67..ddd06d212c8b1 100644 --- a/test/DebugInfo/inlinescopes.swift +++ b/test/DebugInfo/inlinescopes.swift @@ -1,9 +1,9 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: echo "public var x = Int()" | %swift -target x86_64-apple-macosx10.9 -module-name FooBar -emit-module -o %t - -// RUN: %swift -target x86_64-apple-macosx10.9 %s -O -I=%t -sil-inline-threshold 100 -emit-ir -g -o %t.ll -// RUN: cat %t.ll | FileCheck %s -// RUN: cat %t.ll | FileCheck %s -check-prefix=TRANSPARENT-CHECK +// RUN: echo "public var x = Int64()" | %target-swift-frontend -module-name FooBar -emit-module -o %t - +// RUN: %target-swift-frontend %s -O -I %t -sil-inline-threshold 100 -emit-ir -g -o %t.ll +// RUN: FileCheck %s < %t.ll +// RUN: FileCheck %s -check-prefix=TRANSPARENT-CHECK < %t.ll // CHECK: define i32 @main // CHECK: tail call { i64, i1 } @llvm.smul.with.overflow.i64(i64 %[[C:.*]], i64 %[[C]]), !dbg ![[MULSCOPE:.*]] @@ -13,7 +13,7 @@ import FooBar -func square(x : Int) -> Int { +func square(x: Int64) -> Int64 { // CHECK-DAG: ![[MULSCOPE]] = !MDLocation(line: [[@LINE+2]], column: {{.*}}, scope: ![[MUL:.*]], inlinedAt: ![[INLINED:.*]]) // CHECK-DAG: ![[MUL:.*]] = {{.*}}[ DW_TAG_lexical_block ] let res = x * x @@ -21,11 +21,11 @@ func square(x : Int) -> Int { // TRANSPARENT-CHECK-NOT: [ DW_TAG_subprogram ] {{.*}}[_TFSsoi1mFTSiSi_Si] return res } -let c = Int(x) -// CHECK-DAG ![[INLINED]] = !MDLocation(line: [[@LINE+1]], column: {{.*}}, scope: !{{.*}}, inlinedAt: ![[INLINED_TOPLEVEL:.*]]) +let c = Int64(x) +// CHECK-DAG ![[INLINED]] = !MDLocation(i32 [[@LINE+1]], column: {{.*}}, scope: !{{.*}}, inlinedAt: ![[INLINED_TOPLEVEL:.*]]) // CHECK-DAG: ![[TOPLEVEL]]{{.*}} ; [ DW_TAG_variable ] [y] [line [[@LINE+1]]] let y = square(c) println(y) // Check if the inlined and removed square function still has the correct linkage name in the debug info. -// CHECK-DAG: _TF4main6squareFSiSi{{.*}}; [ DW_TAG_subprogram ] {{.*}}[square] +// CHECK-DAG: _TF4main6squareFVSs5Int64S0_{{.*}}; [ DW_TAG_subprogram ] {{.*}}[square] diff --git a/test/DebugInfo/inout.swift b/test/DebugInfo/inout.swift index d10d1b90366d4..3c8b0e3de9716 100644 --- a/test/DebugInfo/inout.swift +++ b/test/DebugInfo/inout.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + // LValues are direct values, too. They are reference types, though. func Close(fn: () -> Int) { fn() } @@ -13,7 +14,7 @@ typealias MyFloat = Float // Closure with promoted capture. // CHECK: define {{.*}}@_TTSf2d_i___TFF5inout13modifyFooHeapFTRSiSf_T_U_FT_Si -// CHECK: call void @llvm.dbg.declare(metadata i64* %{{.*}}, metadata ![[A1:[0-9]+]], metadata ![[EMPTY_EXPR:[0-9]+]]) +// CHECK: call void @llvm.dbg.declare(metadata {{(i32|i64)}}* %{{.*}}, metadata ![[A1:[0-9]+]], metadata ![[EMPTY_EXPR:[0-9]+]]) // Inout reference type. // CHECK: define {{.*}}@_TF5inout9modifyFooFTRSiSf_T_ diff --git a/test/DebugInfo/inout2.swift b/test/DebugInfo/inout2.swift index 1d40bea3a5784..75e821a99c707 100644 --- a/test/DebugInfo/inout2.swift +++ b/test/DebugInfo/inout2.swift @@ -1,5 +1,7 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + // LValues are direct values, too. They are reference types, though. + class Class { var ivar : Int init() { ivar = 1234 } diff --git a/test/DebugInfo/iteration.swift b/test/DebugInfo/iteration.swift index 79cc21c5e7125..2cac3025f470d 100644 --- a/test/DebugInfo/iteration.swift +++ b/test/DebugInfo/iteration.swift @@ -1,5 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o %t.ll -// RUN: cat %t.ll | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o %t.ll +// RUN: FileCheck %s < %t.ll + var puzzleInput = "great minds think alike" var puzzleOutput = "" // CHECK-NOT: [ DW_TAG_auto_variable ] [$letter$generator] [line [[@LINE+2]]] diff --git a/test/DebugInfo/iuo_arg.swift b/test/DebugInfo/iuo_arg.swift index 064c399d429c3..fe055f6fb2489 100644 --- a/test/DebugInfo/iuo_arg.swift +++ b/test/DebugInfo/iuo_arg.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s class CGImageRef {} class UIImage { @@ -17,8 +17,8 @@ class MyClass { func filterImage(image: UIImage!, _ doSomething:Bool) -> UIImage { // Test that image is in an alloca, but not an indirect location. - // CHECK: store i64 %0, i64* %[[ALLOCA:.*]], - // CHECK: call void @llvm.dbg.declare(metadata i64* %[[ALLOCA]], metadata ![[IMAGE:.*]], metadata !{{[0-9]+}}) + // CHECK: store {{(i32|i64)}} %0, {{(i32|i64)}}* %[[ALLOCA:.*]], + // CHECK: call void @llvm.dbg.declare(metadata {{(i32|i64)}}* %[[ALLOCA]], metadata ![[IMAGE:.*]], metadata !{{[0-9]+}}) // CHECK: ![[IMAGE]] = {{.*}}\000"{{.*}}} ; [ DW_TAG_arg_variable ] [image] [line [[@LINE-5]]] let filter = CIFilter(name: "CIGaussianBlur") return image diff --git a/test/DebugInfo/let.swift b/test/DebugInfo/let.swift index 86d9edd585f03..22391be8adc41 100644 --- a/test/DebugInfo/let.swift +++ b/test/DebugInfo/let.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s + class DeepThought { func query() -> Int { return 42 } } diff --git a/test/DebugInfo/letclause.swift b/test/DebugInfo/letclause.swift index 1dbf3ba1d5728..ac56b75aac793 100644 --- a/test/DebugInfo/letclause.swift +++ b/test/DebugInfo/letclause.swift @@ -1,4 +1,5 @@ -// RUN: %swift -primary-file %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s + // Test debug info for storageless variables. struct Symbol {} func peek() -> Symbol? { return Symbol() } diff --git a/test/DebugInfo/letstring.swift b/test/DebugInfo/letstring.swift index 97d46089ea04a..dc01f12256999 100644 --- a/test/DebugInfo/letstring.swift +++ b/test/DebugInfo/letstring.swift @@ -1,5 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o %t.ll -// RUN: cat %t.ll | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o %t.ll +// RUN: FileCheck %s < %t.ll + class UIWindow {} class AppDelegate { var window: UIWindow? diff --git a/test/DebugInfo/line-directive.swift b/test/DebugInfo/line-directive.swift index 7fbcaff7ee3c7..84d48497fea4b 100644 --- a/test/DebugInfo/line-directive.swift +++ b/test/DebugInfo/line-directive.swift @@ -11,7 +11,7 @@ func f() { println("jump directly to def") } -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -S -g -o - | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -S -g -o - | FileCheck %s // CHECK: .file [[MAIN:.*]] "{{.*}}line-directive.swift" // CHECK: .loc [[MAIN]] 1 // CHECK: .file [[ABC:.*]] "{{.*}}abc.swift" diff --git a/test/DebugInfo/linetable-cleanups.swift b/test/DebugInfo/linetable-cleanups.swift index 713a670e45454..2df08e80383b5 100644 --- a/test/DebugInfo/linetable-cleanups.swift +++ b/test/DebugInfo/linetable-cleanups.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s class Person { var name = "No Name" diff --git a/test/DebugInfo/linetable.swift b/test/DebugInfo/linetable.swift index 8394afd12f56d..183afdbf9afee 100644 --- a/test/DebugInfo/linetable.swift +++ b/test/DebugInfo/linetable.swift @@ -1,5 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s -// RUN: %swift -target x86_64-apple-macosx10.9 %s -S -g -o - | FileCheck %s --check-prefix ASM-CHECK +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -S -g -o - | FileCheck %s --check-prefix ASM-CHECK import Swift class MyClass diff --git a/test/DebugInfo/mangling.swift b/test/DebugInfo/mangling.swift index 7d673fdeaf868..71b4e77d5a51d 100644 --- a/test/DebugInfo/mangling.swift +++ b/test/DebugInfo/mangling.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s // Type: // Swift.Dictionary diff --git a/test/DebugInfo/multi-file.swift b/test/DebugInfo/multi-file.swift index f1cbf2b450b17..c9f47dc34f9e7 100644 --- a/test/DebugInfo/multi-file.swift +++ b/test/DebugInfo/multi-file.swift @@ -1,6 +1,6 @@ -// RUN: %swift -primary-file %s %S/../Inputs/empty.swift -target x86_64-apple-macosx10.9 -emit-ir -g -module-name multi | FileCheck %s -// RUN: %swift %S/../Inputs/empty.swift -primary-file %s -target x86_64-apple-macosx10.9 -emit-ir -g -module-name multi | FileCheck %s -// RUN: %swift -primary-file %S/../Inputs/empty.swift %s -target x86_64-apple-macosx10.9 -emit-ir -g -module-name multi | FileCheck %s --check-prefix=CHECK-OTHER -// RUN: %swift %s -primary-file %S/../Inputs/empty.swift -target x86_64-apple-macosx10.9 -emit-ir -g -module-name multi | FileCheck %s --check-prefix=CHECK-OTHER +// RUN: %target-swift-frontend -primary-file %s %S/../Inputs/empty.swift -emit-ir -g -module-name multi | FileCheck %s +// RUN: %target-swift-frontend %S/../Inputs/empty.swift -primary-file %s -emit-ir -g -module-name multi | FileCheck %s +// RUN: %target-swift-frontend -primary-file %S/../Inputs/empty.swift %s -emit-ir -g -module-name multi | FileCheck %s --check-prefix=CHECK-OTHER +// RUN: %target-swift-frontend %s -primary-file %S/../Inputs/empty.swift -emit-ir -g -module-name multi | FileCheck %s --check-prefix=CHECK-OTHER // CHECK: [ DW_TAG_compile_unit ] [{{.*}}multi-file.swift] // CHECK-OTHER: [ DW_TAG_compile_unit ] [{{.*}}empty.swift] diff --git a/test/DebugInfo/nested_functions.swift b/test/DebugInfo/nested_functions.swift index 1cadb40c0f6b5..aa5129e7778bc 100644 --- a/test/DebugInfo/nested_functions.swift +++ b/test/DebugInfo/nested_functions.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s + func outer(a: Int) -> Int { // Inner functions have a linkage name of "closure[0-9]+", but // their DW_AT_name is preserved. diff --git a/test/DebugInfo/nostorage.swift b/test/DebugInfo/nostorage.swift index 722096f2372c7..a38a2ce1b5faa 100644 --- a/test/DebugInfo/nostorage.swift +++ b/test/DebugInfo/nostorage.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + class AClass { func f () -> Int { return 1 } } diff --git a/test/DebugInfo/patternmatching.swift b/test/DebugInfo/patternmatching.swift index 0b9d5170fc825..305b41abb9bd1 100644 --- a/test/DebugInfo/patternmatching.swift +++ b/test/DebugInfo/patternmatching.swift @@ -1,7 +1,8 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir -g -o %t -// RUN: cat %t | FileCheck %s -// RUN: cat %t | FileCheck --check-prefix=CHECK-SCOPES %s -// RUN: %swift -emit-sil -emit-verbose-sil -primary-file %s -o - | FileCheck %s --check-prefix=SIL-CHECK +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o %t.ll +// RUN: FileCheck %s < %t.ll +// RUN: FileCheck --check-prefix=CHECK-SCOPES %s < %t.ll +// RUN: %target-swift-frontend -emit-sil -emit-verbose-sil -primary-file %s -o - | FileCheck %s --check-prefix=SIL-CHECK + func classifyPoint2(p: (Double, Double)) { func return_same (var input : Double) -> Double { diff --git a/test/DebugInfo/pcomp.swift b/test/DebugInfo/pcomp.swift index ee10f8fb38c7c..595d5f7cc1709 100644 --- a/test/DebugInfo/pcomp.swift +++ b/test/DebugInfo/pcomp.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s protocol A { func x() diff --git a/test/DebugInfo/prologue.swift b/test/DebugInfo/prologue.swift index 82abf83d8ac68..8eb87b2936567 100644 --- a/test/DebugInfo/prologue.swift +++ b/test/DebugInfo/prologue.swift @@ -1,4 +1,7 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -S -g -o - | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -S -g -o - | FileCheck %s + +// REQUIRES: CPU=x86_64 + // CHECK: .file [[F:[0-9]+]] "prologue.swift" func bar(x: T, y: U) { println("bar") } // CHECK: .loc [[F]] [[@LINE-1]] 3{{.}} prologue_end diff --git a/test/DebugInfo/protocol.swift b/test/DebugInfo/protocol.swift index 2d529f63140f7..971e0dca46e8b 100644 --- a/test/DebugInfo/protocol.swift +++ b/test/DebugInfo/protocol.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s protocol PointUtils { func distanceFromOrigin() -> Float @@ -21,10 +21,10 @@ class Point : PointUtils { } -// CHECK-DAG: define hidden i64 @_TF8protocol4mainFT_Si() { -func main() -> Int { +// CHECK-DAG: define hidden i64 @_TF8protocol4mainFT_VSs5Int64() { +func main() -> Int64 { var pt = Point(_x: 2.5, _y: 4.25) -// CHECK: [[LOC2D:%[a-zA-Z0-9]+]] = alloca %P8protocol10PointUtils_, align 8 +// CHECK: [[LOC2D:%[a-zA-Z0-9]+]] = alloca %P8protocol10PointUtils_, align {{(4|8)}} // CHECK: call void @llvm.dbg.declare(metadata {{.*}} [[LOC2D]], metadata ![[LOC:.*]], metadata !{{[0-9]+}}) var loc2d : protocol = pt var distance = loc2d.distanceFromOrigin() diff --git a/test/DebugInfo/protocolarg.swift b/test/DebugInfo/protocolarg.swift index a868e96ff6f68..2f38276cb795e 100644 --- a/test/DebugInfo/protocolarg.swift +++ b/test/DebugInfo/protocolarg.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + // FIXME: Should be DW_TAG_interface_type // CHECK: ![[PT:[^,]+]]} ; [ DW_TAG_structure_type ] [IGiveOutInts] protocol IGiveOutInts { diff --git a/test/DebugInfo/return.swift b/test/DebugInfo/return.swift index 61013e814e8c8..7f282f70acde9 100644 --- a/test/DebugInfo/return.swift +++ b/test/DebugInfo/return.swift @@ -1,11 +1,12 @@ -// RUN: %target-build-swift %s -g -emit-ir -o - | FileCheck %s +// RUN: %target-swift-frontend %s -g -emit-ir -o - | FileCheck %s + class X { init (i : Int) { x = i } var x : Int } // CHECK: define {{.*}}ifelseexpr -func ifelseexpr() -> Int { +public func ifelseexpr() -> Int { var x = X(i:0); if true { // CHECK: @swift_release @@ -17,3 +18,4 @@ func ifelseexpr() -> Int { // CHECK: ret{{.*}}, !dbg ![[RET]] return x.x; // CHECK: ![[RET]] = !MDLocation(line: [[@LINE]], } + diff --git a/test/DebugInfo/returnlocation.swift b/test/DebugInfo/returnlocation.swift index bc2362ce2c3fa..d9e505ee02d3d 100644 --- a/test/DebugInfo/returnlocation.swift +++ b/test/DebugInfo/returnlocation.swift @@ -1,4 +1,4 @@ -// RUN: %target-build-swift -g -emit-ir %s -o %t.ll +// RUN: %target-swift-frontend -g -emit-ir %s -o %t.ll import Foundation @@ -6,9 +6,9 @@ import Foundation // of simple/complex/empty return expressions, // cleanups/no cleanups, single / multiple return locations. -// RUN: cat %t.ll | FileCheck %s --check-prefix=CHECK_NONE -// CHECK_NONE: define hidden void {{.*}}none -func none(inout a: Int) { +// RUN: FileCheck %s --check-prefix=CHECK_NONE < %t.ll +// CHECK_NONE: define void {{.*}}none +public func none(inout a: Int) { // CHECK_NONE: call void @llvm.dbg{{.*}}, !dbg // CHECK_NONE: !dbg ![[NONE_INIT:.*]] a -= 2; @@ -17,9 +17,9 @@ func none(inout a: Int) { // CHECK_NONE: ![[NONE_RET]] = !MDLocation(line: [[@LINE+1]], column: 1, } -// RUN: cat %t.ll | FileCheck %s --check-prefix=CHECK_EMPTY -// CHECK_EMPTY: define hidden {{.*}}empty -func empty(inout a: Int) { +// RUN: FileCheck %s --check-prefix=CHECK_EMPTY < %t.ll +// CHECK_EMPTY: define {{.*}}empty +public func empty(inout a: Int) { if a > 24 { // CHECK-DAG_EMPTY: br {{.*}}, !dbg ![[EMPTY_RET1:.*]] // CHECK-DAG_EMPTY_RET1: ![[EMPTY_RET1]] = !MDLocation(line: [[@LINE+1]], column: 6, @@ -34,9 +34,9 @@ func empty(inout a: Int) { // CHECK-DAG_EMPTY: ![[EMPTY_RET]] = !MDLocation(line: [[@LINE+1]], column: 1, } -// RUN: cat %t.ll | FileCheck %s --check-prefix=CHECK_EMPTY_NONE +// RUN: FileCheck %s --check-prefix=CHECK_EMPTY_NONE < %t.ll // CHECK_EMPTY_NONE: define {{.*}}empty_none -func empty_none(inout a: Int) { +public func empty_none(inout a: Int) { if a > 24 { return; } @@ -46,9 +46,9 @@ func empty_none(inout a: Int) { // CHECK_EMPTY_NONE: ![[EMPTY_NONE_RET]] = !MDLocation(line: [[@LINE+1]], column: 1, } -// RUN: cat %t.ll | FileCheck %s --check-prefix=CHECK_SIMPLE_RET +// RUN: FileCheck %s --check-prefix=CHECK_SIMPLE_RET < %t.ll // CHECK_SIMPLE_RET: define {{.*}}simple -func simple(a: Int) -> Int { +public func simple(a: Int) -> Int { if a > 24 { return 0; } @@ -57,9 +57,9 @@ func simple(a: Int) -> Int { // CHECK_SIMPLE_RET: ![[SIMPLE_RET]] = !MDLocation(line: [[@LINE+1]], column: 1, } -// RUN: cat %t.ll | FileCheck %s --check-prefix=CHECK_COMPLEX_RET +// RUN: FileCheck %s --check-prefix=CHECK_COMPLEX_RET < %t.ll // CHECK_COMPLEX_RET: define {{.*}}complex -func complex(a: Int) -> Int { +public func complex(a: Int) -> Int { if a > 24 { return a*a } @@ -68,9 +68,9 @@ func complex(a: Int) -> Int { // CHECK_COMPLEX_RET: ![[COMPLEX_RET]] = !MDLocation(line: [[@LINE+1]], column: 1, } -// RUN: cat %t.ll | FileCheck %s --check-prefix=CHECK_COMPLEX_SIMPLE +// RUN: FileCheck %s --check-prefix=CHECK_COMPLEX_SIMPLE < %t.ll // CHECK_COMPLEX_SIMPLE: define {{.*}}complex_simple -func complex_simple(a: Int) -> Int { +public func complex_simple(a: Int) -> Int { if a > 24 { return a*a } @@ -79,9 +79,9 @@ func complex_simple(a: Int) -> Int { // CHECK_COMPLEX_SIMPLE: ![[COMPLEX_SIMPLE_RET]] = !MDLocation(line: [[@LINE+1]], column: 1, } -// RUN: cat %t.ll | FileCheck %s --check-prefix=CHECK_SIMPLE_COMPLEX +// RUN: FileCheck %s --check-prefix=CHECK_SIMPLE_COMPLEX < %t.ll // CHECK_SIMPLE_COMPLEX: define {{.*}}simple_complex -func simple_complex(a: Int) -> Int { +public func simple_complex(a: Int) -> Int { if a > 24 { return a*a } @@ -94,17 +94,17 @@ func simple_complex(a: Int) -> Int { // --------------------------------------------------------------------- -// RUN: cat %t.ll | FileCheck %s --check-prefix=CHECK_CLEANUP_NONE +// RUN: FileCheck %s --check-prefix=CHECK_CLEANUP_NONE < %t.ll // CHECK_CLEANUP_NONE: define {{.*}}cleanup_none -func cleanup_none(inout a: NSString) { +public func cleanup_none(inout a: NSString) { a = "empty" // CHECK_CLEANUP_NONE: ret void, !dbg ![[CLEANUP_NONE_RET:.*]] // CHECK_CLEANUP_NONE: ![[CLEANUP_NONE_RET]] = !MDLocation(line: [[@LINE+1]], column: 1, } -// RUN: cat %t.ll | FileCheck %s --check-prefix=CHECK_CLEANUP_EMPTY +// RUN: FileCheck %s --check-prefix=CHECK_CLEANUP_EMPTY < %t.ll // CHECK_CLEANUP_EMPTY: define {{.*}}cleanup_empty -func cleanup_empty(inout a: NSString) { +public func cleanup_empty(inout a: NSString) { if a.length > 24 { return; } @@ -115,9 +115,9 @@ func cleanup_empty(inout a: NSString) { // CHECK_CLEANUP_EMPTY: ![[CLEANUP_EMPTY_RET]] = !MDLocation(line: [[@LINE+1]], column: 1, } -// RUN: cat %t.ll | FileCheck %s --check-prefix=CHECK_CLEANUP_EMPTY_NONE +// RUN: FileCheck %s --check-prefix=CHECK_CLEANUP_EMPTY_NONE < %t.ll // CHECK_CLEANUP_EMPTY_NONE: define {{.*}}cleanup_empty_none -func cleanup_empty_none(inout a: NSString) { +public func cleanup_empty_none(inout a: NSString) { if a.length > 24 { return; } @@ -127,9 +127,9 @@ func cleanup_empty_none(inout a: NSString) { // CHECK_CLEANUP_EMPTY_NONE: ![[CLEANUP_EMPTY_NONE_RET]] = !MDLocation(line: [[@LINE+1]], column: 1, } -// RUN: cat %t.ll | FileCheck %s --check-prefix=CHECK_CLEANUP_SIMPLE_RET +// RUN: FileCheck %s --check-prefix=CHECK_CLEANUP_SIMPLE_RET < %t.ll // CHECK_CLEANUP_SIMPLE_RET: define {{.*}}cleanup_simple -func cleanup_simple(a: NSString) -> Int { +public func cleanup_simple(a: NSString) -> Int { if a.length > 24 { return 0 } @@ -139,9 +139,9 @@ func cleanup_simple(a: NSString) -> Int { // CHECK_CLEANUP_SIMPLE_RET: ![[CLEANUP_SIMPLE_RET]] = !MDLocation(line: [[@LINE+1]], column: 1, } -// RUN: cat %t.ll | FileCheck %s --check-prefix=CHECK_CLEANUP_COMPLEX +// RUN: FileCheck %s --check-prefix=CHECK_CLEANUP_COMPLEX < %t.ll // CHECK_CLEANUP_COMPLEX: define {{.*}}cleanup_complex -func cleanup_complex(a: NSString) -> Int { +public func cleanup_complex(a: NSString) -> Int { if a.length > 24 { return a.length*a.length } @@ -151,9 +151,9 @@ func cleanup_complex(a: NSString) -> Int { // CHECK_CLEANUP_COMPLEX: ![[CLEANUP_COMPLEX_RET]] = !MDLocation(line: [[@LINE+1]], column: 1, } -// RUN: cat %t.ll | FileCheck %s --check-prefix=CHECK_CLEANUP_COMPLEX_SIMPLE +// RUN: FileCheck %s --check-prefix=CHECK_CLEANUP_COMPLEX_SIMPLE < %t.ll // CHECK_CLEANUP_COMPLEX_SIMPLE: define {{.*}}cleanup_complex_simple -func cleanup_complex_simple(a: NSString) -> Int { +public func cleanup_complex_simple(a: NSString) -> Int { if a.length > 24 { return a.length*a.length } @@ -163,9 +163,9 @@ func cleanup_complex_simple(a: NSString) -> Int { // CHECK_CLEANUP_COMPLEX_SIMPLE: ![[CLEANUP_COMPLEX_SIMPLE_RET]] = !MDLocation(line: [[@LINE+1]], column: 1, } -// RUN: cat %t.ll | FileCheck %s --check-prefix=CHECK_CLEANUP_SIMPLE_COMPLEX +// RUN: FileCheck %s --check-prefix=CHECK_CLEANUP_SIMPLE_COMPLEX < %t.ll // CHECK_CLEANUP_SIMPLE_COMPLEX: define {{.*}}cleanup_simple_complex -func cleanup_simple_complex(a: NSString) -> Int { +public func cleanup_simple_complex(a: NSString) -> Int { if a.length > 24 { return a.length*a.length } diff --git a/test/DebugInfo/scopes.swift b/test/DebugInfo/scopes.swift index 02e0a94f4a386..b711a6d4dc16e 100644 --- a/test/DebugInfo/scopes.swift +++ b/test/DebugInfo/scopes.swift @@ -1,4 +1,5 @@ -// RUN: %swift -g -emit-ir %s | FileCheck %s +// RUN: %target-swift-frontend -g -emit-ir %s | FileCheck %s + class UIViewController { } diff --git a/test/DebugInfo/sdk.swift b/test/DebugInfo/sdk.swift index d98b8dc2b3651..5dd5868664dfd 100644 --- a/test/DebugInfo/sdk.swift +++ b/test/DebugInfo/sdk.swift @@ -1,5 +1,5 @@ // Check that the sdk and resource dirs end up in the debug info. -// RUN: %swiftc_driver %s -emit-ir -g -o - | FileCheck %s -// RUN: %swiftc_driver %s -emit-ir -sdk "/Weird Location/SDK" -g -o - | FileCheck --check-prefix CHECK-EXPLICIT %s +// RUN: %target-swiftc_driver %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swiftc_driver %s -emit-ir -sdk "/Weird Location/SDK" -g -o - | FileCheck --check-prefix CHECK-EXPLICIT %s // CHECK: \00Swift version {{.*}}\000{{.*}} -resource-dir {{.*}}" // CHECK-EXPLICIT: \00Swift version {{.*}}\000{{.*}} -sdk \22/Weird Location/SDK\22{{.*}} -resource-dir {{.*}}" diff --git a/test/DebugInfo/self.swift b/test/DebugInfo/self.swift index 97e479f147e39..7c94f53cdbb2f 100644 --- a/test/DebugInfo/self.swift +++ b/test/DebugInfo/self.swift @@ -1,10 +1,11 @@ -// RUN: %swift -primary-file %s -emit-ir -g -o - | FileCheck %s -struct stuffStruct { +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s + +public struct stuffStruct { var a: Int = 6 var b: String = "Nothing" } -func f() { +public func f() { var thing: stuffStruct = stuffStruct() } @@ -12,9 +13,9 @@ func f() { // is constructed in an alloca. The debug info for the alloca should not // describe a reference type as we would normally do with inout arguments. // -// CHECK: define hidden void @_TFV4self11stuffStructCfMS0_FT_S0_(%V4self11stuffStruct* noalias sret) { +// CHECK: define {{.*}} @_TFV4self11stuffStructCfMS0_FT_S0_( // CHECK-NEXT: entry: -// CHECK-NEXT: %[[ALLOCA:.*]] = alloca %V4self11stuffStruct, align 8 +// CHECK-NEXT: %[[ALLOCA:.*]] = alloca %V4self11stuffStruct, align {{(4|8)}} // CHECK: call void @llvm.dbg.declare(metadata %V4self11stuffStruct* %[[ALLOCA]], metadata ![[SELF:.*]], metadata !{{[0-9]+}}), !dbg // CHECK: ![[STUFFSTRUCT:[^,]+]]} ; [ DW_TAG_structure_type ] [stuffStruct] // CHECK: ![[SELF]] = {{.*}}![[STUFFSTRUCT]]} ; [ DW_TAG_auto_variable ] [self] diff --git a/test/DebugInfo/shadow_copies.swift b/test/DebugInfo/shadow_copies.swift index 0b7520540c365..dfdafde76d42b 100644 --- a/test/DebugInfo/shadow_copies.swift +++ b/test/DebugInfo/shadow_copies.swift @@ -1,10 +1,11 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -Onone -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -Onone -emit-ir -g -o - | FileCheck %s + class ClassA { - var x : Int + var x : Int64 var y : Float - init (_ input : Int) + init (_ input : Int64) { x = input y = Float(input) + 0.5 @@ -13,9 +14,9 @@ class ClassA class ClassB : ClassA { - override init (_ input : Int) + override init (_ input : Int64) { - // CHECK: @_TFC{{.*}}6ClassBcfMS0_FSiS0_ + // CHECK: @_TFC{{.*}}6ClassBcfMS0_FVSs5Int64S0_ // CHECK: alloca {{.*}}ClassB* // CHECK: alloca i64 // CHECK-NOT: alloca diff --git a/test/DebugInfo/shadowcopy-linetable.swift b/test/DebugInfo/shadowcopy-linetable.swift index 0eb25dae4726e..6595349710d6e 100644 --- a/test/DebugInfo/shadowcopy-linetable.swift +++ b/test/DebugInfo/shadowcopy-linetable.swift @@ -1,10 +1,11 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + func foo(inout x : Int) { // Make sure the shadow copy is being made in the prologue, but the // code to load the value from the inout storage is not. x = x + 2 - // CHECK: %[[X:.*]] = alloca %Si*, align 8 - // CHECK: store %Si* %0, %Si** %[[X]], align 8 + // CHECK: %[[X:.*]] = alloca %Si*, align {{(4|8)}} + // CHECK: store %Si* %0, %Si** %[[X]], align {{(4|8)}} // CHECK-NOT: !dbg // CHECK-NEXT: call void @llvm.dbg.declare // CHECK-NEXT: getelementptr inbounds %Si* %0, i32 0, i32 0, !dbg diff --git a/test/DebugInfo/simple.sil b/test/DebugInfo/simple.sil index 4a71d8d709874..8595f9da65d2d 100644 --- a/test/DebugInfo/simple.sil +++ b/test/DebugInfo/simple.sil @@ -1,4 +1,4 @@ -// RUN: %target-build-swift %s -g -emit-ir -o - | FileCheck %s +// RUN: %target-swift-frontend %s -g -emit-ir -o - | FileCheck %s sil_stage canonical diff --git a/test/DebugInfo/structs.swift b/test/DebugInfo/structs.swift index 5f05dbf716247..d860e277a820d 100644 --- a/test/DebugInfo/structs.swift +++ b/test/DebugInfo/structs.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s // This is more of a crash test than anything else. @@ -8,7 +8,7 @@ struct A { func test(var x : A) {} // CHECK: define hidden void @_TF7structs4test -// CHECK: [[X:%.*]] = alloca [[A:%.*]], align 8 +// CHECK: [[X:%.*]] = alloca [[A:%.*]], align {{(4|8)}} // CHECK-NEXT: call void @llvm.dbg.declare(metadata [[A]]* [[X]], metadata [[X_DBG:!.*]], metadata !{{[0-9]+}}) // CHECK: ![[A_DI:[^,]+]]} ; [ DW_TAG_structure_type ] [A] [line [[@LINE-8]] // CHECK: [[X_DBG]] = {{.*}}![[A_DI]]} ; [ DW_TAG_arg_variable ] [x] [line [[@LINE-5]]] diff --git a/test/DebugInfo/test-foundation.swift b/test/DebugInfo/test-foundation.swift index ccbd036537f56..d4f67c66aea4c 100644 --- a/test/DebugInfo/test-foundation.swift +++ b/test/DebugInfo/test-foundation.swift @@ -1,7 +1,7 @@ -// RUN: %target-build-swift -emit-ir -g %s -o %t.ll -// RUN: cat %t.ll | FileCheck %s --check-prefix SANITY -// RUN: cat %t.ll | FileCheck %s --check-prefix IMPORT-CHECK -// RUN: cat %t.ll | FileCheck %s --check-prefix LOC-CHECK +// RUN: %target-swift-frontend -emit-ir -g %s -o %t.ll +// RUN: FileCheck %s --check-prefix SANITY < %t.ll +// RUN: FileCheck %s --check-prefix IMPORT-CHECK < %t.ll +// RUN: FileCheck %s --check-prefix LOC-CHECK < %t.ll // RUN: llc %t.ll -filetype=obj -o %t.o // RUN: llvm-dwarfdump %t.o | FileCheck %s --check-prefix DWARF-CHECK // RUN: dwarfdump --verify %t.o @@ -65,7 +65,7 @@ var MyObj: MyObject MyObj = NsObj as! MyObject MyObj.blah() -func err() { +public func err() { // DWARF-CHECK: DW_AT_name{{.*}}NSError // DWARF-CHECK: DW_AT_linkage_name{{.*}}_TtCSo7NSError let error = NSError(domain: "myDomain", code: 4, @@ -73,7 +73,7 @@ func err() { } // LOC-CHECK: define {{.*}}4date -func date() { +public func date() { // LOC-CHECK: call {{.*}} @_TFSSCfMSSFT21_builtinStringLiteralBp8byteSizeBw7isASCIIBi1__SS{{.*}}, !dbg ![[L1:.*]] let d1 = NSDateFormatter() // LOC-CHECK: br{{.*}}, !dbg ![[L2:.*]] diff --git a/test/DebugInfo/test_ints.swift b/test/DebugInfo/test_ints.swift index 47f54aabc64cc..56382b823c9a9 100644 --- a/test/DebugInfo/test_ints.swift +++ b/test/DebugInfo/test_ints.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s // These two should not have the same type. // CHECK: _TtVSs5Int64"} ; [ DW_TAG_structure_type ] [Int64] [line 0, size 64, align 64, offset 0] [def] [from ] diff --git a/test/DebugInfo/top_level_code.swift b/test/DebugInfo/top_level_code.swift index ce1c356660bb4..5884c57ae2bd9 100644 --- a/test/DebugInfo/top_level_code.swift +++ b/test/DebugInfo/top_level_code.swift @@ -1,7 +1,8 @@ -// RUN: %swift %s -S -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -S -g -o - | FileCheck %s + var a = 1 var b = 2 println(a+b) // CHECK: _main: -// Verify that the top-level function (main) begins at line 2 (and not at line 0). -// CHECK: .loc {{[0-9]}} 2 {{[0-9]}} prologue_end +// Verify that the top-level function (main) begins at line 3 (and not at line 0). +// CHECK: .loc {{[0-9]}} 3 {{[0-9]}} prologue_end diff --git a/test/DebugInfo/top_level_var.swift b/test/DebugInfo/top_level_var.swift index 5099bd20bc664..bc9c6aed6196b 100644 --- a/test/DebugInfo/top_level_var.swift +++ b/test/DebugInfo/top_level_var.swift @@ -1,8 +1,9 @@ -// RUN: %swift %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + var a = 1 println(a) // Verify that global variables are emitted once in main, once as // global variable. // CHECK: ![[MAIN:.*]] ={{.*}}; [ DW_TAG_subprogram ] [line 1] [def] [scope 0] [main] // CHECK: ![[MOD:.*]] ={{.*}}; [ DW_TAG_module ] [top_level_var] -// CHECK: ![[MOD]],{{.*}}; [ DW_TAG_variable ] [a] [line 2] [def] +// CHECK: ![[MOD]],{{.*}}; [ DW_TAG_variable ] [a] [line 3] [def] diff --git a/test/DebugInfo/trap-optimized.swift b/test/DebugInfo/trap-optimized.swift index ba18135d408b7..848027a8e913c 100644 --- a/test/DebugInfo/trap-optimized.swift +++ b/test/DebugInfo/trap-optimized.swift @@ -1,4 +1,4 @@ -// RUN: %swift -O -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend -O -primary-file %s -emit-ir -g -o - | FileCheck %s // CHECK: define{{.*}}2fn func fn() { diff --git a/test/DebugInfo/trap.swift b/test/DebugInfo/trap.swift index e37d3f5d453b8..c29a55bd19e0a 100644 --- a/test/DebugInfo/trap.swift +++ b/test/DebugInfo/trap.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-stdlib -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend -parse-stdlib -primary-file %s -emit-ir -g -o - | FileCheck %s import Swift // CHECK: define{{.*}}1f diff --git a/test/DebugInfo/typealias.swift b/test/DebugInfo/typealias.swift index 703c5dcfe126f..c1efabe1646d0 100644 --- a/test/DebugInfo/typealias.swift +++ b/test/DebugInfo/typealias.swift @@ -1,4 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s + class DWARF { // CHECK-DAG: ![[DIEOFFSET:.*]] = {{.*}}[ DW_TAG_typedef ] [_TtaC9typealias5DWARF9DIEOffset] [line [[@LINE+1]], size 0, align 0, offset 0] [from _TtVSs6UInt32] diff --git a/test/DebugInfo/typearg.swift b/test/DebugInfo/typearg.swift index 561331e77ab66..f3c06f69c525f 100644 --- a/test/DebugInfo/typearg.swift +++ b/test/DebugInfo/typearg.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s protocol AProtocol { func f() -> String; @@ -29,7 +29,7 @@ class Foo { } // Verify that the backend doesn't elide the debug intrinsics. -// RUN: %swift -target x86_64-apple-macosx10.9 %s -c -g -o %t.o +// RUN: %target-swift-frontend %s -c -g -o %t.o // RUN: llvm-dwarfdump %t.o | FileCheck %s --check-prefix=CHECK-LLVM // CHECK-LLVM-DAG: .debug_str[{{.*}}] = "x" // CHECK-LLVM-DAG: .debug_str[{{.*}}] = "$swift.type.T" diff --git a/test/DebugInfo/unowned-capture.swift b/test/DebugInfo/unowned-capture.swift index 1549b9f79b9c7..676b5ff8ab0ac 100644 --- a/test/DebugInfo/unowned-capture.swift +++ b/test/DebugInfo/unowned-capture.swift @@ -1,4 +1,5 @@ -// RUN: %swift -primary-file %s -emit-ir -g -o - | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s + class Foo { func DefinesClosure (a_string : String) -> () -> String diff --git a/test/DebugInfo/variables.swift b/test/DebugInfo/variables.swift index 549067b40ad0c..c8ad93f5d6481 100644 --- a/test/DebugInfo/variables.swift +++ b/test/DebugInfo/variables.swift @@ -1,14 +1,14 @@ -// RUN: %target-build-swift %s -g -emit-ir -o - | FileCheck %s +// RUN: %target-swift-frontend %s -g -emit-ir -o - | FileCheck %s // Ensure that the debug info we're emitting passes the back end verifier. -// RUN: %target-build-swift %s -g -S -o - | FileCheck %s --check-prefix ASM +// RUN: %target-swift-frontend %s -g -S -o - | FileCheck %s --check-prefix ASM // ASM: DWARF // // Test variables-interpreter.swift runs this code with `swift -g -i`. // Test variables-repl.swift runs this code with `swift -g < variables.swift`. -// CHECK-DAG: ![[TLC:.*]] ={{.*}}; [ DW_TAG_module ] [main] +// CHECK-DAG: ![[TLC:.*]] ={{.*}}; [ DW_TAG_module ] [variables] // Global variables. var glob_i8: Int8 = 8; diff --git a/test/Demangle/lookup.swift b/test/Demangle/lookup.swift index 16633edf02d9b..f8132ab9f07d0 100644 --- a/test/Demangle/lookup.swift +++ b/test/Demangle/lookup.swift @@ -1,28 +1,28 @@ // RUN: rm -rf %t && mkdir %t -// RUN: not %swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_notASwiftSymbol - -// RUN: %swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtV14swift_ide_test12PublicStruct -// RUN: %swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtV14swift_ide_test14InternalStruct -// RUN: not %swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtV14swift_ide_testP13PrivateStruct -// RUN: not %swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtV14swift_ide_testP1_13PrivateStruct -// RUN: %swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtV14swift_ide_testP33_5CB4BCC03C4B9CB2AEEDDFF10FE7BD1E13PrivateStruct | FileCheck -check-prefix=THIS-FILE %s - -// RUN: %swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtCC14swift_ide_test5Outer5Inner -// RUN: not %swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtCC14swift_ide_test5Outer6Absent -// RUN: not %swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtCC14swift_ide_test6Absent5Inner -// RUN: not %swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtCC14swift_ide_test5Outer12PrivateInner -// RUN: not %swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtCC14swift_ide_test5OuterP1_12PrivateInner -// RUN: %swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtCC14swift_ide_test5OuterP33_5CB4BCC03C4B9CB2AEEDDFF10FE7BD1E12PrivateInner -// RUN: %swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtCC14swift_ide_testP33_5CB4BCC03C4B9CB2AEEDDFF10FE7BD1E12PrivateOuter5Inner - -// RUN: %swiftc_driver -emit-module -o %t %s %S/Inputs/lookup_other.swift -module-name Lookup -Xfrontend -enable-private-discriminators +// RUN: not %target-swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_notASwiftSymbol + +// RUN: %target-swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtV14swift_ide_test12PublicStruct +// RUN: %target-swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtV14swift_ide_test14InternalStruct +// RUN: not %target-swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtV14swift_ide_testP13PrivateStruct +// RUN: not %target-swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtV14swift_ide_testP1_13PrivateStruct +// RUN: %target-swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtV14swift_ide_testP33_5CB4BCC03C4B9CB2AEEDDFF10FE7BD1E13PrivateStruct | FileCheck -check-prefix=THIS-FILE %s + +// RUN: %target-swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtCC14swift_ide_test5Outer5Inner +// RUN: not %target-swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtCC14swift_ide_test5Outer6Absent +// RUN: not %target-swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtCC14swift_ide_test6Absent5Inner +// RUN: not %target-swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtCC14swift_ide_test5Outer12PrivateInner +// RUN: not %target-swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtCC14swift_ide_test5OuterP1_12PrivateInner +// RUN: %target-swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtCC14swift_ide_test5OuterP33_5CB4BCC03C4B9CB2AEEDDFF10FE7BD1E12PrivateInner +// RUN: %target-swift-ide-test -source-filename=%s -print-ast-typechecked -find-mangled=_TtCC14swift_ide_testP33_5CB4BCC03C4B9CB2AEEDDFF10FE7BD1E12PrivateOuter5Inner + +// RUN: %target-swiftc_driver -emit-module -o %t %s %S/Inputs/lookup_other.swift -module-name Lookup -Xfrontend -enable-private-discriminators // RUN: echo 'import Lookup' > %t/test.swift -// RUN: %swift-ide-test -source-filename=%t/test.swift -print-ast-typechecked -I %t -find-mangled=_TtV6Lookup12PublicStruct -// RUN: %swift-ide-test -source-filename=%t/test.swift -print-ast-typechecked -I %t -find-mangled=_TtV6Lookup14InternalStruct -// RUN: %swift-ide-test -source-filename=%t/test.swift -print-ast-typechecked -I %t -find-mangled=_TtV6LookupP33_FB24ABFEF851D18A6D2510DCD3FD6D6013PrivateStruct | FileCheck -check-prefix=THIS-FILE %s -// RUN: %swift-ide-test -source-filename=%t/test.swift -print-ast-typechecked -I %t -find-mangled=_TtV6LookupP33_F999E3591DC4FCB0EC84CD4166BF8EDB13PrivateStruct | FileCheck -check-prefix=OTHER-FILE %s +// RUN: %target-swift-ide-test -source-filename=%t/test.swift -print-ast-typechecked -I %t -find-mangled=_TtV6Lookup12PublicStruct +// RUN: %target-swift-ide-test -source-filename=%t/test.swift -print-ast-typechecked -I %t -find-mangled=_TtV6Lookup14InternalStruct +// RUN: %target-swift-ide-test -source-filename=%t/test.swift -print-ast-typechecked -I %t -find-mangled=_TtV6LookupP33_FB24ABFEF851D18A6D2510DCD3FD6D6013PrivateStruct | FileCheck -check-prefix=THIS-FILE %s +// RUN: %target-swift-ide-test -source-filename=%t/test.swift -print-ast-typechecked -I %t -find-mangled=_TtV6LookupP33_F999E3591DC4FCB0EC84CD4166BF8EDB13PrivateStruct | FileCheck -check-prefix=OTHER-FILE %s public struct PublicStruct {} internal struct InternalStruct {} diff --git a/test/Driver/color-diagnostics.swift b/test/Driver/color-diagnostics.swift index 2d0f59b2649cb..81f7ed1d72479 100644 --- a/test/Driver/color-diagnostics.swift +++ b/test/Driver/color-diagnostics.swift @@ -1,4 +1,4 @@ -// RUN: not %swiftc_driver -Xfrontend -color-diagnostics -emit-executable -o %t %s 2>&1 | FileCheck %s +// RUN: not %target-swiftc_driver -Xfrontend -color-diagnostics -emit-executable -o %t %s 2>&1 | FileCheck %s // CHECK: [0m1 = 2{{$}} 1 = 2 diff --git a/test/Driver/debug-output.swift b/test/Driver/debug-output.swift index 1b3bc07869083..c4afc6ddb41a8 100644 --- a/test/Driver/debug-output.swift +++ b/test/Driver/debug-output.swift @@ -1,6 +1,6 @@ // REQUIRES: asserts -// RUN: %swift -emit-ir %S/Inputs/single_int.swift -o /dev/null -print-stats 2>&1 | FileCheck %s -check-prefix=STATS +// RUN: %target-swift-frontend -emit-ir %S/Inputs/single_int.swift -o /dev/null -print-stats 2>&1 | FileCheck %s -check-prefix=STATS // STATS: Statistics Collected // Only print statistics once // STATS-NOT: Statistics Collected diff --git a/test/Driver/dump-parse.swift b/test/Driver/dump-parse.swift index 839fa25e576d2..4182e2ccbe4f4 100644 --- a/test/Driver/dump-parse.swift +++ b/test/Driver/dump-parse.swift @@ -1,5 +1,5 @@ -// RUN: not %swift -dump-parse %s 2>&1 | FileCheck %s -// RUN: not %swift -dump-ast %s 2>&1 | FileCheck %s -check-prefix=CHECK-AST +// RUN: not %target-swift-frontend -dump-parse %s 2>&1 | FileCheck %s +// RUN: not %target-swift-frontend -dump-ast %s 2>&1 | FileCheck %s -check-prefix=CHECK-AST // CHECK-LABEL: (func_decl "foo(_:)" // CHECK-AST-LABEL: (func_decl "foo(_:)" diff --git a/test/Driver/emit-objc-header.swift b/test/Driver/emit-objc-header.swift index 06fe91910c839..50a031f78fa01 100644 --- a/test/Driver/emit-objc-header.swift +++ b/test/Driver/emit-objc-header.swift @@ -1,5 +1,5 @@ -// RUN: %swiftc_driver -Xfrontend %clang-importer-sdk -emit-module -o %t.1.swiftmodule -emit-objc-header -emit-objc-header-path %t.1.h -module-name ThisModule %s %S/Inputs/main.swift %S/Inputs/lib.swift -// RUN: %swiftc_driver -Xfrontend %clang-importer-sdk -emit-module -o %t.2.swiftmodule -emit-objc-header -emit-objc-header-path %t.2.h -module-name ThisModule %s %S/Inputs/main.swift %S/Inputs/lib.swift -force-single-frontend-invocation +// RUN: %target-swiftc_driver -Xfrontend %clang-importer-sdk -emit-module -o %t.1.swiftmodule -emit-objc-header -emit-objc-header-path %t.1.h -module-name ThisModule %s %S/Inputs/main.swift %S/Inputs/lib.swift +// RUN: %target-swiftc_driver -Xfrontend %clang-importer-sdk -emit-module -o %t.2.swiftmodule -emit-objc-header -emit-objc-header-path %t.2.h -module-name ThisModule %s %S/Inputs/main.swift %S/Inputs/lib.swift -force-single-frontend-invocation // RUN: diff %t.1.h %t.2.h import Foundation diff --git a/test/Driver/multiple_input.swift b/test/Driver/multiple_input.swift index 255af85b1e787..8fa11259a9221 100644 --- a/test/Driver/multiple_input.swift +++ b/test/Driver/multiple_input.swift @@ -1,6 +1,6 @@ -// RUN: %swift -parse %S/Inputs/main.swift %S/Inputs/lib.swift %s -module-name ThisModule -// RUN: %swift -parse %s %S/Inputs/lib.swift %S/Inputs/main.swift -module-name ThisModule +// RUN: %target-swift-frontend -parse %S/Inputs/main.swift %S/Inputs/lib.swift %s -module-name ThisModule +// RUN: %target-swift-frontend -parse %s %S/Inputs/lib.swift %S/Inputs/main.swift -module-name ThisModule -// RUN: not %swift -parse -parse-as-library %S/Inputs/main.swift %S/Inputs/lib.swift %s 2>&1 | FileCheck %s +// RUN: not %target-swift-frontend -parse -parse-as-library %S/Inputs/main.swift %S/Inputs/lib.swift %s 2>&1 | FileCheck %s // CHECK: main.swift: // CHECK: expressions are not allowed at the top level diff --git a/test/Driver/options.swift b/test/Driver/options.swift index 1e77696135265..e46f3c8bcbe36 100644 --- a/test/Driver/options.swift +++ b/test/Driver/options.swift @@ -1,35 +1,35 @@ // rdar://13723332 Crash on -emit-sil with no input files -// RUN: not %swift -emit-sil 2>&1 | FileCheck -check-prefix=NO_FILES %s -// RUN: not %swift -emit-sil -parse-as-library 2>&1 | FileCheck -check-prefix=NO_FILES %s +// RUN: not %target-swift-frontend -emit-sil 2>&1 | FileCheck -check-prefix=NO_FILES %s +// RUN: not %target-swift-frontend -emit-sil -parse-as-library 2>&1 | FileCheck -check-prefix=NO_FILES %s // NO_FILES: this mode requires at least one input file -// RUN: not %swift -parse-sil -emit-sil 2>&1 | FileCheck -check-prefix=SIL_FILES %s -// RUN: not %swift -parse-sil -emit-sil %s %s 2>&1 | FileCheck -check-prefix=SIL_FILES %s +// RUN: not %target-swift-frontend -parse-sil -emit-sil 2>&1 | FileCheck -check-prefix=SIL_FILES %s +// RUN: not %target-swift-frontend -parse-sil -emit-sil %s %s 2>&1 | FileCheck -check-prefix=SIL_FILES %s // SIL_FILES: this mode requires a single input file -// RUN: not %swift -emit-silgen -parse-as-library %S/Inputs/invalid-module-name.swift 2>&1 | FileCheck -check-prefix=INVALID_MODULE_NAME %s +// RUN: not %target-swift-frontend -emit-silgen -parse-as-library %S/Inputs/invalid-module-name.swift 2>&1 | FileCheck -check-prefix=INVALID_MODULE_NAME %s // INVALID_MODULE_NAME: error: module name "invalid-module-name" is not a valid identifier; use -module-name flag to specify an alternate name -// RUN: not %swift -emit-silgen -parse-as-library %S/Inputs/invalid.module.name.swift 2>&1 | FileCheck -check-prefix=INVALID_MODULE_NAME2 %s +// RUN: not %target-swift-frontend -emit-silgen -parse-as-library %S/Inputs/invalid.module.name.swift 2>&1 | FileCheck -check-prefix=INVALID_MODULE_NAME2 %s // INVALID_MODULE_NAME2: error: module name "invalid.module.name" is not a valid identifier; use -module-name flag to specify an alternate name -// RUN: not %swift -emit-silgen -parse-as-library %S/Inputs/invalid-module-name.swift -module-name still-invalid 2>&1 | FileCheck -check-prefix=STILL_INVALID %s +// RUN: not %target-swift-frontend -emit-silgen -parse-as-library %S/Inputs/invalid-module-name.swift -module-name still-invalid 2>&1 | FileCheck -check-prefix=STILL_INVALID %s // STILL_INVALID: error: module name "still-invalid" is not a valid identifier{{$}} -// RUN: not %swiftc_driver -emit-silgen -parse-as-library %s -module-name "Swift" 2>&1 | FileCheck -check-prefix=STDLIB_MODULE %s -// RUN: %swiftc_driver -emit-silgen -parse-as-library %s -module-name "Swift" -parse-stdlib -### +// RUN: not %target-swiftc_driver -emit-silgen -parse-as-library %s -module-name "Swift" 2>&1 | FileCheck -check-prefix=STDLIB_MODULE %s +// RUN: %target-swiftc_driver -emit-silgen -parse-as-library %s -module-name "Swift" -parse-stdlib -### // STDLIB_MODULE: error: module name "Swift" is reserved for the standard library{{$}} -// RUN: not %swift -parse -emit-module %s 2>&1 | FileCheck -check-prefix=PARSE_NO_MODULE %s +// RUN: not %target-swift-frontend -parse -emit-module %s 2>&1 | FileCheck -check-prefix=PARSE_NO_MODULE %s // PARSE_NO_MODULE: error: this mode does not support emitting modules{{$}} -// RUN: not %swift -dump-ast -emit-dependencies %s 2>&1 | FileCheck -check-prefix=DUMP_NO_DEPS %s +// RUN: not %target-swift-frontend -dump-ast -emit-dependencies %s 2>&1 | FileCheck -check-prefix=DUMP_NO_DEPS %s // DUMP_NO_DEPS: error: this mode does not support emitting dependency files{{$}} // Should not fail with non-zero exit code. -// RUN: %swift -emit-silgen %S/Inputs/invalid-module-name.swift > /dev/null -// RUN: %swift -emit-silgen -parse-as-library %S/Inputs/invalid-module-name.swift -module-name foo > /dev/null -// RUN: %swift -parse -parse-as-library %S/Inputs/invalid-module-name.swift -module-name foo +// RUN: %target-swift-frontend -emit-silgen %S/Inputs/invalid-module-name.swift > /dev/null +// RUN: %target-swift-frontend -emit-silgen -parse-as-library %S/Inputs/invalid-module-name.swift -module-name foo > /dev/null +// RUN: %target-swift-frontend -parse -parse-as-library %S/Inputs/invalid-module-name.swift -module-name foo // RUN: not %swiftc_driver -crazy-option-that-does-not-exist %s 2>&1 | FileCheck -check-prefix=INVALID_OPTION %s // RUN: not %swift_driver -crazy-option-that-does-not-exist 2>&1 | FileCheck -check-prefix=INVALID_OPTION %s diff --git a/test/Driver/output.swift b/test/Driver/output.swift index 3102924219392..5bd889405542d 100644 --- a/test/Driver/output.swift +++ b/test/Driver/output.swift @@ -3,13 +3,13 @@ // RUN: mkdir %t/sub // RUN: cd %t -// RUN: %swift -emit-bc %s -// RUN: %swift -emit-bc %s -module-name explicit -// RUN: %swift -emit-bc %s -o %t/sub/ -// RUN: %swift -emit-bc %s -o %t/sub/ -module-name explicit -// RUN: %swift -emit-bc %s -o %t/explicit.llvmbc -// RUN: %swift -emit-bc %s -o %t/explicit2.llvmbc -module-name explicit2 -// RUN: echo | %swift -emit-bc - -o %t/sub -module-name stdin +// RUN: %target-swift-frontend -emit-bc %s +// RUN: %target-swift-frontend -emit-bc %s -module-name explicit +// RUN: %target-swift-frontend -emit-bc %s -o %t/sub/ +// RUN: %target-swift-frontend -emit-bc %s -o %t/sub/ -module-name explicit +// RUN: %target-swift-frontend -emit-bc %s -o %t/explicit.llvmbc +// RUN: %target-swift-frontend -emit-bc %s -o %t/explicit2.llvmbc -module-name explicit2 +// RUN: echo | %target-swift-frontend -emit-bc - -o %t/sub -module-name stdin // RUN: ls -1 %t | FileCheck %s // RUN: ls -1 %t/sub/ | FileCheck %s -check-prefix=SUB diff --git a/test/Driver/sdk-link.swift b/test/Driver/sdk-link.swift index 3238093e2ded1..436fb7aefcb0d 100644 --- a/test/Driver/sdk-link.swift +++ b/test/Driver/sdk-link.swift @@ -1,6 +1,6 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %target-build-swift -emit-module -o %t/test.swiftmodule %s +// RUN: %target-swift-frontend -emit-module -o %t/test.swiftmodule %s // RUN: %target-build-swift -g -o %t/sdk-link %s // RUN: %target-run %t/sdk-link | FileCheck %s diff --git a/test/Driver/temp-files.swift b/test/Driver/temp-files.swift index 56480581d2b38..3f9241990dfd7 100644 --- a/test/Driver/temp-files.swift +++ b/test/Driver/temp-files.swift @@ -1,25 +1,25 @@ // REQUIRES: ld-add_ast_path // RUN: rm -rf %t && mkdir -p %t/tmp/ && touch %t/tmp/dummy -// RUN: env TMPDIR=%t/tmp/ %swiftc_driver -emit-executable %s -o %t/main +// RUN: env TMPDIR=%t/tmp/ %target-swiftc_driver -emit-executable %s -o %t/main // RUN: ls %t/main // RUN: ls %t/tmp | FileCheck -check-prefix=EMPTY %s // EMPTY-NOT: .{{(o|swiftmodule|swiftdoc)}} // RUN: rm -rf %t && mkdir -p %t/tmp/ && touch %t/tmp/dummy -// RUN: env TMPDIR=%t/tmp/ %swiftc_driver -emit-executable %s -o %t/main2 -emit-module-path %t/main2.swiftmodule +// RUN: env TMPDIR=%t/tmp/ %target-swiftc_driver -emit-executable %s -o %t/main2 -emit-module-path %t/main2.swiftmodule // RUN: ls %t/main2 // RUN: ls %t/main2.swiftmodule // RUN: ls %t/tmp | FileCheck -check-prefix=EMPTY %s // RUN: rm -rf %t && mkdir -p %t/tmp/ && touch %t/tmp/dummy -// RUN: env TMPDIR=%t/tmp/ %swiftc_driver -emit-executable %s -o %t/main3 -g +// RUN: env TMPDIR=%t/tmp/ %target-swiftc_driver -emit-executable %s -o %t/main3 -g // RUN: ls %t/main3 // RUN: ls %t/tmp | FileCheck -check-prefix=EMPTY %s // RUN: rm -rf %t && mkdir -p %t/tmp/ && touch %t/tmp/dummy -// RUN: env TMPDIR=%t/tmp/ %swiftc_driver -emit-executable %s -o %t/main4 -emit-module-path %t/main4.swiftmodule -g +// RUN: env TMPDIR=%t/tmp/ %target-swiftc_driver -emit-executable %s -o %t/main4 -emit-module-path %t/main4.swiftmodule -g // RUN: ls %t/main4 // RUN: ls %t/main4.swiftmodule // RUN: ls %t/main4.dSYM @@ -27,14 +27,14 @@ // RUN: rm -rf %t && mkdir -p %t/tmp/ && touch %t/tmp/dummy // RUN: echo "{\"%s\": {\"object\": \"%t/main5.o\"}}" > %t.json -// RUN: env TMPDIR=%t/tmp/ %swiftc_driver -emit-executable %s -o %t/main5 -output-file-map %t.json -g +// RUN: env TMPDIR=%t/tmp/ %target-swiftc_driver -emit-executable %s -o %t/main5 -output-file-map %t.json -g // RUN: ls %t/main5 // RUN: ls %t/main5.o // RUN: ls %t/main5.dSYM // RUN: ls %t/tmp | FileCheck -check-prefix=EMPTY %s // RUN: rm -rf %t && mkdir -p %t/tmp/ && touch %t/tmp/dummy -// RUN: env TMPDIR=%t/tmp/ %swiftc_driver -emit-executable %s -o %t/main6 -g -save-temps +// RUN: env TMPDIR=%t/tmp/ %target-swiftc_driver -emit-executable %s -o %t/main6 -g -save-temps // RUN: ls %t/main6 // RUN: ls %t/main6.dSYM // RUN: ls %t/tmp | FileCheck -check-prefix=SAVE-TEMPS %s diff --git a/test/Frontend/InternalChecks.swift b/test/Frontend/InternalChecks.swift index d26cbc17fa1b2..4b621b11eb28a 100644 --- a/test/Frontend/InternalChecks.swift +++ b/test/Frontend/InternalChecks.swift @@ -1,5 +1,5 @@ -// RUN: %swift -O -parse-stdlib -D INTERNAL_CHECKS_ENABLED -primary-file %s -emit-sil | FileCheck %s --check-prefix=CHECKS -// RUN: %swift -O -parse-stdlib -primary-file %s -emit-sil | FileCheck %s --check-prefix=NOCHECKS +// RUN: %target-swift-frontend -O -parse-stdlib -D INTERNAL_CHECKS_ENABLED -primary-file %s -emit-sil | FileCheck %s --check-prefix=CHECKS +// RUN: %target-swift-frontend -O -parse-stdlib -primary-file %s -emit-sil | FileCheck %s --check-prefix=NOCHECKS import Swift diff --git a/test/Frontend/OptimizationOptions-with-stdlib-checks.swift b/test/Frontend/OptimizationOptions-with-stdlib-checks.swift index 26ec7729d99be..ec51229edcbd9 100644 --- a/test/Frontend/OptimizationOptions-with-stdlib-checks.swift +++ b/test/Frontend/OptimizationOptions-with-stdlib-checks.swift @@ -1,6 +1,6 @@ -// RUN: %swift -module-name OptimizationOptions -disable-func-sig-opts -Onone -emit-sil -primary-file %s 2>&1 | FileCheck %s --check-prefix=DEBUG -// RUN: %swift -module-name OptimizationOptions -disable-func-sig-opts -O -emit-sil -primary-file %s 2>&1 | FileCheck %s --check-prefix=RELEASE -// RUN: %swift -module-name OptimizationOptions -disable-func-sig-opts -Ounchecked -emit-sil -primary-file %s 2>&1 | FileCheck %s --check-prefix=UNCHECKED +// RUN: %target-swift-frontend -module-name OptimizationOptions -disable-func-sig-opts -Onone -emit-sil -primary-file %s 2>&1 | FileCheck %s --check-prefix=DEBUG +// RUN: %target-swift-frontend -module-name OptimizationOptions -disable-func-sig-opts -O -emit-sil -primary-file %s 2>&1 | FileCheck %s --check-prefix=RELEASE +// RUN: %target-swift-frontend -module-name OptimizationOptions -disable-func-sig-opts -Ounchecked -emit-sil -primary-file %s 2>&1 | FileCheck %s --check-prefix=UNCHECKED // REQUIRES: optimized_stdlib // REQUIRES: swift_stdlib_asserts diff --git a/test/Frontend/OptimizationOptions-without-stdlib-checks.swift b/test/Frontend/OptimizationOptions-without-stdlib-checks.swift index 3ec03cac5e05a..ddbfcdfab75e5 100644 --- a/test/Frontend/OptimizationOptions-without-stdlib-checks.swift +++ b/test/Frontend/OptimizationOptions-without-stdlib-checks.swift @@ -1,6 +1,6 @@ -// RUN: %swift -module-name OptimizationOptions -disable-func-sig-opts -Onone -emit-sil -primary-file %s 2>&1 | FileCheck %s --check-prefix=DEBUG -// RUN: %swift -module-name OptimizationOptions -disable-func-sig-opts -O -emit-sil -primary-file %s 2>&1 | FileCheck %s --check-prefix=RELEASE -// RUN: %swift -module-name OptimizationOptions -disable-func-sig-opts -Ounchecked -emit-sil -primary-file %s 2>&1 | FileCheck %s --check-prefix=UNCHECKED +// RUN: %target-swift-frontend -module-name OptimizationOptions -disable-func-sig-opts -Onone -emit-sil -primary-file %s 2>&1 | FileCheck %s --check-prefix=DEBUG +// RUN: %target-swift-frontend -module-name OptimizationOptions -disable-func-sig-opts -O -emit-sil -primary-file %s 2>&1 | FileCheck %s --check-prefix=RELEASE +// RUN: %target-swift-frontend -module-name OptimizationOptions -disable-func-sig-opts -Ounchecked -emit-sil -primary-file %s 2>&1 | FileCheck %s --check-prefix=UNCHECKED // REQUIRES: optimized_stdlib // REQUIRES: swift_stdlib_asserts diff --git a/test/Frontend/dependencies.swift b/test/Frontend/dependencies.swift index 631120a7d2728..2b6e58b18adc4 100644 --- a/test/Frontend/dependencies.swift +++ b/test/Frontend/dependencies.swift @@ -1,9 +1,9 @@ // RUN: rm -rf %t && mkdir %t -// RUN: %swift -emit-dependencies-path - -parse %S/../Inputs/empty.swift | FileCheck -check-prefix=CHECK-BASIC %s -// RUN: %swift -emit-reference-dependencies-path - -parse -primary-file %S/../Inputs/empty.swift | FileCheck -check-prefix=CHECK-BASIC-YAML %s +// RUN: %target-swift-frontend -emit-dependencies-path - -parse %S/../Inputs/empty.swift | FileCheck -check-prefix=CHECK-BASIC %s +// RUN: %target-swift-frontend -emit-reference-dependencies-path - -parse -primary-file %S/../Inputs/empty.swift | FileCheck -check-prefix=CHECK-BASIC-YAML %s -// RUN: %swift -emit-dependencies-path %t.d -emit-reference-dependencies-path %t.swiftdeps -parse -primary-file %S/../Inputs/empty.swift +// RUN: %target-swift-frontend -emit-dependencies-path %t.d -emit-reference-dependencies-path %t.swiftdeps -parse -primary-file %S/../Inputs/empty.swift // FileCheck -check-prefix=CHECK-BASIC < %t.d // FileCheck -check-prefix=CHECK-BASIC-YAML < %t.swiftdeps @@ -18,7 +18,7 @@ // CHECK-BASIC-YAML-NOT: {{:$}} -// RUN: %swift -emit-dependencies-path - -emit-module %S/../Inputs/empty.swift -o %t/empty.swiftmodule -emit-module-doc-path %t/empty.swiftdoc -emit-objc-header-path %t/empty.h | FileCheck -check-prefix=CHECK-MULTIPLE-OUTPUTS %s +// RUN: %target-swift-frontend -emit-dependencies-path - -emit-module %S/../Inputs/empty.swift -o %t/empty.swiftmodule -emit-module-doc-path %t/empty.swiftdoc -emit-objc-header-path %t/empty.h | FileCheck -check-prefix=CHECK-MULTIPLE-OUTPUTS %s // CHECK-MULTIPLE-OUTPUTS-LABEL: empty.swiftmodule : // CHECK-MULTIPLE-OUTPUTS: Inputs/empty.swift @@ -31,8 +31,8 @@ // CHECK-MULTIPLE-OUTPUTS: Swift.swiftmodule // CHECK-MULTIPLE-OUTPUTS-NOT: : -// RUN: %swift %clang-importer-sdk -import-objc-header %S/Inputs/dependencies/extra-header.h -emit-dependencies-path - -parse %s | FileCheck -check-prefix=CHECK-IMPORT %s -// RUN: %swift %clang-importer-sdk -import-objc-header %S/Inputs/dependencies/extra-header.h -emit-reference-dependencies-path - -parse -primary-file %s | FileCheck -check-prefix=CHECK-IMPORT-YAML %s +// RUN: %target-swift-frontend %clang-importer-sdk -import-objc-header %S/Inputs/dependencies/extra-header.h -emit-dependencies-path - -parse %s | FileCheck -check-prefix=CHECK-IMPORT %s +// RUN: %target-swift-frontend %clang-importer-sdk -import-objc-header %S/Inputs/dependencies/extra-header.h -emit-reference-dependencies-path - -parse -primary-file %s | FileCheck -check-prefix=CHECK-IMPORT-YAML %s // CHECK-IMPORT-LABEL: - : // CHECK-IMPORT: dependencies.swift diff --git a/test/Generics/algorithms.swift b/test/Generics/algorithms.swift index ffa481b23b20c..be2cb662ec0bd 100644 --- a/test/Generics/algorithms.swift +++ b/test/Generics/algorithms.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift protocol Eq { func ==(lhs: Self, rhs: Self) -> Bool diff --git a/test/Generics/associated_self_constraints.swift b/test/Generics/associated_self_constraints.swift index 367e780bb1432..8022fa52b2c83 100644 --- a/test/Generics/associated_self_constraints.swift +++ b/test/Generics/associated_self_constraints.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol Observer { typealias Value diff --git a/test/Generics/associated_type_typo.swift b/test/Generics/associated_type_typo.swift index 308aa603bd6ab..8609423f76fb7 100644 --- a/test/Generics/associated_type_typo.swift +++ b/test/Generics/associated_type_typo.swift @@ -1,6 +1,6 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift -// RUN: not %swift -parse -debug-generic-signatures %s > %t.dump 2>&1 +// RUN: not %target-swift-frontend -parse -debug-generic-signatures %s > %t.dump 2>&1 // RUN: FileCheck -check-prefix CHECK-GENERIC %s < %t.dump protocol P1 { diff --git a/test/Generics/associated_types.swift b/test/Generics/associated_types.swift index 592e46b33473d..cc848a2f8e4d2 100644 --- a/test/Generics/associated_types.swift +++ b/test/Generics/associated_types.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Deduction of associated types. protocol Fooable { diff --git a/test/Generics/associated_types_inherit.swift b/test/Generics/associated_types_inherit.swift index ea10294452960..f82751197619e 100644 --- a/test/Generics/associated_types_inherit.swift +++ b/test/Generics/associated_types_inherit.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class C { func f() {} diff --git a/test/Generics/associated_types_multi_file.swift b/test/Generics/associated_types_multi_file.swift index a8978a878c9df..80fed8dd6875f 100644 --- a/test/Generics/associated_types_multi_file.swift +++ b/test/Generics/associated_types_multi_file.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -primary-file %s %S/Inputs/associated_types_multi_file_helper.swift -verify +// RUN: %target-swift-frontend -parse -primary-file %s %S/Inputs/associated_types_multi_file_helper.swift -verify var x: X.AssocType = 0.0 as Float diff --git a/test/Generics/constrained_optional_params.swift b/test/Generics/constrained_optional_params.swift index 0d7585bc9fab3..806fcdecf5b80 100644 --- a/test/Generics/constrained_optional_params.swift +++ b/test/Generics/constrained_optional_params.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol P { func method() -> Int diff --git a/test/Generics/deduction.swift b/test/Generics/deduction.swift index 89ceaacec28fb..c17225fd9242c 100644 --- a/test/Generics/deduction.swift +++ b/test/Generics/deduction.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift //===----------------------------------------------------------------------===// // Deduction of generic arguments diff --git a/test/Generics/existential_restrictions.swift b/test/Generics/existential_restrictions.swift index 7197abde500c7..e5afad4ba495a 100644 --- a/test/Generics/existential_restrictions.swift +++ b/test/Generics/existential_restrictions.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol P { } @objc protocol OP { } diff --git a/test/Generics/function_decls.swift b/test/Generics/function_decls.swift index 9def817c7e28d..eaff2ae196b1f 100644 --- a/test/Generics/function_decls.swift +++ b/test/Generics/function_decls.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift //===----------------------------------------------------------------------===// // Generic function declarations diff --git a/test/Generics/function_defs.swift b/test/Generics/function_defs.swift index a1fa9aa2e1525..4cf5464f4229c 100644 --- a/test/Generics/function_defs.swift +++ b/test/Generics/function_defs.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift //===----------------------------------------------------------------------===// // Type-check function definitions diff --git a/test/Generics/generic_types.swift b/test/Generics/generic_types.swift index 0f2880a12dccc..821e59a71871f 100644 --- a/test/Generics/generic_types.swift +++ b/test/Generics/generic_types.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol MyFormattedPrintable { func myFormat() -> String diff --git a/test/Generics/inheritance.swift b/test/Generics/inheritance.swift index 81af94b0e6bae..e86d8b43f1799 100644 --- a/test/Generics/inheritance.swift +++ b/test/Generics/inheritance.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class A { func foo() { } diff --git a/test/Generics/non_generic_derived_class.swift b/test/Generics/non_generic_derived_class.swift index 7f913617b90d0..7cb4405062cbc 100644 --- a/test/Generics/non_generic_derived_class.swift +++ b/test/Generics/non_generic_derived_class.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift class Base { class func f(arg: T) -> Int { diff --git a/test/Generics/requirement_inference.swift b/test/Generics/requirement_inference.swift index 9dffe11a56a16..52e063e90db5a 100644 --- a/test/Generics/requirement_inference.swift +++ b/test/Generics/requirement_inference.swift @@ -1,5 +1,5 @@ -// RUN: %swift -parse %s -verify -// RUN: %swift -parse -debug-generic-signatures %s > %t.dump 2>&1 +// RUN: %target-parse-verify-swift -parse %s -verify +// RUN: %target-parse-verify-swift -parse -debug-generic-signatures %s > %t.dump 2>&1 // RUN: FileCheck %s < %t.dump protocol P1 { diff --git a/test/Generics/same_type_constraints.swift b/test/Generics/same_type_constraints.swift index df48b50a63953..c0cc022093368 100644 --- a/test/Generics/same_type_constraints.swift +++ b/test/Generics/same_type_constraints.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol Fooable { typealias Foo diff --git a/test/Generics/slice_test.swift b/test/Generics/slice_test.swift index b8cd08318cf65..865dd289476c8 100644 --- a/test/Generics/slice_test.swift +++ b/test/Generics/slice_test.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -parse-stdlib -verify +// RUN: %target-parse-verify-swift -parse-stdlib import Swift diff --git a/test/Generics/unbound.swift b/test/Generics/unbound.swift index 366ea66d316ec..425b2dda37bc9 100644 --- a/test/Generics/unbound.swift +++ b/test/Generics/unbound.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Verify the use of unbound generic types. They are permitted in // certain places where type inference can fill in the generic diff --git a/test/IDE/annotation.swift b/test/IDE/annotation.swift index ab2ff2caf2fd3..5e3118d7cb408 100644 --- a/test/IDE/annotation.swift +++ b/test/IDE/annotation.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -annotate -source-filename %s | FileCheck %s +// RUN: %target-swift-ide-test -annotate -source-filename %s | FileCheck %s // CHECK: import struct Swift.Int import struct Swift.Int diff --git a/test/IDE/coloring.swift b/test/IDE/coloring.swift index fe69115c0582d..718c04476bc23 100644 --- a/test/IDE/coloring.swift +++ b/test/IDE/coloring.swift @@ -1,5 +1,5 @@ -// RUN: %swift-ide-test -syntax-coloring -source-filename %s | FileCheck %s -// RUN: %swift-ide-test -syntax-coloring -typecheck -source-filename %s | FileCheck %s +// RUN: %target-swift-ide-test -syntax-coloring -source-filename %s | FileCheck %s +// RUN: %target-swift-ide-test -syntax-coloring -typecheck -source-filename %s | FileCheck %s // CHECK: struct S { struct S { diff --git a/test/IDE/coloring_configs.swift b/test/IDE/coloring_configs.swift index ada1c1f5e107f..e374c88f9c901 100644 --- a/test/IDE/coloring_configs.swift +++ b/test/IDE/coloring_configs.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -syntax-coloring -source-filename %s -D CONF | FileCheck %s +// RUN: %target-swift-ide-test -syntax-coloring -source-filename %s -D CONF | FileCheck %s // CHECK: var f : Int var f : Int diff --git a/test/IDE/comment_attach.swift b/test/IDE/comment_attach.swift index 3e4e107c6cd44..18db1798222a9 100644 --- a/test/IDE/comment_attach.swift +++ b/test/IDE/comment_attach.swift @@ -203,7 +203,7 @@ protocol decl_protocol_1 { extension decl_extension_1 { } -// RUN: %swift-ide-test -print-comments -source-filename %s > %t.txt +// RUN: %target-swift-ide-test -print-comments -source-filename %s > %t.txt // RUN: FileCheck %s -check-prefix=WRONG < %t.txt // RUN: FileCheck %s < %t.txt diff --git a/test/IDE/comment_attach_huge.swift b/test/IDE/comment_attach_huge.swift index d53bb558778f2..04f35b9200214 100644 --- a/test/IDE/comment_attach_huge.swift +++ b/test/IDE/comment_attach_huge.swift @@ -846,7 +846,7 @@ END */ func decl_func_1() {} -// RUN: %swift-ide-test -print-comments -source-filename %s | FileCheck %s +// RUN: %target-swift-ide-test -print-comments -source-filename %s | FileCheck %s // CHECK: Func/decl_func_1 RawComment=[/**\nBEGIN\n{{[^]]*}}\nEND\n*/] diff --git a/test/IDE/comment_brief.swift b/test/IDE/comment_brief.swift index 4e3eeca24c43a..0485878f891fe 100644 --- a/test/IDE/comment_brief.swift +++ b/test/IDE/comment_brief.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -print-comments -source-filename %s | FileCheck %s +// RUN: %target-swift-ide-test -print-comments -source-filename %s | FileCheck %s /// func briefLine1() {} diff --git a/test/IDE/comment_merge.swift b/test/IDE/comment_merge.swift index 35f51062a8a13..75ce6662e81e6 100644 --- a/test/IDE/comment_merge.swift +++ b/test/IDE/comment_merge.swift @@ -92,7 +92,7 @@ func is_doc18() {} */ func is_doc19() {} -// RUN: %swift-ide-test -print-comments -source-filename %s > %t.txt +// RUN: %target-swift-ide-test -print-comments -source-filename %s > %t.txt // RUN: FileCheck %s -check-prefix=WRONG < %t.txt // RUN: FileCheck %s < %t.txt diff --git a/test/IDE/comment_to_xml.swift b/test/IDE/comment_to_xml.swift index 84be9bf0519c8..7e6f2ea5590bf 100644 --- a/test/IDE/comment_to_xml.swift +++ b/test/IDE/comment_to_xml.swift @@ -1,7 +1,7 @@ //===--- Check that we convert comments to XML correctly. -// RUN: %swift -parse -verify %S/../Inputs/comment_to_something_conversion.swift -// RUN: %swift-ide-test -print-comments -source-filename %S/../Inputs/comment_to_something_conversion.swift -comments-xml-schema %S/../../bindings/xml/comment-xml-schema.rng > %t.txt +// RUN: %target-swift-frontend -parse -verify -disable-objc-attr-requires-foundation-module %S/../Inputs/comment_to_something_conversion.swift +// RUN: %target-swift-ide-test -print-comments -source-filename %S/../Inputs/comment_to_something_conversion.swift -comments-xml-schema %S/../../bindings/xml/comment-xml-schema.rng > %t.txt // RUN: FileCheck %S/../Inputs/comment_to_something_conversion.swift < %t.txt // RUN: FileCheck %s -check-prefix=WRONG < %t.txt diff --git a/test/IDE/complete_after_self.swift b/test/IDE/complete_after_self.swift index 446cac625f606..fe9b49e4fd7b8 100644 --- a/test/IDE/complete_after_self.swift +++ b/test/IDE/complete_after_self.swift @@ -1,31 +1,31 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CONSTRUCTOR_SELF_NO_DOT_1 > %t.self.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CONSTRUCTOR_SELF_NO_DOT_1 > %t.self.txt // RUN: FileCheck %s -check-prefix=CONSTRUCTOR_SELF_NO_DOT_1 < %t.self.txt // RUN: FileCheck %s -check-prefix=COMMON_SELF_NO_DOT_1 < %t.self.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CONSTRUCTOR_SELF_DOT_1 > %t.self.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CONSTRUCTOR_SELF_DOT_1 > %t.self.txt // RUN: FileCheck %s -check-prefix=CONSTRUCTOR_SELF_DOT_1 < %t.self.txt // RUN: FileCheck %s -check-prefix=COMMON_SELF_DOT_1 < %t.self.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DESTRUCTOR_SELF_NO_DOT_1 > %t.self.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DESTRUCTOR_SELF_NO_DOT_1 > %t.self.txt // RUN: FileCheck %s -check-prefix=DESTRUCTOR_SELF_NO_DOT_1 < %t.self.txt // RUN: FileCheck %s -check-prefix=COMMON_SELF_NO_DOT_1 < %t.self.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DESTRUCTOR_SELF_DOT_1 > %t.self.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DESTRUCTOR_SELF_DOT_1 > %t.self.txt // RUN: FileCheck %s -check-prefix=DESTRUCTOR_SELF_DOT_1 < %t.self.txt // RUN: FileCheck %s -check-prefix=COMMON_SELF_DOT_1 < %t.self.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_SELF_NO_DOT_1 > %t.self.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_SELF_NO_DOT_1 > %t.self.txt // RUN: FileCheck %s -check-prefix=FUNC_SELF_NO_DOT_1 < %t.self.txt // RUN: FileCheck %s -check-prefix=COMMON_SELF_NO_DOT_1 < %t.self.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_SELF_DOT_1 > %t.self.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_SELF_DOT_1 > %t.self.txt // RUN: FileCheck %s -check-prefix=FUNC_SELF_DOT_1 < %t.self.txt // RUN: FileCheck %s -check-prefix=COMMON_SELF_DOT_1 < %t.self.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_STATIC_SELF_NO_DOT_1 > %t.self.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_STATIC_SELF_NO_DOT_1 > %t.self.txt // RUN: FileCheck %s -check-prefix=FUNC_STATIC_SELF_NO_DOT_1 < %t.self.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_STATIC_SELF_DOT_1 > %t.self.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_STATIC_SELF_DOT_1 > %t.self.txt // RUN: FileCheck %s -check-prefix=FUNC_STATIC_SELF_DOT_1 < %t.self.txt //===--- diff --git a/test/IDE/complete_after_super.swift b/test/IDE/complete_after_super.swift index 18a296949d8b4..9344c40928d54 100644 --- a/test/IDE/complete_after_super.swift +++ b/test/IDE/complete_after_super.swift @@ -1,88 +1,88 @@ // RUN: sed -n -e '/VERIFY_BEGIN/,/VERIFY_END$/ p' %s > %t_no_errors.swift -// RUN: %swift -verify -parse %t_no_errors.swift +// RUN: %target-swift-frontend -verify -parse %t_no_errors.swift -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CONSTRUCTOR_SUPER_NO_DOT_1 > %t.super.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CONSTRUCTOR_SUPER_NO_DOT_1 > %t.super.txt // RUN: FileCheck %s -check-prefix=COMMON_BASE_A_NO_DOT < %t.super.txt // RUN: FileCheck %s -check-prefix=CONSTRUCTOR_SUPER_NO_DOT_1 < %t.super.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CONSTRUCTOR_SUPER_DOT_1 > %t.super.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CONSTRUCTOR_SUPER_DOT_1 > %t.super.txt // RUN: FileCheck %s -check-prefix=COMMON_BASE_A_DOT < %t.super.txt // RUN: FileCheck %s -check-prefix=CONSTRUCTOR_SUPER_DOT_1 < %t.super.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CONSTRUCTOR_SUPER_INIT_PAREN_1 > %t.super.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CONSTRUCTOR_SUPER_INIT_PAREN_1 > %t.super.txt // RUN: FileCheck %s -check-prefix=CONSTRUCTOR_SUPER_INIT_PAREN_1 < %t.super.txt // RUN: FileCheck %s -check-prefix=NO_EXPR_SPECIFIC < %t.super.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DESTRUCTOR_SUPER_NO_DOT_1 > %t.super.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DESTRUCTOR_SUPER_NO_DOT_1 > %t.super.txt // RUN: FileCheck %s -check-prefix=COMMON_BASE_A_NO_DOT < %t.super.txt // RUN: FileCheck %s -check-prefix=DESTRUCTOR_SUPER_NO_DOT_1 < %t.super.txt // RUN: FileCheck %s -check-prefix=NO_CONSTRUCTORS < %t.super.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DESTRUCTOR_SUPER_DOT_1 > %t.super.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DESTRUCTOR_SUPER_DOT_1 > %t.super.txt // RUN: FileCheck %s -check-prefix=COMMON_BASE_A_DOT < %t.super.txt // RUN: FileCheck %s -check-prefix=DESTRUCTOR_SUPER_DOT_1 < %t.super.txt // RUN: FileCheck %s -check-prefix=NO_CONSTRUCTORS < %t.super.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_SUPER_NO_DOT_1 > %t.super.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_SUPER_NO_DOT_1 > %t.super.txt // RUN: FileCheck %s -check-prefix=COMMON_BASE_A_NO_DOT < %t.super.txt // RUN: FileCheck %s -check-prefix=FUNC_SUPER_NO_DOT_1 < %t.super.txt // RUN: FileCheck %s -check-prefix=NO_CONSTRUCTORS < %t.super.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_SUPER_DOT_1 > %t.super.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_SUPER_DOT_1 > %t.super.txt // RUN: FileCheck %s -check-prefix=COMMON_BASE_A_DOT < %t.super.txt // RUN: FileCheck %s -check-prefix=FUNC_SUPER_DOT_1 < %t.super.txt // RUN: FileCheck %s -check-prefix=NO_CONSTRUCTORS < %t.super.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CONSTRUCTOR_SUPER_NO_DOT_2 > %t.super.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CONSTRUCTOR_SUPER_NO_DOT_2 > %t.super.txt // RUN: FileCheck %s -check-prefix=COMMON_BASE_B_NO_DOT < %t.super.txt // RUN: FileCheck %s -check-prefix=CONSTRUCTOR_SUPER_NO_DOT_2 < %t.super.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CONSTRUCTOR_SUPER_DOT_2 > %t.super.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CONSTRUCTOR_SUPER_DOT_2 > %t.super.txt // RUN: FileCheck %s -check-prefix=COMMON_BASE_B_DOT < %t.super.txt // RUN: FileCheck %s -check-prefix=CONSTRUCTOR_SUPER_DOT_2 < %t.super.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DESTRUCTOR_SUPER_NO_DOT_2 > %t.super.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DESTRUCTOR_SUPER_NO_DOT_2 > %t.super.txt // RUN: FileCheck %s -check-prefix=COMMON_BASE_B_NO_DOT < %t.super.txt // RUN: FileCheck %s -check-prefix=DESTRUCTOR_SUPER_NO_DOT_2 < %t.super.txt // RUN: FileCheck %s -check-prefix=NO_CONSTRUCTORS < %t.super.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DESTRUCTOR_SUPER_DOT_2 > %t.super.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DESTRUCTOR_SUPER_DOT_2 > %t.super.txt // RUN: FileCheck %s -check-prefix=COMMON_BASE_B_DOT < %t.super.txt // RUN: FileCheck %s -check-prefix=DESTRUCTOR_SUPER_DOT_2 < %t.super.txt // RUN: FileCheck %s -check-prefix=NO_CONSTRUCTORS < %t.super.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_SUPER_NO_DOT_2 > %t.super.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_SUPER_NO_DOT_2 > %t.super.txt // RUN: FileCheck %s -check-prefix=COMMON_BASE_B_NO_DOT < %t.super.txt // RUN: FileCheck %s -check-prefix=FUNC_SUPER_NO_DOT_2 < %t.super.txt // RUN: FileCheck %s -check-prefix=NO_CONSTRUCTORS < %t.super.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_SUPER_DOT_2 > %t.super.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_SUPER_DOT_2 > %t.super.txt // RUN: FileCheck %s -check-prefix=COMMON_BASE_B_DOT < %t.super.txt // RUN: FileCheck %s -check-prefix=FUNC_SUPER_DOT_2 < %t.super.txt // RUN: FileCheck %s -check-prefix=NO_CONSTRUCTORS < %t.super.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=SEMANTIC_CONTEXT_OVERRIDDEN_DECL_1 > %t.super.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=SEMANTIC_CONTEXT_OVERRIDDEN_DECL_1 > %t.super.txt // RUN: FileCheck %s -check-prefix=SEMANTIC_CONTEXT_OVERRIDDEN_DECL_1 < %t.super.txt // RUN: FileCheck %s -check-prefix=NO_SUPER_DECLS < %t.super.txt // RUN: FileCheck %s -check-prefix=NO_CONSTRUCTORS < %t.super.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=SEMANTIC_CONTEXT_OVERRIDDEN_DECL_2 > %t.super.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=SEMANTIC_CONTEXT_OVERRIDDEN_DECL_2 > %t.super.txt // RUN: FileCheck %s -check-prefix=SEMANTIC_CONTEXT_OVERRIDDEN_DECL_2 < %t.super.txt // RUN: FileCheck %s -check-prefix=NO_SUPER_DECLS < %t.super.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=SEMANTIC_CONTEXT_OVERRIDDEN_DECL_3 > %t.super.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=SEMANTIC_CONTEXT_OVERRIDDEN_DECL_3 > %t.super.txt // RUN: FileCheck %s -check-prefix=SEMANTIC_CONTEXT_OVERRIDDEN_DECL_3 < %t.super.txt // RUN: FileCheck %s -check-prefix=NO_SUPER_DECLS < %t.super.txt // RUN: FileCheck %s -check-prefix=NO_CONSTRUCTORS < %t.super.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=SEMANTIC_CONTEXT_OVERRIDDEN_DECL_4 > %t.super.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=SEMANTIC_CONTEXT_OVERRIDDEN_DECL_4 > %t.super.txt // RUN: FileCheck %s -check-prefix=SEMANTIC_CONTEXT_OVERRIDDEN_DECL_4 < %t.super.txt // RUN: FileCheck %s -check-prefix=NO_SUPER_DECLS < %t.super.txt // RUN: FileCheck %s -check-prefix=NO_CONSTRUCTORS < %t.super.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=SEMANTIC_CONTEXT_OVERRIDDEN_DECL_5 > %t.super.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=SEMANTIC_CONTEXT_OVERRIDDEN_DECL_5 > %t.super.txt // RUN: FileCheck %s -check-prefix=SEMANTIC_CONTEXT_OVERRIDDEN_DECL_5 < %t.super.txt // RUN: FileCheck %s -check-prefix=NO_SUPER_DECLS < %t.super.txt // RUN: FileCheck %s -check-prefix=NO_CONSTRUCTORS < %t.super.txt diff --git a/test/IDE/complete_associated_types.swift b/test/IDE/complete_associated_types.swift index 1663e2758384f..28be55cd6b8ac 100644 --- a/test/IDE/complete_associated_types.swift +++ b/test/IDE/complete_associated_types.swift @@ -1,23 +1,23 @@ // RUN: sed -n -e '1,/NO_ERRORS_UP_TO_HERE$/ p' %s > %t_no_errors.swift -// RUN: %swift -verify -parse %t_no_errors.swift +// RUN: %target-swift-frontend -parse -verify %t_no_errors.swift -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_AS_TYPE > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_AS_TYPE > %t.types.txt // RUN: FileCheck %s -check-prefix=STRUCT_TYPE_COUNT < %t.types.txt // RUN: FileCheck %s -check-prefix=STRUCT_TYPES < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_AS_EXPR > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_AS_EXPR > %t.types.txt // RUN: FileCheck %s -check-prefix=STRUCT_TYPES < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_INSTANCE > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=STRUCT_INSTANCE > %t.types.txt // RUN: FileCheck %s -check-prefix=STRUCT_INSTANCE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ASSOCIATED_TYPES_UNQUAL_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ASSOCIATED_TYPES_UNQUAL_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=ASSOCIATED_TYPES_UNQUAL < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ASSOCIATED_TYPES_UNQUAL_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ASSOCIATED_TYPES_UNQUAL_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=ASSOCIATED_TYPES_UNQUAL < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=BROKEN_CONFORMANCE_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=BROKEN_CONFORMANCE_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=BROKEN_CONFORMANCE_1 < %t.types.txt // FIXME: extensions that introduce conformances? diff --git a/test/IDE/complete_at_eof_1.swift b/test/IDE/complete_at_eof_1.swift index 658756304dcb8..83a81c8bb8469 100644 --- a/test/IDE/complete_at_eof_1.swift +++ b/test/IDE/complete_at_eof_1.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=A | FileCheck %s -check-prefix=A +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=A | FileCheck %s -check-prefix=A // Make sure we can code complete at EOF. // Don't add any tests at the end of the file! diff --git a/test/IDE/complete_at_eof_no_newline_1.swift b/test/IDE/complete_at_eof_no_newline_1.swift index b8c4080d7f459..ff9c365aa9121 100644 --- a/test/IDE/complete_at_eof_no_newline_1.swift +++ b/test/IDE/complete_at_eof_no_newline_1.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=A | FileCheck %s -check-prefix=A +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=A | FileCheck %s -check-prefix=A // Make sure we can code complete at EOF when there is no newline in the last // line. diff --git a/test/IDE/complete_at_eof_no_newline_2.swift b/test/IDE/complete_at_eof_no_newline_2.swift index 798e64debf36e..ad65bbeda88d0 100644 --- a/test/IDE/complete_at_eof_no_newline_2.swift +++ b/test/IDE/complete_at_eof_no_newline_2.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=A | FileCheck %s -check-prefix=A +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=A | FileCheck %s -check-prefix=A // Make sure we can code complete at EOF when there is no newline in the last // line. diff --git a/test/IDE/complete_at_start_1.swift b/test/IDE/complete_at_start_1.swift index b5adc8a06f6fa..e0802def49269 100644 --- a/test/IDE/complete_at_start_1.swift +++ b/test/IDE/complete_at_start_1.swift @@ -2,7 +2,7 @@ // Make sure we can code complete at the beginning of the file. // rdar://14585108 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=A | FileCheck %s -check-prefix=A +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=A | FileCheck %s -check-prefix=A // A: Begin completions // A-DAG: Keyword/None: true[#Bool#]{{$}} // A-DAG: Keyword/None: false[#Bool#]{{$}} diff --git a/test/IDE/complete_at_top_level.swift b/test/IDE/complete_at_top_level.swift index fe9364196cb3e..768b027e66211 100644 --- a/test/IDE/complete_at_top_level.swift +++ b/test/IDE/complete_at_top_level.swift @@ -1,53 +1,53 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_CHECKED_EXPR_1 | FileCheck %s -check-prefix=TYPE_CHECKED_EXPR_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_CHECKED_EXPR_2 | FileCheck %s -check-prefix=TYPE_CHECKED_EXPR_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_CHECKED_EXPR_3 | FileCheck %s -check-prefix=TYPE_CHECKED_EXPR_3 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_CHECKED_EXPR_4 | FileCheck %s -check-prefix=TYPE_CHECKED_EXPR_4 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_CHECKED_EXPR_5 | FileCheck %s -check-prefix=TYPE_CHECKED_EXPR_5 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_CHECKED_EXPR_6 | FileCheck %s -check-prefix=PLAIN_TOP_LEVEL +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_CHECKED_EXPR_1 | FileCheck %s -check-prefix=TYPE_CHECKED_EXPR_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_CHECKED_EXPR_2 | FileCheck %s -check-prefix=TYPE_CHECKED_EXPR_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_CHECKED_EXPR_3 | FileCheck %s -check-prefix=TYPE_CHECKED_EXPR_3 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_CHECKED_EXPR_4 | FileCheck %s -check-prefix=TYPE_CHECKED_EXPR_4 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_CHECKED_EXPR_5 | FileCheck %s -check-prefix=TYPE_CHECKED_EXPR_5 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_CHECKED_EXPR_6 | FileCheck %s -check-prefix=PLAIN_TOP_LEVEL -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_CHECKED_EXPR_KW_1 | FileCheck %s -check-prefix=TYPE_CHECKED_EXPR_KW_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_CHECKED_EXPR_WITH_ERROR_IN_INIT_1 | FileCheck %s -check-prefix=TYPE_CHECKED_EXPR_WITH_ERROR_IN_INIT_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_CHECKED_EXPR_KW_1 | FileCheck %s -check-prefix=TYPE_CHECKED_EXPR_KW_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_CHECKED_EXPR_WITH_ERROR_IN_INIT_1 | FileCheck %s -check-prefix=TYPE_CHECKED_EXPR_WITH_ERROR_IN_INIT_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_VAR_INIT_1 > %t.toplevel.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_VAR_INIT_1 > %t.toplevel.txt // RUN: FileCheck %s -check-prefix=TOP_LEVEL_VAR_INIT_1 < %t.toplevel.txt // RUN: FileCheck %s -check-prefix=TOP_LEVEL_VAR_INIT_1_NEGATIVE < %t.toplevel.txt // RUN: FileCheck %s -check-prefix=NEGATIVE < %t.toplevel.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_VAR_INIT_2 | FileCheck %s -check-prefix=TOP_LEVEL_VAR_INIT_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_VAR_INIT_2 | FileCheck %s -check-prefix=TOP_LEVEL_VAR_INIT_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PLAIN_TOP_LEVEL_1 > %t.toplevel.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PLAIN_TOP_LEVEL_1 > %t.toplevel.txt // RUN: FileCheck %s -check-prefix=PLAIN_TOP_LEVEL < %t.toplevel.txt // RUN: FileCheck %s -check-prefix=PLAIN_TOP_LEVEL_NO_DUPLICATES < %t.toplevel.txt // RUN: FileCheck %s -check-prefix=NEGATIVE < %t.toplevel.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PLAIN_TOP_LEVEL_2 | FileCheck %s -check-prefix=PLAIN_TOP_LEVEL -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PLAIN_TOP_LEVEL_2 | FileCheck %s -check-prefix=NEGATIVE +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PLAIN_TOP_LEVEL_2 | FileCheck %s -check-prefix=PLAIN_TOP_LEVEL +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PLAIN_TOP_LEVEL_2 | FileCheck %s -check-prefix=NEGATIVE -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_VAR_TYPE_1 > %t.toplevel.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_VAR_TYPE_1 > %t.toplevel.txt // RUN: FileCheck %s -check-prefix=TOP_LEVEL_VAR_TYPE_1 < %t.toplevel.txt // RUN: FileCheck %s -check-prefix=NEGATIVE < %t.toplevel.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_STMT_1 | FileCheck %s -check-prefix=PLAIN_TOP_LEVEL -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_STMT_2 | FileCheck %s -check-prefix=PLAIN_TOP_LEVEL -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_STMT_3 | FileCheck %s -check-prefix=PLAIN_TOP_LEVEL -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_STMT_4 | FileCheck %s -check-prefix=PLAIN_TOP_LEVEL +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_STMT_1 | FileCheck %s -check-prefix=PLAIN_TOP_LEVEL +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_STMT_2 | FileCheck %s -check-prefix=PLAIN_TOP_LEVEL +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_STMT_3 | FileCheck %s -check-prefix=PLAIN_TOP_LEVEL +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_STMT_4 | FileCheck %s -check-prefix=PLAIN_TOP_LEVEL -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_STMT_5 > %t.toplevel.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_STMT_5 > %t.toplevel.txt // RUN: FileCheck %s -check-prefix=PLAIN_TOP_LEVEL < %t.toplevel.txt // RUN: FileCheck %s -check-prefix=TOP_LEVEL_STMT_5 < %t.toplevel.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_STMT_6 > %t.toplevel.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_STMT_6 > %t.toplevel.txt // RUN: FileCheck %s -check-prefix=PLAIN_TOP_LEVEL < %t.toplevel.txt // RUN: FileCheck %s -check-prefix=TOP_LEVEL_STMT_6 < %t.toplevel.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_STMT_7 > %t.toplevel.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_STMT_7 > %t.toplevel.txt // RUN: FileCheck %s -check-prefix=PLAIN_TOP_LEVEL < %t.toplevel.txt // RUN: FileCheck %s -check-prefix=TOP_LEVEL_STMT_7 < %t.toplevel.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_STMT_8 > %t.toplevel.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_STMT_8 > %t.toplevel.txt // RUN: FileCheck %s -check-prefix=PLAIN_TOP_LEVEL < %t.toplevel.txt // RUN: FileCheck %s -check-prefix=TOP_LEVEL_STMT_8 < %t.toplevel.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_STMT_9 | FileCheck %s -check-prefix=PLAIN_TOP_LEVEL +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_STMT_9 | FileCheck %s -check-prefix=PLAIN_TOP_LEVEL // Test code completion in top-level code. // diff --git a/test/IDE/complete_attributes.swift b/test/IDE/complete_attributes.swift index ece9fdeb1f631..9f24c21196b61 100644 --- a/test/IDE/complete_attributes.swift +++ b/test/IDE/complete_attributes.swift @@ -1,5 +1,5 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_ATTR_1 -code-completion-keywords=false | FileCheck %s -check-prefix=ERROR_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_DECL_ATTR_1 -code-completion-keywords=false | FileCheck %s -check-prefix=ERROR_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_ATTR_1 -code-completion-keywords=false | FileCheck %s -check-prefix=ERROR_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_DECL_ATTR_1 -code-completion-keywords=false | FileCheck %s -check-prefix=ERROR_COMMON // ERROR_COMMON: found code completion token // ERROR_COMMON-NOT: Begin completions diff --git a/test/IDE/complete_constructor.swift b/test/IDE/complete_constructor.swift index 2e148ff9c808d..2a2b80118a8f6 100644 --- a/test/IDE/complete_constructor.swift +++ b/test/IDE/complete_constructor.swift @@ -1,19 +1,19 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICIT_CONSTRUCTORS_1 | FileCheck %s -check-prefix=IMPLICIT_CONSTRUCTORS_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICIT_CONSTRUCTORS_1P | FileCheck %s -check-prefix=IMPLICIT_CONSTRUCTORS_1P -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICIT_CONSTRUCTORS_2 | FileCheck %s -check-prefix=IMPLICIT_CONSTRUCTORS_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICIT_CONSTRUCTORS_2P | FileCheck %s -check-prefix=IMPLICIT_CONSTRUCTORS_2P +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICIT_CONSTRUCTORS_1 | FileCheck %s -check-prefix=IMPLICIT_CONSTRUCTORS_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICIT_CONSTRUCTORS_1P | FileCheck %s -check-prefix=IMPLICIT_CONSTRUCTORS_1P +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICIT_CONSTRUCTORS_2 | FileCheck %s -check-prefix=IMPLICIT_CONSTRUCTORS_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICIT_CONSTRUCTORS_2P | FileCheck %s -check-prefix=IMPLICIT_CONSTRUCTORS_2P -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPLICIT_CONSTRUCTORS_1 | FileCheck %s -check-prefix=EXPLICIT_CONSTRUCTORS_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPLICIT_CONSTRUCTORS_1P | FileCheck %s -check-prefix=EXPLICIT_CONSTRUCTORS_1P +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPLICIT_CONSTRUCTORS_1 | FileCheck %s -check-prefix=EXPLICIT_CONSTRUCTORS_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPLICIT_CONSTRUCTORS_1P | FileCheck %s -check-prefix=EXPLICIT_CONSTRUCTORS_1P -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPLICIT_CONSTRUCTORS_2 | FileCheck %s -check-prefix=EXPLICIT_CONSTRUCTORS_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPLICIT_CONSTRUCTORS_2P | FileCheck %s -check-prefix=EXPLICIT_CONSTRUCTORS_2P +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPLICIT_CONSTRUCTORS_2 | FileCheck %s -check-prefix=EXPLICIT_CONSTRUCTORS_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPLICIT_CONSTRUCTORS_2P | FileCheck %s -check-prefix=EXPLICIT_CONSTRUCTORS_2P -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPLICIT_CONSTRUCTORS_3P | FileCheck %s -check-prefix=EXPLICIT_CONSTRUCTORS_3P +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPLICIT_CONSTRUCTORS_3P | FileCheck %s -check-prefix=EXPLICIT_CONSTRUCTORS_3P -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPLICIT_CONSTRUCTORS_SELECTOR_1 | FileCheck %s -check-prefix=EXPLICIT_CONSTRUCTORS_SELECTOR_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPLICIT_CONSTRUCTORS_SELECTOR_1 | FileCheck %s -check-prefix=EXPLICIT_CONSTRUCTORS_SELECTOR_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPLICIT_CONSTRUCTORS_BASE_DERIVED_1 | FileCheck %s -check-prefix=EXPLICIT_CONSTRUCTORS_BASE_DERIVED_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPLICIT_CONSTRUCTORS_BASE_DERIVED_1 | FileCheck %s -check-prefix=EXPLICIT_CONSTRUCTORS_BASE_DERIVED_1 func freeFunc() {} diff --git a/test/IDE/complete_crashes.swift b/test/IDE/complete_crashes.swift index f0d10f80a740e..5122362aacdfd 100644 --- a/test/IDE/complete_crashes.swift +++ b/test/IDE/complete_crashes.swift @@ -1,6 +1,6 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=BAD_MEMBERS_1 | FileCheck %s -check-prefix=BAD_MEMBERS_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=BAD_MEMBERS_2 | FileCheck %s -check-prefix=BAD_MEMBERS_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLOSURE_CALLED_IN_PLACE_1 | FileCheck %s -check-prefix=WITH_GLOBAL +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=BAD_MEMBERS_1 | FileCheck %s -check-prefix=BAD_MEMBERS_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=BAD_MEMBERS_2 | FileCheck %s -check-prefix=BAD_MEMBERS_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLOSURE_CALLED_IN_PLACE_1 | FileCheck %s -check-prefix=WITH_GLOBAL class BadMembers1 { var prop: Int { @@ -36,7 +36,7 @@ func badMembers2(a: BadMembers2) { func globalFunc() {} -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=LET_COMPUTED | FileCheck %s -check-prefix=WITH_GLOBAL +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LET_COMPUTED | FileCheck %s -check-prefix=WITH_GLOBAL class C { let x : Int { #^LET_COMPUTED^# } } diff --git a/test/IDE/complete_default_arguments.swift b/test/IDE/complete_default_arguments.swift index 681620fb2cd16..aef547435337e 100644 --- a/test/IDE/complete_default_arguments.swift +++ b/test/IDE/complete_default_arguments.swift @@ -1,11 +1,11 @@ // RUN: sed -n -e '1,/NO_ERRORS_UP_TO_HERE$/ p' %s > %t_no_errors.swift -// RUN: %swift -verify -parse %t_no_errors.swift +// RUN: %target-swift-frontend -verify -parse %t_no_errors.swift -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DEFAULT_ARGS_1 | FileCheck %s -check-prefix=DEFAULT_ARGS_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DEFAULT_ARG_INIT_1 | FileCheck %s -check-prefix=DEFAULT_ARG_INIT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DEFAULT_ARG_INIT_2 | FileCheck %s -check-prefix=DEFAULT_ARG_INIT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DEFAULT_ARG_INIT_3 | FileCheck %s -check-prefix=DEFAULT_ARG_INIT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DEFAULT_ARG_INIT_4 | FileCheck %s -check-prefix=DEFAULT_ARG_INIT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DEFAULT_ARGS_1 | FileCheck %s -check-prefix=DEFAULT_ARGS_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DEFAULT_ARG_INIT_1 | FileCheck %s -check-prefix=DEFAULT_ARG_INIT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DEFAULT_ARG_INIT_2 | FileCheck %s -check-prefix=DEFAULT_ARG_INIT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DEFAULT_ARG_INIT_3 | FileCheck %s -check-prefix=DEFAULT_ARG_INIT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DEFAULT_ARG_INIT_4 | FileCheck %s -check-prefix=DEFAULT_ARG_INIT func freeFuncWithDefaultArgs1( a: Int, b: Int = 42, file: String = __FILE__, line: Int = __LINE__, diff --git a/test/IDE/complete_dynamic_lookup.swift b/test/IDE/complete_dynamic_lookup.swift index 40c348fef3953..7442af7ab1dfb 100644 --- a/test/IDE/complete_dynamic_lookup.swift +++ b/test/IDE/complete_dynamic_lookup.swift @@ -1,63 +1,63 @@ // RUN: rm -rf %t // RUN: mkdir -p %t -// RUN: %swift -emit-module -o %t %S/Inputs/AnyObject/foo_swift_module.swift -// RUN: %swift -emit-module -o %t %S/Inputs/AnyObject/bar_swift_module.swift +// RUN: %target-swift-frontend -emit-module -disable-objc-attr-requires-foundation-module -o %t %S/Inputs/AnyObject/foo_swift_module.swift +// RUN: %target-swift-frontend -emit-module -disable-objc-attr-requires-foundation-module -o %t %S/Inputs/AnyObject/bar_swift_module.swift // RUN: cp %S/Inputs/AnyObject/baz_clang_module.h %t // RUN: cp %S/Inputs/AnyObject/module.map %t -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_FUNC_PARAM_NO_DOT_1 > %t.dl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_FUNC_PARAM_NO_DOT_1 > %t.dl.txt // RUN: FileCheck %s -check-prefix=DL_INSTANCE_NO_DOT < %t.dl.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.dl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_FUNC_PARAM_DOT_1 > %t.dl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_FUNC_PARAM_DOT_1 > %t.dl.txt // RUN: FileCheck %s -check-prefix=DL_INSTANCE_DOT < %t.dl.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.dl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_VAR_NO_DOT_1 > %t.dl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_VAR_NO_DOT_1 > %t.dl.txt // RUN: FileCheck %s -check-prefix=DL_INSTANCE_NO_DOT < %t.dl.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.dl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_VAR_DOT_1 > %t.dl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_VAR_DOT_1 > %t.dl.txt // RUN: FileCheck %s -check-prefix=DL_INSTANCE_DOT < %t.dl.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.dl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_RETURN_VAL_NO_DOT_1 > %t.dl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_RETURN_VAL_NO_DOT_1 > %t.dl.txt // RUN: FileCheck %s -check-prefix=DL_INSTANCE_NO_DOT < %t.dl.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.dl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_RETURN_VAL_DOT_1 > %t.dl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_RETURN_VAL_DOT_1 > %t.dl.txt // RUN: FileCheck %s -check-prefix=DL_INSTANCE_DOT < %t.dl.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.dl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_CALL_RETURN_VAL_NO_DOT_1 > %t.dl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_CALL_RETURN_VAL_NO_DOT_1 > %t.dl.txt // RUN: FileCheck %s -check-prefix=TLOC_MEMBERS_NO_DOT < %t.dl.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.dl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_CALL_RETURN_VAL_DOT_1 > %t.dl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_CALL_RETURN_VAL_DOT_1 > %t.dl.txt // RUN: FileCheck %s -check-prefix=TLOC_MEMBERS_DOT < %t.dl.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.dl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_FUNC_NAME_1 > %t.dl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_FUNC_NAME_1 > %t.dl.txt // RUN: FileCheck %s -check-prefix=DL_FUNC_NAME_1 < %t.dl.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.dl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_FUNC_NAME_PAREN_1 > %t.dl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_FUNC_NAME_PAREN_1 > %t.dl.txt // RUN: FileCheck %s -check-prefix=DL_FUNC_NAME_PAREN_1 < %t.dl.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.dl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_FUNC_NAME_DOT_1 > %t.dl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_FUNC_NAME_DOT_1 > %t.dl.txt // RUN: FileCheck %s -check-prefix=DL_FUNC_NAME_DOT_1 < %t.dl.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.dl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_FUNC_NAME_BANG_1 > %t.dl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_FUNC_NAME_BANG_1 > %t.dl.txt // RUN: FileCheck %s -check-prefix=DL_FUNC_NAME_BANG_1 < %t.dl.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.dl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_CLASS_NO_DOT_1 > %t.dl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_CLASS_NO_DOT_1 > %t.dl.txt // RUN: FileCheck %s -check-prefix=DL_CLASS_NO_DOT < %t.dl.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.dl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_CLASS_DOT_1 > %t.dl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=DL_CLASS_DOT_1 > %t.dl.txt // RUN: FileCheck %s -check-prefix=DL_CLASS_DOT < %t.dl.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.dl.txt diff --git a/test/IDE/complete_enum_elements.swift b/test/IDE/complete_enum_elements.swift index ad54902b6d9f8..5b5e74a94b1e9 100644 --- a/test/IDE/complete_enum_elements.swift +++ b/test/IDE/complete_enum_elements.swift @@ -1,68 +1,68 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_1 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_1 > %t.enum.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_RESULTS < %t.enum.txt // RUN: FileCheck %s -check-prefix=FOO_ENUM_TYPE_CONTEXT < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_2 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_2 > %t.enum.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_RESULTS < %t.enum.txt // RUN: FileCheck %s -check-prefix=FOO_ENUM_TYPE_CONTEXT < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_3 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_3 > %t.enum.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_RESULTS < %t.enum.txt // RUN: FileCheck %s -check-prefix=BAR_ENUM_TYPE_CONTEXT < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_4 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_4 > %t.enum.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_RESULTS < %t.enum.txt // RUN: FileCheck %s -check-prefix=BAZ_ENUM_TYPE_CONTEXT < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_5 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_5 > %t.enum.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_RESULTS < %t.enum.txt // RUN: FileCheck %s -check-prefix=QUX_ENUM_TYPE_CONTEXT < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_WITH_DOT_1 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_WITH_DOT_1 > %t.enum.txt // RUN: FileCheck %s -check-prefix=FOO_ENUM_DOT_ELEMENTS < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_WITH_QUAL_1 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_WITH_QUAL_1 > %t.enum.txt // RUN: FileCheck %s -check-prefix=FOO_ENUM_DOT < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_EXPR_ERROR_1 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_EXPR_ERROR_1 > %t.enum.txt // RUN: FileCheck %s -check-prefix=FOO_ENUM_DOT < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_IN_PATTERN_1 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_IN_PATTERN_1 > %t.enum.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_RESULTS < %t.enum.txt // RUN: FileCheck %s -check-prefix=ENUM_SW_IN_PATTERN_1 < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_IN_PATTERN_2 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_SW_IN_PATTERN_2 > %t.enum.txt // RUN: FileCheck %s -check-prefix=ERROR_COMMON < %t.enum.txt // RUN: FileCheck %s -check-prefix=ENUM_SW_IN_PATTERN_2 < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_NO_DOT_1 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_NO_DOT_1 > %t.enum.txt // RUN: FileCheck %s -check-prefix=FOO_ENUM_NO_DOT < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_NO_DOT_2 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_NO_DOT_2 > %t.enum.txt // RUN: FileCheck %s -check-prefix=BAR_ENUM_NO_DOT < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_NO_DOT_3 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_NO_DOT_3 > %t.enum.txt // RUN: FileCheck %s -check-prefix=BAZ_INT_ENUM_NO_DOT < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_NO_DOT_4 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_NO_DOT_4 > %t.enum.txt // RUN: FileCheck %s -check-prefix=BAZ_T_ENUM_NO_DOT < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_NO_DOT_5 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_NO_DOT_5 > %t.enum.txt // RUN: FileCheck %s -check-prefix=QUX_ENUM_NO_DOT < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_DOT_1 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_DOT_1 > %t.enum.txt // RUN: FileCheck %s -check-prefix=FOO_ENUM_DOT < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_DOT_2 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_DOT_2 > %t.enum.txt // RUN: FileCheck %s -check-prefix=BAR_ENUM_DOT < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_DOT_3 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_DOT_3 > %t.enum.txt // RUN: FileCheck %s -check-prefix=BAZ_INT_ENUM_DOT < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_DOT_4 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_DOT_4 > %t.enum.txt // RUN: FileCheck %s -check-prefix=BAZ_T_ENUM_DOT < %t.enum.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_DOT_5 > %t.enum.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_QUAL_DOT_5 > %t.enum.txt // RUN: FileCheck %s -check-prefix=QUX_ENUM_DOT < %t.enum.txt // ERROR_COMMON: found code completion token diff --git a/test/IDE/complete_expr_postfix_begin.swift b/test/IDE/complete_expr_postfix_begin.swift index 6034a75bb5c92..5d7c64f97df10 100644 --- a/test/IDE/complete_expr_postfix_begin.swift +++ b/test/IDE/complete_expr_postfix_begin.swift @@ -1,54 +1,54 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_1 | FileCheck %s -check-prefix=COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_2 | FileCheck %s -check-prefix=COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_3 | FileCheck %s -check-prefix=COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_4 | FileCheck %s -check-prefix=COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_1 | FileCheck %s -check-prefix=COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_2 | FileCheck %s -check-prefix=COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_3 | FileCheck %s -check-prefix=COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_4 | FileCheck %s -check-prefix=COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_IGNORED_1 | FileCheck %s -check-prefix=COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_IGNORED_2 | FileCheck %s -check-prefix=COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_IGNORED_3 | FileCheck %s -check-prefix=COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_IGNORED_1 | FileCheck %s -check-prefix=COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_IGNORED_2 | FileCheck %s -check-prefix=COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_IGNORED_3 | FileCheck %s -check-prefix=COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_FUNC_PARAM_1 > %t.param.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_FUNC_PARAM_1 > %t.param.txt // RUN: FileCheck %s -check-prefix=COMMON < %t.param.txt // RUN: FileCheck %s -check-prefix=FIND_FUNC_PARAM_1 < %t.param.txt // RUN: FileCheck %s -check-prefix=NO_SELF < %t.param.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_FUNC_PARAM_2 > %t.param.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_FUNC_PARAM_2 > %t.param.txt // RUN: FileCheck %s -check-prefix=COMMON < %t.param.txt // RUN: FileCheck %s -check-prefix=FIND_FUNC_PARAM_2 < %t.param.txt // RUN: FileCheck %s -check-prefix=NO_SELF < %t.param.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_FUNC_PARAM_3 | FileCheck %s -check-prefix=FIND_FUNC_PARAM_3 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_FUNC_PARAM_4 | FileCheck %s -check-prefix=FIND_FUNC_PARAM_4 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_FUNC_PARAM_5 | FileCheck %s -check-prefix=FIND_FUNC_PARAM_5 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_FUNC_PARAM_6 | FileCheck %s -check-prefix=FIND_FUNC_PARAM_6 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_FUNC_PARAM_7 | FileCheck %s -check-prefix=FIND_FUNC_PARAM_7 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_FUNC_PARAM_3 | FileCheck %s -check-prefix=FIND_FUNC_PARAM_3 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_FUNC_PARAM_4 | FileCheck %s -check-prefix=FIND_FUNC_PARAM_4 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_FUNC_PARAM_5 | FileCheck %s -check-prefix=FIND_FUNC_PARAM_5 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_FUNC_PARAM_6 | FileCheck %s -check-prefix=FIND_FUNC_PARAM_6 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_FUNC_PARAM_7 | FileCheck %s -check-prefix=FIND_FUNC_PARAM_7 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_FUNC_PARAM_SELECTOR_1 > %t.param.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_FUNC_PARAM_SELECTOR_1 > %t.param.txt // RUN: FileCheck %s -check-prefix=COMMON < %t.param.txt // RUN: FileCheck %s -check-prefix=FIND_FUNC_PARAM_SELECTOR_1 < %t.param.txt // RUN: FileCheck %s -check-prefix=NO_SELF < %t.param.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_CONSTRUCTOR_PARAM_1 | FileCheck %s -check-prefix=FIND_CONSTRUCTOR_PARAM_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_CONSTRUCTOR_PARAM_2 | FileCheck %s -check-prefix=FIND_CONSTRUCTOR_PARAM_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_CONSTRUCTOR_PARAM_3 | FileCheck %s -check-prefix=FIND_CONSTRUCTOR_PARAM_3 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_CONSTRUCTOR_PARAM_4 | FileCheck %s -check-prefix=FIND_CONSTRUCTOR_PARAM_4 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_CONSTRUCTOR_PARAM_5 | FileCheck %s -check-prefix=FIND_CONSTRUCTOR_PARAM_5 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_CONSTRUCTOR_PARAM_1 | FileCheck %s -check-prefix=FIND_CONSTRUCTOR_PARAM_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_CONSTRUCTOR_PARAM_2 | FileCheck %s -check-prefix=FIND_CONSTRUCTOR_PARAM_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_CONSTRUCTOR_PARAM_3 | FileCheck %s -check-prefix=FIND_CONSTRUCTOR_PARAM_3 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_CONSTRUCTOR_PARAM_4 | FileCheck %s -check-prefix=FIND_CONSTRUCTOR_PARAM_4 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_CONSTRUCTOR_PARAM_5 | FileCheck %s -check-prefix=FIND_CONSTRUCTOR_PARAM_5 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_CONSTRUCTOR_PARAM_SELECTOR_1 | FileCheck %s -check-prefix=FIND_CONSTRUCTOR_PARAM_SELECTOR_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_CONSTRUCTOR_PARAM_SELECTOR_1 | FileCheck %s -check-prefix=FIND_CONSTRUCTOR_PARAM_SELECTOR_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_DESTRUCTOR_PARAM_1 > %t.param.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_DESTRUCTOR_PARAM_1 > %t.param.txt // RUN: FileCheck %s -check-prefix=FIND_DESTRUCTOR_PARAM_1 < %t.param.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_DESTRUCTOR_PARAM_2 > %t.param.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FIND_DESTRUCTOR_PARAM_2 > %t.param.txt // RUN: FileCheck %s -check-prefix=FIND_DESTRUCTOR_PARAM_2 < %t.param.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_INVALID_1 | FileCheck %s -check-prefix=COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_INVALID_2 | FileCheck %s -check-prefix=COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_INVALID_3 | FileCheck %s -check-prefix=COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_INVALID_5 | FileCheck %s -check-prefix=COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_INVALID_6 | FileCheck %s -check-prefix=COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_INVALID_7 | FileCheck %s -check-prefix=COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_INVALID_8 | FileCheck %s -check-prefix=COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_INVALID_1 | FileCheck %s -check-prefix=COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_INVALID_2 | FileCheck %s -check-prefix=COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_INVALID_3 | FileCheck %s -check-prefix=COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_INVALID_5 | FileCheck %s -check-prefix=COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_INVALID_6 | FileCheck %s -check-prefix=COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_INVALID_7 | FileCheck %s -check-prefix=COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_INVALID_8 | FileCheck %s -check-prefix=COMMON // // Test code completion at the beginning of expr-postfix. diff --git a/test/IDE/complete_expr_tuple.swift b/test/IDE/complete_expr_tuple.swift index 69dde8a4175d8..97a5aa8f514ff 100644 --- a/test/IDE/complete_expr_tuple.swift +++ b/test/IDE/complete_expr_tuple.swift @@ -1,22 +1,22 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TUPLE_NO_DOT_1 > %t.tuple.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TUPLE_NO_DOT_1 > %t.tuple.txt // RUN: FileCheck %s -check-prefix=TUPLE_NO_DOT_1 < %t.tuple.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TUPLE_NO_DOT_2 > %t.tuple.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TUPLE_NO_DOT_2 > %t.tuple.txt // RUN: FileCheck %s -check-prefix=TUPLE_NO_DOT_2 < %t.tuple.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TUPLE_NO_DOT_3 > %t.tuple.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TUPLE_NO_DOT_3 > %t.tuple.txt // RUN: FileCheck %s -check-prefix=TUPLE_NO_DOT_3 < %t.tuple.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TUPLE_DOT_1 > %t.tuple.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TUPLE_DOT_1 > %t.tuple.txt // RUN: FileCheck %s -check-prefix=TUPLE_DOT_1 < %t.tuple.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TUPLE_DOT_2 > %t.tuple.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TUPLE_DOT_2 > %t.tuple.txt // RUN: FileCheck %s -check-prefix=TUPLE_DOT_2 < %t.tuple.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TUPLE_DOT_3 > %t.tuple.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TUPLE_DOT_3 > %t.tuple.txt // RUN: FileCheck %s -check-prefix=TUPLE_DOT_3 < %t.tuple.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TUPLE_NESTED_1 > %t.tuple.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TUPLE_NESTED_1 > %t.tuple.txt // RUN: FileCheck %s -check-prefix=TUPLE_NESTED_1 < %t.tuple.txt //===--- diff --git a/test/IDE/complete_from_clang_framework.swift b/test/IDE/complete_from_clang_framework.swift index 691086832482b..1f8bc74e230bc 100644 --- a/test/IDE/complete_from_clang_framework.swift +++ b/test/IDE/complete_from_clang_framework.swift @@ -1,6 +1,6 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=SWIFT_COMPLETIONS | FileCheck %s -check-prefix=SWIFT_COMPLETIONS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=SWIFT_COMPLETIONS | FileCheck %s -check-prefix=SWIFT_COMPLETIONS -// RUN: %swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=FW_UNQUAL_1 > %t.compl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=FW_UNQUAL_1 > %t.compl.txt // RUN: FileCheck %s -check-prefix=CLANG_FOO < %t.compl.txt // RUN: FileCheck %s -check-prefix=CLANG_FOO_SUB < %t.compl.txt // RUN: FileCheck %s -check-prefix=CLANG_FOO_HELPER < %t.compl.txt @@ -8,25 +8,25 @@ // RUN: FileCheck %s -check-prefix=CLANG_BAR < %t.compl.txt // RUN: FileCheck %s -check-prefix=CLANG_BOTH_FOO_BAR < %t.compl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=CLANG_QUAL_FOO_1 > %t.compl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=CLANG_QUAL_FOO_1 > %t.compl.txt // RUN: FileCheck %s -check-prefix=CLANG_FOO < %t.compl.txt // RUN: FileCheck %s -check-prefix=CLANG_FOO_SUB < %t.compl.txt // RUN: FileCheck %s -check-prefix=CLANG_QUAL_FOO_NEGATIVE < %t.compl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=CLANG_QUAL_BAR_1 > %t.compl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=CLANG_QUAL_BAR_1 > %t.compl.txt // RUN: FileCheck %s -check-prefix=CLANG_QUAL_BAR_1 < %t.compl.txt // RUN: FileCheck %s -check-prefix=CLANG_BAR < %t.compl.txt // RUN: FileCheck %s -check-prefix=CLANG_QUAL_BAR_NEGATIVE < %t.compl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=CLANG_QUAL_FOO_2 | FileCheck %s -check-prefix=CLANG_QUAL_FOO_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=CLANG_QUAL_FOO_2 | FileCheck %s -check-prefix=CLANG_QUAL_FOO_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=FUNCTION_CALL_1 | FileCheck %s -check-prefix=FUNCTION_CALL_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=FUNCTION_CALL_2 | FileCheck %s -check-prefix=FUNCTION_CALL_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=FUNCTION_CALL_1 | FileCheck %s -check-prefix=FUNCTION_CALL_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=FUNCTION_CALL_2 | FileCheck %s -check-prefix=FUNCTION_CALL_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=CLANG_STRUCT_MEMBERS_1 | FileCheck %s -check-prefix=CLANG_STRUCT_MEMBERS_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=CLANG_CLASS_MEMBERS_1 | FileCheck %s -check-prefix=CLANG_CLASS_MEMBERS_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=CLANG_CLASS_MEMBERS_2 | FileCheck %s -check-prefix=CLANG_CLASS_MEMBERS_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=CLANG_INSTANCE_MEMBERS_1 | FileCheck %s -check-prefix=CLANG_INSTANCE_MEMBERS_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=CLANG_STRUCT_MEMBERS_1 | FileCheck %s -check-prefix=CLANG_STRUCT_MEMBERS_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=CLANG_CLASS_MEMBERS_1 | FileCheck %s -check-prefix=CLANG_CLASS_MEMBERS_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=CLANG_CLASS_MEMBERS_2 | FileCheck %s -check-prefix=CLANG_CLASS_MEMBERS_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=CLANG_INSTANCE_MEMBERS_1 | FileCheck %s -check-prefix=CLANG_INSTANCE_MEMBERS_1 import Foo // Don't import FooHelper directly in this test! diff --git a/test/IDE/complete_from_clang_framework_typechecker.swift b/test/IDE/complete_from_clang_framework_typechecker.swift index b12d3d8ce97f0..13ace05a320a6 100644 --- a/test/IDE/complete_from_clang_framework_typechecker.swift +++ b/test/IDE/complete_from_clang_framework_typechecker.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s -F %S/Inputs/mock-sdk +// RUN: %target-parse-verify-swift -F %S/Inputs/mock-sdk import Foo // Don't import 'FooHelper'. diff --git a/test/IDE/complete_from_clang_importer_framework.swift b/test/IDE/complete_from_clang_importer_framework.swift index 39a650c86995c..2f727319ce31f 100644 --- a/test/IDE/complete_from_clang_importer_framework.swift +++ b/test/IDE/complete_from_clang_importer_framework.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s %clang-importer-sdk -target x86_64-apple-macosx10.9 -code-completion-token=CLANG_UNQUAL_1 > %t.compl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s %clang-importer-sdk -code-completion-token=CLANG_UNQUAL_1 > %t.compl.txt // RUN: FileCheck %s -check-prefix=CLANG_CTYPES < %t.compl.txt // RUN: FileCheck %s -check-prefix=CLANG_MACROS < %t.compl.txt // RUN: FileCheck %s -check-prefix=CLANG_DARWIN < %t.compl.txt diff --git a/test/IDE/complete_from_foundation_overlay.swift b/test/IDE/complete_from_foundation_overlay.swift index 586b2bc206e5f..d50decfe0c3a6 100644 --- a/test/IDE/complete_from_foundation_overlay.swift +++ b/test/IDE/complete_from_foundation_overlay.swift @@ -1,16 +1,13 @@ import Foundation -// RUN: %swift-ide-test -sdk %sdk -target %target-triple -code-completion -source-filename %s -code-completion-token=PLAIN_TOP_LEVEL_1 > %t.toplevel.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PLAIN_TOP_LEVEL_1 > %t.toplevel.txt // RUN: FileCheck %s -check-prefix=PLAIN_TOP_LEVEL < %t.toplevel.txt // RUN: FileCheck %s -check-prefix=NO_STDLIB_PRIVATE < %t.toplevel.txt -// RUN: %swift-ide-test -sdk %sdk -target %target-triple -code-completion -source-filename %s -code-completion-token=PRIVATE_NOMINAL_MEMBERS_1 > %t.members.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PRIVATE_NOMINAL_MEMBERS_1 > %t.members.txt // RUN: FileCheck %s -check-prefix=PRIVATE_NOMINAL_MEMBERS_1 < %t.members.txt // RUN: FileCheck %s -check-prefix=NO_STDLIB_PRIVATE < %t.members.txt -// %swift-ide-test should include -resource-dir -// REQUIRES: OS=macosx - // NO_STDLIB_PRIVATE: Begin completions // NO_STDLIB_PRIVATE-NOT: _convertStringToNSString // NO_STDLIB_PRIVATE: End completions diff --git a/test/IDE/complete_from_reexport.swift b/test/IDE/complete_from_reexport.swift index d6572d406655e..533003b596d37 100644 --- a/test/IDE/complete_from_reexport.swift +++ b/test/IDE/complete_from_reexport.swift @@ -1,10 +1,10 @@ // RUN: rm -rf %t // RUN: mkdir -p %t // -// RUN: %swift -emit-module -module-name FooSwiftModule %S/Inputs/foo_swift_module.swift -o %t -// RUN: %swift -emit-module -module-name FooSwiftModuleOverlay %S/Inputs/foo_swift_module_overlay.swift -I %t -o %t +// RUN: %target-swift-frontend -emit-module -module-name FooSwiftModule %S/Inputs/foo_swift_module.swift -o %t +// RUN: %target-swift-frontend -emit-module -module-name FooSwiftModuleOverlay %S/Inputs/foo_swift_module_overlay.swift -I %t -o %t // -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_1 -I %t > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_1 -I %t > %t.txt // RUN: FileCheck %s -check-prefix=TOP_LEVEL_1 < %t.txt // RUN: FileCheck %s -check-prefix=NO_DUPLICATES < %t.txt diff --git a/test/IDE/complete_from_stdlib.swift b/test/IDE/complete_from_stdlib.swift index eadc1074e194a..e44ba36a83e16 100644 --- a/test/IDE/complete_from_stdlib.swift +++ b/test/IDE/complete_from_stdlib.swift @@ -1,8 +1,8 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PLAIN_TOP_LEVEL_1 > %t.toplevel.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PLAIN_TOP_LEVEL_1 > %t.toplevel.txt // RUN: FileCheck %s -check-prefix=PLAIN_TOP_LEVEL < %t.toplevel.txt // RUN: FileCheck %s -check-prefix=NO_STDLIB_PRIVATE < %t.toplevel.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PRIVATE_NOMINAL_MEMBERS_1 > %t.members.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PRIVATE_NOMINAL_MEMBERS_1 > %t.members.txt // RUN: FileCheck %s -check-prefix=PRIVATE_NOMINAL_MEMBERS_1 < %t.members.txt // RUN: FileCheck %s -check-prefix=NO_STDLIB_PRIVATE < %t.members.txt diff --git a/test/IDE/complete_from_swift_module.swift b/test/IDE/complete_from_swift_module.swift index b329d3bf65357..2bc1e2a6c2f28 100644 --- a/test/IDE/complete_from_swift_module.swift +++ b/test/IDE/complete_from_swift_module.swift @@ -1,33 +1,33 @@ // RUN: rm -rf %t // RUN: mkdir -p %t // -// RUN: %swift -emit-module -o %t %S/Inputs/foo_swift_module.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/foo_swift_module.swift // // Note: this test checks both module import case and file import case. -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=MODULE_QUALIFIED_1 > %t.compl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=MODULE_QUALIFIED_1 > %t.compl.txt // RUN: FileCheck %s -check-prefix=MODULE_QUALIFIED_1 < %t.compl.txt // -// RUN: %swift-ide-test -code-completion -source-filename %s -I %S/Inputs -enable-source-import -code-completion-token=MODULE_QUALIFIED_1 > %t.compl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %S/Inputs -enable-source-import -code-completion-token=MODULE_QUALIFIED_1 > %t.compl.txt // RUN: FileCheck %s -check-prefix=MODULE_QUALIFIED_1 < %t.compl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=MODULE_QUALIFIED_2 > %t.compl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=MODULE_QUALIFIED_2 > %t.compl.txt // RUN: FileCheck %s -check-prefix=MODULE_QUALIFIED_2 < %t.compl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=MODULE_QUALIFIED_3 > %t.compl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=MODULE_QUALIFIED_3 > %t.compl.txt // RUN: FileCheck %s -check-prefix=MODULE_QUALIFIED_3 < %t.compl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=MODULE_QUALIFIED_4 > %t.compl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=MODULE_QUALIFIED_4 > %t.compl.txt // RUN: FileCheck %s -check-prefix=MODULE_QUALIFIED_4 < %t.compl.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=MODULE_QUALIFIED_5 | FileCheck %s -check-prefix=ERROR_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=MODULE_QUALIFIED_5 | FileCheck %s -check-prefix=ERROR_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=TOP_LEVEL_1 > %t.compl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %t -code-completion-token=TOP_LEVEL_1 > %t.compl.txt // RUN: FileCheck %s -check-prefix=TOP_LEVEL_1 < %t.compl.txt // rdar://15305873 Code completion: implement proper shadowing of declarations represented by cached results // FIXME: FileCheck %s -check-prefix=TOP_LEVEL_1_NEGATIVE < %t.compl.txt // -// RUN: %swift-ide-test -code-completion -source-filename %s -I %S/Inputs -enable-source-import -code-completion-token=TOP_LEVEL_1 > %t.compl.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -I %S/Inputs -enable-source-import -code-completion-token=TOP_LEVEL_1 > %t.compl.txt // RUN: FileCheck %s -check-prefix=TOP_LEVEL_1 < %t.compl.txt // rdar://15305873 Code completion: implement proper shadowing of declarations represented by cached results // FIXME: FileCheck %s -check-prefix=TOP_LEVEL_1_NEGATIVE < %t.compl.txt diff --git a/test/IDE/complete_func_body_typechecking.swift b/test/IDE/complete_func_body_typechecking.swift index 8ea54d458d3b3..3ae29d705e77b 100644 --- a/test/IDE/complete_func_body_typechecking.swift +++ b/test/IDE/complete_func_body_typechecking.swift @@ -1,29 +1,29 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_1 | FileCheck %s -check-prefix=FOO_STRUCT_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_2 | FileCheck %s -check-prefix=FOO_STRUCT_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_3 | FileCheck %s -check-prefix=ERROR_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_4 | FileCheck %s -check-prefix=FOO_STRUCT_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_5 | FileCheck %s -check-prefix=FOO_STRUCT_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_6 | FileCheck %s -check-prefix=FOO_STRUCT_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_7 | FileCheck %s -check-prefix=ERROR_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_1 | FileCheck %s -check-prefix=FOO_STRUCT_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_2 | FileCheck %s -check-prefix=FOO_STRUCT_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_3 | FileCheck %s -check-prefix=ERROR_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_4 | FileCheck %s -check-prefix=FOO_STRUCT_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_5 | FileCheck %s -check-prefix=FOO_STRUCT_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_6 | FileCheck %s -check-prefix=FOO_STRUCT_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_7 | FileCheck %s -check-prefix=ERROR_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_IN_CONSTRUCTOR_1 | FileCheck %s -check-prefix=FOO_STRUCT_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_IN_CONSTRUCTOR_2 | FileCheck %s -check-prefix=FOO_STRUCT_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_IN_CONSTRUCTOR_1 | FileCheck %s -check-prefix=FOO_STRUCT_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_IN_CONSTRUCTOR_2 | FileCheck %s -check-prefix=FOO_STRUCT_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_IN_DESTRUCTOR_1 | FileCheck %s -check-prefix=FOO_STRUCT_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_IN_DESTRUCTOR_1 | FileCheck %s -check-prefix=FOO_STRUCT_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_IF_1 | FileCheck %s -check-prefix=LOCALS_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_IF_2 | FileCheck %s -check-prefix=LOCALS_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_IF_3 | FileCheck %s -check-prefix=LOCALS_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_IF_4 | FileCheck %s -check-prefix=LOCALS_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_IF_1 | FileCheck %s -check-prefix=LOCALS_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_IF_2 | FileCheck %s -check-prefix=LOCALS_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_IF_3 | FileCheck %s -check-prefix=LOCALS_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_IF_4 | FileCheck %s -check-prefix=LOCALS_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_IF_IN_CONSTRUCTOR_1 | FileCheck %s -check-prefix=LOCALS_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_IF_IN_DESTRUCTOR_1 | FileCheck %s -check-prefix=LOCALS_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_IF_IN_CONSTRUCTOR_1 | FileCheck %s -check-prefix=LOCALS_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_VAR_IF_IN_DESTRUCTOR_1 | FileCheck %s -check-prefix=LOCALS_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_1 | FileCheck %s -check-prefix=LOCALS_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_2 | FileCheck %s -check-prefix=LOCALS_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_1 | FileCheck %s -check-prefix=LOCALS_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_2 | FileCheck %s -check-prefix=LOCALS_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_IN_CONSTRUCTOR_1 | FileCheck %s -check-prefix=LOCALS_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_IN_DESTRUCTOR_1 | FileCheck %s -check-prefix=LOCALS_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_IN_CONSTRUCTOR_1 | FileCheck %s -check-prefix=LOCALS_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=EXPR_POSTFIX_BEGIN_IN_DESTRUCTOR_1 | FileCheck %s -check-prefix=LOCALS_COMMON struct FooStruct { var instanceVar = 0 diff --git a/test/IDE/complete_func_no_closing_brace.swift b/test/IDE/complete_func_no_closing_brace.swift index e1b015cef3e33..e399662281ff2 100644 --- a/test/IDE/complete_func_no_closing_brace.swift +++ b/test/IDE/complete_func_no_closing_brace.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=A | FileCheck %s -check-prefix=A +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=A | FileCheck %s -check-prefix=A // Make sure we don't crash on a function without a closing brace before EOF. // Don't add any tests at the end of the file! diff --git a/test/IDE/complete_func_no_closing_brace_at_eof_1.swift b/test/IDE/complete_func_no_closing_brace_at_eof_1.swift index 290a15fb47813..a63e3e684fc9f 100644 --- a/test/IDE/complete_func_no_closing_brace_at_eof_1.swift +++ b/test/IDE/complete_func_no_closing_brace_at_eof_1.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=A | FileCheck %s -check-prefix=A +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=A | FileCheck %s -check-prefix=A // rdar://14592634 // Make sure we can code complete at EOF inside a function that does not have a diff --git a/test/IDE/complete_func_no_closing_brace_at_eof_2.swift b/test/IDE/complete_func_no_closing_brace_at_eof_2.swift index 290029c0ccb90..0739df3b142f9 100644 --- a/test/IDE/complete_func_no_closing_brace_at_eof_2.swift +++ b/test/IDE/complete_func_no_closing_brace_at_eof_2.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=A | FileCheck %s -check-prefix=A +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=A | FileCheck %s -check-prefix=A // rdar://14585132 // Make sure we can resolve function parameters if function body is missing the diff --git a/test/IDE/complete_func_no_closing_brace_at_eof_3.swift b/test/IDE/complete_func_no_closing_brace_at_eof_3.swift index e6c562bdfa290..4be9e69ef1e43 100644 --- a/test/IDE/complete_func_no_closing_brace_at_eof_3.swift +++ b/test/IDE/complete_func_no_closing_brace_at_eof_3.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=A | FileCheck %s -check-prefix=A +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=A | FileCheck %s -check-prefix=A // Make sure we partially type check the function body even if function body is // missing the right brace. diff --git a/test/IDE/complete_in_accessors.swift b/test/IDE/complete_in_accessors.swift index a693eb927f252..1c27dd518082a 100644 --- a/test/IDE/complete_in_accessors.swift +++ b/test/IDE/complete_in_accessors.swift @@ -1,97 +1,97 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_IMPLICIT_GET_1 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_IMPLICIT_GET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_IMPLICIT_GET_1 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_IMPLICIT_GET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_GET_1 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_GET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_GET_1 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_GET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_SET_1 > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_SET_1 > %t.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_DECLS < %t.txt // RUN: FileCheck %s -check-prefix=WITH_NEWVALUE < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_SET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_SET_3 > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_SET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_SET_3 > %t.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_DECLS < %t.txt // RUN: FileCheck %s -check-prefix=WITH_NEWVALUE < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_SET_4 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_SET_4 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_WILLSET_1 > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_WILLSET_1 > %t.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_DECLS < %t.txt // RUN: FileCheck %s -check-prefix=WITH_NEWVALUE < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_WILLSET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_WILLSET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_DIDSET_1 > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_DIDSET_1 > %t.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_DECLS < %t.txt // RUN: FileCheck %s -check-prefix=WITH_OLDVALUE < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_DIDSET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_DIDSET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_INIT_1 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_INIT_2 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_INIT_1 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GLOBAL_ACCESSOR_INIT_2 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_IMPLICIT_GET_1 | FileCheck %s -check-prefix=WITH_MEMBER_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_IMPLICIT_GET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_IMPLICIT_GET_1 | FileCheck %s -check-prefix=WITH_MEMBER_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_IMPLICIT_GET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_GET_1 | FileCheck %s -check-prefix=WITH_MEMBER_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_GET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_GET_1 | FileCheck %s -check-prefix=WITH_MEMBER_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_GET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_SET_1 > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_SET_1 > %t.txt // RUN: FileCheck %s -check-prefix=WITH_MEMBER_DECLS < %t.txt // RUN: FileCheck %s -check-prefix=WITH_NEWVALUE < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_SET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_SET_3 > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_SET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_SET_3 > %t.txt // RUN: FileCheck %s -check-prefix=WITH_MEMBER_DECLS < %t.txt // RUN: FileCheck %s -check-prefix=WITH_NEWVALUE < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_SET_4 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_SET_4 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_WILLSET_1 > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_WILLSET_1 > %t.txt // RUN: FileCheck %s -check-prefix=WITH_MEMBER_DECLS < %t.txt // RUN: FileCheck %s -check-prefix=WITH_NEWVALUE < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_WILLSET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_WILLSET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_DIDSET_1 > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_DIDSET_1 > %t.txt // RUN: FileCheck %s -check-prefix=WITH_MEMBER_DECLS < %t.txt // RUN: FileCheck %s -check-prefix=WITH_OLDVALUE < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_DIDSET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_DIDSET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_INIT_1 > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_INIT_1 > %t.txt // RUN: FileCheck %s -check-prefix=WITH_MEMBER_DECLS_INIT < %t.txt // RUN: FileCheck %s -check-prefix=WITH_MEMBER_DECLS_INIT_WRONG < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_INIT_2 > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER_ACCESSOR_INIT_2 > %t.txt // RUN: FileCheck %s -check-prefix=WITH_MEMBER_DECLS_INIT < %t.txt // RUN: FileCheck %s -check-prefix=WITH_MEMBER_DECLS_INIT_WRONG < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_IMPLICIT_GET_1 | FileCheck %s -check-prefix=WITH_LOCAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_IMPLICIT_GET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_IMPLICIT_GET_1 | FileCheck %s -check-prefix=WITH_LOCAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_IMPLICIT_GET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_GET_1 | FileCheck %s -check-prefix=WITH_LOCAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_GET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_GET_1 | FileCheck %s -check-prefix=WITH_LOCAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_GET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_SET_1 > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_SET_1 > %t.txt // RUN: FileCheck %s -check-prefix=WITH_LOCAL_DECLS < %t.txt // RUN: FileCheck %s -check-prefix=WITH_NEWVALUE < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_SET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_SET_3 > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_SET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_SET_3 > %t.txt // RUN: FileCheck %s -check-prefix=WITH_LOCAL_DECLS < %t.txt // RUN: FileCheck %s -check-prefix=WITH_NEWVALUE < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_SET_4 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_SET_4 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_WILLSET_1 > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_WILLSET_1 > %t.txt // RUN: FileCheck %s -check-prefix=WITH_LOCAL_DECLS < %t.txt // RUN: FileCheck %s -check-prefix=WITH_NEWVALUE < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_WILLSET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_WILLSET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_DIDSET_1 > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_DIDSET_1 > %t.txt // RUN: FileCheck %s -check-prefix=WITH_LOCAL_DECLS < %t.txt // RUN: FileCheck %s -check-prefix=WITH_OLDVALUE < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_DIDSET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_DIDSET_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_INIT_1 | FileCheck %s -check-prefix=WITH_LOCAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_INIT_2 | FileCheck %s -check-prefix=WITH_LOCAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_INIT_1 | FileCheck %s -check-prefix=WITH_LOCAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=LOCAL_ACCESSOR_INIT_2 | FileCheck %s -check-prefix=WITH_LOCAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ACCESSOR_IN_MEMBER_FUNC_1 > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ACCESSOR_IN_MEMBER_FUNC_1 > %t.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_DECLS < %t.txt // RUN: FileCheck %s -check-prefix=ACCESSORS_IN_MEMBER_FUNC_1 < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ACCESSOR_IN_MEMBER_FUNC_2 > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ACCESSOR_IN_MEMBER_FUNC_2 > %t.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_DECLS < %t.txt // RUN: FileCheck %s -check-prefix=ACCESSORS_IN_MEMBER_FUNC_2 < %t.txt diff --git a/test/IDE/complete_in_closures.swift b/test/IDE/complete_in_closures.swift index c60bfd2a8252d..feacd966ffa31 100644 --- a/test/IDE/complete_in_closures.swift +++ b/test/IDE/complete_in_closures.swift @@ -1,41 +1,41 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_CLOSURE_PARAM_1 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_CLOSURE_PARAM_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_PARENT_PARAM_1 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_PARENT_PARAM_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_PARENT_PARAM_3 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_PARENT_PARAM_4 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_PARENT_PARAM_5 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_PARENT_PARAM_6 | FileCheck %s -check-prefix=FOO_OBJECT_DOT - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RETURN_1 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_1 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_2 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_3 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_4 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_5 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_6 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_7 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_8 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_9 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_10 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS_AND_LOCAL1 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_1 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_3 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_4 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_5 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_6 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_7 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_8 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_9 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_10 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_11 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_12 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_13 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_14 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_15 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_CLOSURE_PARAM_1 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_CLOSURE_PARAM_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_PARENT_PARAM_1 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_PARENT_PARAM_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_PARENT_PARAM_3 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_PARENT_PARAM_4 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_PARENT_PARAM_5 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_PARENT_PARAM_6 | FileCheck %s -check-prefix=FOO_OBJECT_DOT + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RETURN_1 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_1 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_2 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_3 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_4 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_5 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_6 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_7 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_8 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_9 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=DELAYED_10 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS_AND_LOCAL1 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_1 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_3 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_4 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_5 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_6 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_7 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_8 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_9 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_10 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_11 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_12 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_13 | FileCheck %s -check-prefix=WITH_GLOBAL_DECLS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_14 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_TRAILING_CLOSURE_15 | FileCheck %s -check-prefix=FOO_OBJECT_DOT // ERROR_COMMON: found code completion token // ERROR_COMMON-NOT: Begin completions diff --git a/test/IDE/complete_in_enum_decl.swift b/test/IDE/complete_in_enum_decl.swift index a9001c98bba8d..8ec8cef9fa225 100644 --- a/test/IDE/complete_in_enum_decl.swift +++ b/test/IDE/complete_in_enum_decl.swift @@ -1,9 +1,9 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_CASE_1 | FileCheck %s -check-prefix=NO_RESULTS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_CASE_2 | FileCheck %s -check-prefix=NO_RESULTS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_CASE_3 | FileCheck %s -check-prefix=NO_RESULTS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_CASE_4 | FileCheck %s -check-prefix=NO_RESULTS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_CASE_5 | FileCheck %s -check-prefix=NO_RESULTS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_CASE_6 | FileCheck %s -check-prefix=NO_RESULTS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_CASE_1 | FileCheck %s -check-prefix=NO_RESULTS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_CASE_2 | FileCheck %s -check-prefix=NO_RESULTS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_CASE_3 | FileCheck %s -check-prefix=NO_RESULTS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_CASE_4 | FileCheck %s -check-prefix=NO_RESULTS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_CASE_5 | FileCheck %s -check-prefix=NO_RESULTS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=ENUM_CASE_6 | FileCheck %s -check-prefix=NO_RESULTS // NO_RESULTS: found code completion token // NO_RESULTS-NOT: Begin completions diff --git a/test/IDE/complete_init_inherited.swift b/test/IDE/complete_init_inherited.swift index 0de540a40d0b6..781ed236f342b 100644 --- a/test/IDE/complete_init_inherited.swift +++ b/test/IDE/complete_init_inherited.swift @@ -1,7 +1,7 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_A | FileCheck %s -check-prefix=TEST_A -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_B | FileCheck %s -check-prefix=TEST_B -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_C | FileCheck %s -check-prefix=TEST_C -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_D | FileCheck %s -check-prefix=TEST_D +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_A | FileCheck %s -check-prefix=TEST_A +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_B | FileCheck %s -check-prefix=TEST_B +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_C | FileCheck %s -check-prefix=TEST_C +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_D | FileCheck %s -check-prefix=TEST_D class A { init(int i: Int) {} diff --git a/test/IDE/complete_keywords.swift b/test/IDE/complete_keywords.swift index ea1f959a68b41..f8f023736738a 100644 --- a/test/IDE/complete_keywords.swift +++ b/test/IDE/complete_keywords.swift @@ -1,19 +1,19 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_1 | FileCheck %s -check-prefix=KW_DECL_STMT - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNC_BODY_1 | FileCheck %s -check-prefix=KW_DECL_STMT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNC_BODY_2 | FileCheck %s -check-prefix=KW_DECL_STMT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNC_BODY_3 | FileCheck %s -check-prefix=KW_DECL_STMT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNC_BODY_4 | FileCheck %s -check-prefix=KW_DECL_STMT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNC_BODY_5 | FileCheck %s -check-prefix=KW_DECL_STMT - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_NOMINAL_DECL_1 | FileCheck %s -check-prefix=KW_DECL -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_NOMINAL_DECL_2 | FileCheck %s -check-prefix=KW_DECL -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_NOMINAL_DECL_3 | FileCheck %s -check-prefix=KW_DECL -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_NOMINAL_DECL_4 | FileCheck %s -check-prefix=KW_DECL -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_NOMINAL_DECL_5 | FileCheck %s -check-prefix=KW_DECL -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_NOMINAL_DECL_6 | FileCheck %s -check-prefix=KW_DECL -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_NOMINAL_DECL_7 | FileCheck %s -check-prefix=KW_DECL -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_NOMINAL_DECL_8 | FileCheck %s -check-prefix=KW_DECL +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_1 | FileCheck %s -check-prefix=KW_DECL_STMT + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNC_BODY_1 | FileCheck %s -check-prefix=KW_DECL_STMT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNC_BODY_2 | FileCheck %s -check-prefix=KW_DECL_STMT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNC_BODY_3 | FileCheck %s -check-prefix=KW_DECL_STMT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNC_BODY_4 | FileCheck %s -check-prefix=KW_DECL_STMT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNC_BODY_5 | FileCheck %s -check-prefix=KW_DECL_STMT + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_NOMINAL_DECL_1 | FileCheck %s -check-prefix=KW_DECL +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_NOMINAL_DECL_2 | FileCheck %s -check-prefix=KW_DECL +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_NOMINAL_DECL_3 | FileCheck %s -check-prefix=KW_DECL +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_NOMINAL_DECL_4 | FileCheck %s -check-prefix=KW_DECL +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_NOMINAL_DECL_5 | FileCheck %s -check-prefix=KW_DECL +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_NOMINAL_DECL_6 | FileCheck %s -check-prefix=KW_DECL +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_NOMINAL_DECL_7 | FileCheck %s -check-prefix=KW_DECL +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_NOMINAL_DECL_8 | FileCheck %s -check-prefix=KW_DECL // KW_DECL: Begin completions // KW_DECL-DAG: Keyword/None: class{{$}} diff --git a/test/IDE/complete_member_decls_from_parent_decl_context.swift b/test/IDE/complete_member_decls_from_parent_decl_context.swift index 632d630ac32f8..cda054e6bd5ae 100644 --- a/test/IDE/complete_member_decls_from_parent_decl_context.swift +++ b/test/IDE/complete_member_decls_from_parent_decl_context.swift @@ -1,35 +1,35 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_CLASS_INSTANCE_METHOD_1 | FileCheck %s -check-prefix=IN_CLASS_INSTANCE_METHOD_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_CLASS_STATIC_METHOD_1 | FileCheck %s -check-prefix=IN_CLASS_STATIC_METHOD_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_CLASS_STATIC_METHOD_1 | FileCheck %s -check-prefix=IN_CLASS_STATIC_METHOD_1_NEGATIVE -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_CLASS_CONSTRUCTOR_1 | FileCheck %s -check-prefix=IN_CLASS_CONSTRUCTOR_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_CLASS_DESTRUCTOR_1 | FileCheck %s -check-prefix=IN_CLASS_DESTRUCTOR_1 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_STRUCT_INSTANCE_METHOD_1 | FileCheck %s -check-prefix=IN_STRUCT_INSTANCE_METHOD_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_STRUCT_STATIC_METHOD_1 | FileCheck %s -check-prefix=IN_STRUCT_STATIC_METHOD_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_STRUCT_STATIC_METHOD_1 | FileCheck %s -check-prefix=IN_STRUCT_STATIC_METHOD_1_NEGATIVE -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_STRUCT_CONSTRUCTOR_1 | FileCheck %s -check-prefix=IN_STRUCT_CONSTRUCTOR_1 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_A_1 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_A_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_A_2 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_A_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_A_3 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_A_3 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_A_4 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_A_4 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_A_5 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_A_5 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_B_1 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_B_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_B_2 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_B_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_B_3 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_B_3 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_B_4 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_B_4 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_B_5 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_B_5 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_C_1 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_C_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_C_2 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_C_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_C_3 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_C_3 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_C_4 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_C_4 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_C_5 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_C_5 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_D_1 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_D_1 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_E_1 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_E_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_CLASS_INSTANCE_METHOD_1 | FileCheck %s -check-prefix=IN_CLASS_INSTANCE_METHOD_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_CLASS_STATIC_METHOD_1 | FileCheck %s -check-prefix=IN_CLASS_STATIC_METHOD_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_CLASS_STATIC_METHOD_1 | FileCheck %s -check-prefix=IN_CLASS_STATIC_METHOD_1_NEGATIVE +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_CLASS_CONSTRUCTOR_1 | FileCheck %s -check-prefix=IN_CLASS_CONSTRUCTOR_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_CLASS_DESTRUCTOR_1 | FileCheck %s -check-prefix=IN_CLASS_DESTRUCTOR_1 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_STRUCT_INSTANCE_METHOD_1 | FileCheck %s -check-prefix=IN_STRUCT_INSTANCE_METHOD_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_STRUCT_STATIC_METHOD_1 | FileCheck %s -check-prefix=IN_STRUCT_STATIC_METHOD_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_STRUCT_STATIC_METHOD_1 | FileCheck %s -check-prefix=IN_STRUCT_STATIC_METHOD_1_NEGATIVE +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_STRUCT_CONSTRUCTOR_1 | FileCheck %s -check-prefix=IN_STRUCT_CONSTRUCTOR_1 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_A_1 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_A_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_A_2 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_A_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_A_3 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_A_3 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_A_4 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_A_4 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_A_5 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_A_5 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_B_1 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_B_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_B_2 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_B_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_B_3 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_B_3 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_B_4 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_B_4 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_B_5 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_B_5 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_C_1 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_C_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_C_2 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_C_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_C_3 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_C_3 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_C_4 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_C_4 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_C_5 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_C_5 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_D_1 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_D_1 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL_DECL_E_1 | FileCheck %s -check-prefix=NESTED_NOMINAL_DECL_E_1 //===--- //===--- Test that we can code complete in methods, and correctly distinguish diff --git a/test/IDE/complete_members_optional.swift b/test/IDE/complete_members_optional.swift index 8170f4d4d3b4f..742ff473008f9 100644 --- a/test/IDE/complete_members_optional.swift +++ b/test/IDE/complete_members_optional.swift @@ -1,8 +1,8 @@ // RUN: sed -n -e '1,/NO_ERRORS_UP_TO_HERE$/ p' %s > %t_no_errors.swift -// RUN: %swift -verify -parse %t_no_errors.swift +// RUN: %target-swift-frontend -parse -verify -disable-objc-attr-requires-foundation-module %t_no_errors.swift -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=OPTIONAL_MEMBERS_1 | FileCheck %s -check-prefix=OPTIONAL_MEMBERS_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=OPTIONAL_MEMBERS_2 | FileCheck %s -check-prefix=OPTIONAL_MEMBERS_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OPTIONAL_MEMBERS_1 | FileCheck %s -check-prefix=OPTIONAL_MEMBERS_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OPTIONAL_MEMBERS_2 | FileCheck %s -check-prefix=OPTIONAL_MEMBERS_2 @objc protocol HasOptionalMembers1 { diff --git a/test/IDE/complete_multiple_files.swift b/test/IDE/complete_multiple_files.swift index fb7724ce61364..67fbb3ca75c07 100644 --- a/test/IDE/complete_multiple_files.swift +++ b/test/IDE/complete_multiple_files.swift @@ -1,10 +1,10 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=T1 \ +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=T1 \ // RUN: %S/Inputs/multiple-files-1.swift %S/Inputs/multiple-files-2.swift | FileCheck %s -check-prefix=T1 // -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_1 \ +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_1 \ // RUN: %S/Inputs/multiple-files-1.swift %S/Inputs/multiple-files-2.swift | FileCheck %s -check-prefix=TOP_LEVEL_1 // -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MODULE_SCOPED %S/Inputs/multiple-files-1.swift %S/Inputs/multiple-files-2.swift | FileCheck %s -check-prefix=MODULE_SCOPED +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=MODULE_SCOPED %S/Inputs/multiple-files-1.swift %S/Inputs/multiple-files-2.swift | FileCheck %s -check-prefix=MODULE_SCOPED func testObjectExpr() { fooObject.#^T1^# diff --git a/test/IDE/complete_name_lookup.swift b/test/IDE/complete_name_lookup.swift index b2ef03286a041..9169242e34ea8 100644 --- a/test/IDE/complete_name_lookup.swift +++ b/test/IDE/complete_name_lookup.swift @@ -1,5 +1,5 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_DOT_1 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=BAR_OBJECT_DOT_1 | FileCheck %s -check-prefix=BAR_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_DOT_1 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=BAR_OBJECT_DOT_1 | FileCheck %s -check-prefix=BAR_OBJECT_DOT protocol FooBaseProtocol { var instanceProperty: Int { get } diff --git a/test/IDE/complete_not_recommended.swift b/test/IDE/complete_not_recommended.swift index ac8a017fa9ad2..90d26ba79ce12 100644 --- a/test/IDE/complete_not_recommended.swift +++ b/test/IDE/complete_not_recommended.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER | FileCheck %s -check-prefix=CHECK1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=MEMBER | FileCheck %s -check-prefix=CHECK1 // CHECK1: Begin completions, 1 items // CHECK1: Decl[InstanceMethod]/CurrNominal: foo({#self: A#})[#() -> Void#] // CHECK1: End completions diff --git a/test/IDE/complete_overridden_decls.swift b/test/IDE/complete_overridden_decls.swift index 76ad647c9f0bb..b4b7c321f91d8 100644 --- a/test/IDE/complete_overridden_decls.swift +++ b/test/IDE/complete_overridden_decls.swift @@ -1,13 +1,13 @@ // RUN: sed -n -e '1,/NO_ERRORS_UP_TO_HERE$/ p' %s > %t_no_errors.swift -// RUN: %swift -verify -parse %t_no_errors.swift +// RUN: %target-swift-frontend -parse -verify %t_no_errors.swift -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=OVER_BASE_1 > %t.over.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OVER_BASE_1 > %t.over.txt // RUN: FileCheck %s -check-prefix=OVER_BASE_1 < %t.over.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=OVER_DERIVED_1 > %t.over.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OVER_DERIVED_1 > %t.over.txt // RUN: FileCheck %s -check-prefix=OVER_DERIVED_1 < %t.over.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=OVER_MORE_DERIVED_1 > %t.over.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OVER_MORE_DERIVED_1 > %t.over.txt // RUN: FileCheck %s -check-prefix=OVER_MORE_DERIVED_1 < %t.over.txt //===--- diff --git a/test/IDE/complete_override.swift b/test/IDE/complete_override.swift index 36b79b8a1542e..e547272c5363a 100644 --- a/test/IDE/complete_override.swift +++ b/test/IDE/complete_override.swift @@ -1,84 +1,84 @@ // RUN: sed -n -e '1,/NO_ERRORS_UP_TO_HERE$/ p' %s > %t_no_errors.swift -// RUN: %swift -verify -parse %t_no_errors.swift +// RUN: %target-swift-frontend -parse -verify -disable-objc-attr-requires-foundation-module %t_no_errors.swift -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_PA -code-completion-keywords=false > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_PA -code-completion-keywords=false > %t.txt // RUN: FileCheck %s -check-prefix=CLASS_PA < %t.txt // RUN: FileCheck %s -check-prefix=WITH_PA < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_PA_EXT_1 -code-completion-keywords=false > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_PA_EXT_1 -code-completion-keywords=false > %t.txt // RUN: FileCheck %s -check-prefix=CLASS_PA < %t.txt // RUN: FileCheck %s -check-prefix=WITH_PA < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_PA_EXT_2 -code-completion-keywords=false > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_PA_EXT_2 -code-completion-keywords=false > %t.txt // RUN: FileCheck %s -check-prefix=CLASS_PA < %t.txt // RUN: FileCheck %s -check-prefix=WITH_PA < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_PB -code-completion-keywords=false > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_PB -code-completion-keywords=false > %t.txt // RUN: FileCheck %s -check-prefix=CLASS_PB < %t.txt // RUN: FileCheck %s -check-prefix=WITH_PB < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_PA_PB -code-completion-keywords=false > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_PA_PB -code-completion-keywords=false > %t.txt // RUN: FileCheck %s -check-prefix=CLASS_PA_PB < %t.txt // RUN: FileCheck %s -check-prefix=WITH_PA < %t.txt // RUN: FileCheck %s -check-prefix=WITH_PB < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BA -code-completion-keywords=false > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BA -code-completion-keywords=false > %t.txt // RUN: FileCheck %s -check-prefix=CLASS_BA < %t.txt // RUN: FileCheck %s -check-prefix=WITH_BA < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BA_PA -code-completion-keywords=false > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BA_PA -code-completion-keywords=false > %t.txt // RUN: FileCheck %s -check-prefix=CLASS_BA_PA < %t.txt // RUN: FileCheck %s -check-prefix=WITH_BA < %t.txt // RUN: FileCheck %s -check-prefix=WITH_PA < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BA_PA_EXT1 -code-completion-keywords=false > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BA_PA_EXT1 -code-completion-keywords=false > %t.txt // RUN: FileCheck %s -check-prefix=CLASS_BA_PA < %t.txt // RUN: FileCheck %s -check-prefix=WITH_BA < %t.txt // RUN: FileCheck %s -check-prefix=WITH_PA < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BA_PA_EXT2 -code-completion-keywords=false > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BA_PA_EXT2 -code-completion-keywords=false > %t.txt // RUN: FileCheck %s -check-prefix=CLASS_BA_PA < %t.txt // RUN: FileCheck %s -check-prefix=WITH_BA < %t.txt // RUN: FileCheck %s -check-prefix=WITH_PA < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BA_PB -code-completion-keywords=false > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BA_PB -code-completion-keywords=false > %t.txt // RUN: FileCheck %s -check-prefix=CLASS_BA_PB < %t.txt // RUN: FileCheck %s -check-prefix=WITH_BA < %t.txt // RUN: FileCheck %s -check-prefix=WITH_PB < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BB -code-completion-keywords=false > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BB -code-completion-keywords=false > %t.txt // RUN: FileCheck %s -check-prefix=CLASS_BB < %t.txt // RUN: FileCheck %s -check-prefix=WITH_BB < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BE -code-completion-keywords=false > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BE -code-completion-keywords=false > %t.txt // RUN: FileCheck %s -check-prefix=CLASS_BE < %t.txt // RUN: FileCheck %s -check-prefix=WITH_BE < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BE_PA -code-completion-keywords=false > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BE_PA -code-completion-keywords=false > %t.txt // RUN: FileCheck %s -check-prefix=CLASS_BE_PA < %t.txt // RUN: FileCheck %s -check-prefix=WITH_BE < %t.txt // RUN: FileCheck %s -check-prefix=WITH_PA < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BE_PA_PE -code-completion-keywords=false > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BE_PA_PE -code-completion-keywords=false > %t.txt // RUN: FileCheck %s -check-prefix=CLASS_BE_PA_PE < %t.txt // RUN: FileCheck %s -check-prefix=WITH_BE < %t.txt // RUN: FileCheck %s -check-prefix=WITH_PA < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BE_PA_PE_EXT1 -code-completion-keywords=false > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BE_PA_PE_EXT1 -code-completion-keywords=false > %t.txt // RUN: FileCheck %s -check-prefix=CLASS_BE_PA_PE < %t.txt // RUN: FileCheck %s -check-prefix=WITH_BE < %t.txt // RUN: FileCheck %s -check-prefix=WITH_PA < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BE_PA_PE_EXT2 -code-completion-keywords=false > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_BE_PA_PE_EXT2 -code-completion-keywords=false > %t.txt // RUN: FileCheck %s -check-prefix=CLASS_BE_PA_PE < %t.txt // RUN: FileCheck %s -check-prefix=WITH_BE < %t.txt // RUN: FileCheck %s -check-prefix=WITH_PA < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_PEI_PE -code-completion-keywords=false > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CLASS_PEI_PE -code-completion-keywords=false > %t.txt // RUN: FileCheck %s -check-prefix=CLASS_PEI_PE < %t.txt // RUN: FileCheck %s -check-prefix=WITH_PEI < %t.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL -code-completion-keywords=false > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=NESTED_NOMINAL -code-completion-keywords=false > %t.txt // RUN: FileCheck %s -check-prefix=NESTED_NOMINAL < %t.txt @objc diff --git a/test/IDE/complete_override_access_control.swift b/test/IDE/complete_override_access_control.swift index 7b789710a6c19..91aa6e53b6c51 100644 --- a/test/IDE/complete_override_access_control.swift +++ b/test/IDE/complete_override_access_control.swift @@ -1,21 +1,21 @@ // RUN: sed -n -e '1,/NO_ERRORS_UP_TO_HERE$/ p' %s > %t_no_errors.swift -// RUN: %swift -verify -parse %t_no_errors.swift +// RUN: %target-swift-frontend -parse -verify -disable-objc-attr-requires-foundation-module %t_no_errors.swift // -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_PRIVATE_ABC -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_PRIVATE_ABC -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_INTERNAL_ABC -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_INTERNAL_ABC -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_PUBLIC_ABC -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_PUBLIC_ABC +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_PRIVATE_ABC -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_PRIVATE_ABC +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_INTERNAL_ABC -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_INTERNAL_ABC +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_PUBLIC_ABC -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_PUBLIC_ABC // -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_PRIVATE_DE -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_PRIVATE_DE -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_INTERNAL_DE -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_INTERNAL_DE -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_PUBLIC_DE -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_PUBLIC_DE +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_PRIVATE_DE -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_PRIVATE_DE +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_INTERNAL_DE -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_INTERNAL_DE +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_PUBLIC_DE -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_PUBLIC_DE // -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_PRIVATE_ED -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_PRIVATE_ED -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_INTERNAL_ED -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_INTERNAL_ED -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_PUBLIC_ED -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_PUBLIC_ED +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_PRIVATE_ED -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_PRIVATE_ED +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_INTERNAL_ED -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_INTERNAL_ED +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_PUBLIC_ED -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_PUBLIC_ED // -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_PRIVATE_EF -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_PRIVATE_EF -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_INTERNAL_EF -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_INTERNAL_EF -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_PUBLIC_EF -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_PUBLIC_EF +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_PRIVATE_EF -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_PRIVATE_EF +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_INTERNAL_EF -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_INTERNAL_EF +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TEST_PUBLIC_EF -code-completion-keywords=false | FileCheck %s -check-prefix=TEST_PUBLIC_EF @objc private class TagPA {} diff --git a/test/IDE/complete_override_objc.swift b/test/IDE/complete_override_objc.swift index f11c831356113..7775bc6064a27 100644 --- a/test/IDE/complete_override_objc.swift +++ b/test/IDE/complete_override_objc.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PA -code-completion-keywords=false -F %S/Inputs/mock-sdk > %t.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PA -code-completion-keywords=false -F %S/Inputs/mock-sdk > %t.txt // RUN: FileCheck %s -check-prefix=CHECK1 < %t.txt import Foo diff --git a/test/IDE/complete_pattern.swift b/test/IDE/complete_pattern.swift index 1d9af16ed2756..884b4d5e4f9c5 100644 --- a/test/IDE/complete_pattern.swift +++ b/test/IDE/complete_pattern.swift @@ -1,47 +1,47 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_TUPLE_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_TUPLE_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_TUPLE_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_TUPLE_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_TUPLE_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_TUPLE_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_TUPLE_4 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_TUPLE_4 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_ATOM_1 | FileCheck %s -check-prefix=ERROR_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_ATOM_2 | FileCheck %s -check-prefix=ERROR_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_ATOM_3 | FileCheck %s -check-prefix=ERROR_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_ATOM_4 | FileCheck %s -check-prefix=ERROR_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_ATOM_5 | FileCheck %s -check-prefix=ERROR_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_ATOM_6 | FileCheck %s -check-prefix=ERROR_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_ATOM_1 | FileCheck %s -check-prefix=ERROR_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_ATOM_2 | FileCheck %s -check-prefix=ERROR_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_ATOM_3 | FileCheck %s -check-prefix=ERROR_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_ATOM_4 | FileCheck %s -check-prefix=ERROR_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_ATOM_5 | FileCheck %s -check-prefix=ERROR_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_ATOM_6 | FileCheck %s -check-prefix=ERROR_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_IS_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_IS_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_IS_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_IS_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_IS_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_IS_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_IS_GENERIC_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_IS_GENERIC_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt // RUN: FileCheck %s -check-prefix=PATTERN_IS_GENERIC_1 < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_IS_GENERIC_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PATTERN_IS_GENERIC_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt // RUN: FileCheck %s -check-prefix=PATTERN_IS_GENERIC_2 < %t.types.txt diff --git a/test/IDE/complete_repl_empty_file.swift b/test/IDE/complete_repl_empty_file.swift index 9f72ce5b4e258..97848d1da861c 100644 --- a/test/IDE/complete_repl_empty_file.swift +++ b/test/IDE/complete_repl_empty_file.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -repl-code-completion -source-filename %s | FileCheck %s +// RUN: %target-swift-ide-test -repl-code-completion -source-filename %s | FileCheck %s // CHECK: Begin completions // CHECK-DAG: {{^}}true: Bool{{$}} diff --git a/test/IDE/complete_repl_identifier_prefix_1.swift b/test/IDE/complete_repl_identifier_prefix_1.swift index 521552043d5a3..435c3dea50d4d 100644 --- a/test/IDE/complete_repl_identifier_prefix_1.swift +++ b/test/IDE/complete_repl_identifier_prefix_1.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -repl-code-completion -source-filename %s | FileCheck %s +// RUN: %target-swift-ide-test -repl-code-completion -source-filename %s | FileCheck %s // CHECK: Begin completions // CHECK-NEXT: {{^}}true: Bool{{$}} diff --git a/test/IDE/complete_repl_in_func_1.swift b/test/IDE/complete_repl_in_func_1.swift index c1e2445962cc0..f6ec38f20d0f8 100644 --- a/test/IDE/complete_repl_in_func_1.swift +++ b/test/IDE/complete_repl_in_func_1.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -repl-code-completion -source-filename %s | FileCheck %s +// RUN: %target-swift-ide-test -repl-code-completion -source-filename %s | FileCheck %s // Make sure we partially type check the function body even if function body is // missing the right brace. diff --git a/test/IDE/complete_return.swift b/test/IDE/complete_return.swift index 11d9328104eac..43ec72c31de3e 100644 --- a/test/IDE/complete_return.swift +++ b/test/IDE/complete_return.swift @@ -1,6 +1,6 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RETURN_VOID_1 | FileCheck %s -check-prefix=RETURN_VOID_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RETURN_INT_1 | FileCheck %s -check-prefix=RETURN_INT_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RETURN_INT_2 | FileCheck %s -check-prefix=RETURN_INT_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RETURN_VOID_1 | FileCheck %s -check-prefix=RETURN_VOID_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RETURN_INT_1 | FileCheck %s -check-prefix=RETURN_INT_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RETURN_INT_2 | FileCheck %s -check-prefix=RETURN_INT_2 struct FooStruct { var instanceVar : Int diff --git a/test/IDE/complete_stdlib_builtin.swift b/test/IDE/complete_stdlib_builtin.swift index 8168aa383a457..4afa0858237b1 100644 --- a/test/IDE/complete_stdlib_builtin.swift +++ b/test/IDE/complete_stdlib_builtin.swift @@ -1,5 +1,5 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=BUILTIN_1 | FileCheck %s -check-prefix=NO_CRASH -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=BUILTIN_2 | FileCheck %s -check-prefix=NO_CRASH +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=BUILTIN_1 | FileCheck %s -check-prefix=NO_CRASH +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=BUILTIN_2 | FileCheck %s -check-prefix=NO_CRASH // NO_CRASH-NOT: Begin completions diff --git a/test/IDE/complete_stdlib_optional.swift b/test/IDE/complete_stdlib_optional.swift index fb7ce750fc23d..a60b2874cbdb3 100644 --- a/test/IDE/complete_stdlib_optional.swift +++ b/test/IDE/complete_stdlib_optional.swift @@ -1,52 +1,52 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_NO_DOT_1 > %t.opt.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_NO_DOT_1 > %t.opt.txt // RUN: FileCheck %s -check-prefix=OPT_NO_DOT_FOOSTRUCT < %t.opt.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_NO_DOT_2 > %t.opt.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_NO_DOT_2 > %t.opt.txt // RUN: FileCheck %s -check-prefix=OPT_NO_DOT_FOOSTRUCT < %t.opt.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_DOT_1 > %t.opt.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_DOT_1 > %t.opt.txt // RUN: FileCheck %s -check-prefix=OPT_DOT_FOOSTRUCT < %t.opt.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_DOT_1_SPACES > %t.opt.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_DOT_1_SPACES > %t.opt.txt // RUN: FileCheck %s -check-prefix=OPT_DOT_FOOSTRUCT_SPACES < %t.opt.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_DOT_2 > %t.opt.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_DOT_2 > %t.opt.txt // RUN: FileCheck %s -check-prefix=OPT_DOT_FOOSTRUCT < %t.opt.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=UN_OPT_NO_DOT_1 > %t.opt.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=UN_OPT_NO_DOT_1 > %t.opt.txt // RUN: FileCheck %s -check-prefix=UN_OPT_NO_DOT_FOOSTRUCT < %t.opt.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=UN_OPT_NO_DOT_2 > %t.opt.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=UN_OPT_NO_DOT_2 > %t.opt.txt // RUN: FileCheck %s -check-prefix=UN_OPT_NO_DOT_FOOSTRUCT < %t.opt.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=UN_OPT_NO_DOT_3 > %t.opt.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=UN_OPT_NO_DOT_3 > %t.opt.txt // RUN: FileCheck %s -check-prefix=UN_OPT_NO_DOT_INT < %t.opt.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=UN_OPT_DOT_1 > %t.opt.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=UN_OPT_DOT_1 > %t.opt.txt // RUN: FileCheck %s -check-prefix=UN_OPT_DOT_FOOSTRUCT < %t.opt.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=UN_OPT_DOT_2 > %t.opt.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=UN_OPT_DOT_2 > %t.opt.txt // RUN: FileCheck %s -check-prefix=UN_OPT_DOT_FOOSTRUCT < %t.opt.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=UN_OPT_DOT_3 > %t.opt.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=UN_OPT_DOT_3 > %t.opt.txt // RUN: FileCheck %s -check-prefix=UN_OPT_DOT_INT < %t.opt.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_DL_NO_DOT_1 > %t.opt.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_DL_NO_DOT_1 > %t.opt.txt // RUN: FileCheck %s -check-prefix=OBJCCLASS_MEMBERS_NO_DOT < %t.opt.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_DL_NO_DOT_2 > %t.opt.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_DL_NO_DOT_2 > %t.opt.txt // RUN: FileCheck %s -check-prefix=OBJCCLASS_MEMBERS_NO_DOT < %t.opt.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_DL_DOT_1 > %t.opt.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_DL_DOT_1 > %t.opt.txt // RUN: FileCheck %s -check-prefix=OBJCCLASS_MEMBERS_DOT < %t.opt.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_DL_DOT_2 > %t.opt.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_DL_DOT_2 > %t.opt.txt // RUN: FileCheck %s -check-prefix=OBJCCLASS_MEMBERS_DOT < %t.opt.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_DL_FORCE_RETURN_OPTIONAL_1 > %t.opt.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_DL_FORCE_RETURN_OPTIONAL_1 > %t.opt.txt // RUN: FileCheck %s -check-prefix=OPT_NO_DOT_OBJCCLASS < %t.opt.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_CAST_AS_RESULT_1 > %t.opt.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OPT_CAST_AS_RESULT_1 > %t.opt.txt // RUN: FileCheck %s -check-prefix=OPT_NO_DOT_OBJCCLASS < %t.opt.txt //===--- diff --git a/test/IDE/complete_stmt_controlling_expr.swift b/test/IDE/complete_stmt_controlling_expr.swift index 5e3db0b9fe4a6..453d2ac5f681d 100644 --- a/test/IDE/complete_stmt_controlling_expr.swift +++ b/test/IDE/complete_stmt_controlling_expr.swift @@ -1,116 +1,116 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_1 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_2 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_3 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_4 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_1 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_2 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_3 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_4 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_ELSE_IF_1 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_ELSE_IF_2 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_ELSE_IF_3 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_ELSE_IF_4 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_ELSE_IF_5 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_ELSE_IF_6 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_ELSE_IF_1 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_ELSE_IF_2 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_ELSE_IF_3 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_ELSE_IF_4 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_ELSE_IF_5 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_IF_ELSE_IF_6 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_WHILE_1 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_WHILE_2 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_WHILE_3 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_WHILE_4 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_WHILE_1 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_WHILE_2 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_WHILE_3 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_WHILE_4 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_DO_WHILE_1 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COND_DO_WHILE_1 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INIT_1 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INIT_2 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INIT_3 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INIT_1 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INIT_2 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INIT_3 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_COND_1 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_COND_2 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_COND_3 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_COND_1 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_COND_2 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_COND_3 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_COND_I_1 > %t.cond.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_COND_I_1 > %t.cond.txt // RUN: FileCheck %s -check-prefix=COND_COMMON < %t.cond.txt // RUN: FileCheck %s -check-prefix=WITH_I_INT_EXPR_SPECIFIC < %t.cond.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_COND_I_2 > %t.cond.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_COND_I_2 > %t.cond.txt // RUN: FileCheck %s -check-prefix=COND_COMMON < %t.cond.txt // RUN: FileCheck %s -check-prefix=WITH_I_ERROR_EXPR_SPECIFIC < %t.cond.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_COND_I_E_1 > %t.cond.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_COND_I_E_1 > %t.cond.txt // RUN: FileCheck %s -check-prefix=COND_COMMON < %t.cond.txt // RUN: FileCheck %s -check-prefix=WITH_I_E_EXPR_SPECIFIC < %t.cond.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INCR_1 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INCR_2 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INCR_1 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INCR_2 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INCR_I_1 > %t.incr.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INCR_I_1 > %t.incr.txt // RUN: FileCheck %s -check-prefix=COND_COMMON < %t.incr.txt // RUN: FileCheck %s -check-prefix=WITH_I_INT_EXPR_SPECIFIC < %t.incr.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INCR_I_2 > %t.incr.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INCR_I_2 > %t.incr.txt // RUN: FileCheck %s -check-prefix=COND_COMMON < %t.incr.txt // RUN: FileCheck %s -check-prefix=WITH_I_INT_EXPR_SPECIFIC < %t.incr.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INCR_I_3 > %t.incr.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INCR_I_3 > %t.incr.txt // RUN: FileCheck %s -check-prefix=COND_COMMON < %t.incr.txt // RUN: FileCheck %s -check-prefix=WITH_I_INT_EXPR_SPECIFIC < %t.incr.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INCR_I_4 > %t.incr.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INCR_I_4 > %t.incr.txt // RUN: FileCheck %s -check-prefix=COND_COMMON < %t.incr.txt // RUN: FileCheck %s -check-prefix=WITH_I_ERROR_EXPR_SPECIFIC < %t.incr.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INCR_I_E_1 > %t.incr.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_INCR_I_E_1 > %t.incr.txt // RUN: FileCheck %s -check-prefix=COND_COMMON < %t.incr.txt // RUN: FileCheck %s -check-prefix=WITH_I_E_EXPR_SPECIFIC < %t.incr.txt // FIXME: should have 'i' in these results. -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_BODY_I_1 > %t.body.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_BODY_I_1 > %t.body.txt // RUN: FileCheck %s -check-prefix=COND_COMMON < %t.body.txt // FIXME: FileCheck %s -check-prefix=WITH_I_INT_EXPR_SPECIFIC < %t.body.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_BODY_I_2 > %t.body.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_BODY_I_2 > %t.body.txt // RUN: FileCheck %s -check-prefix=COND_COMMON < %t.body.txt // RUN: FileCheck %s -check-prefix=WITH_I_INT_EXPR_SPECIFIC < %t.body.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_BODY_I_3 > %t.body.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_BODY_I_3 > %t.body.txt // RUN: FileCheck %s -check-prefix=COND_COMMON < %t.body.txt // RUN: FileCheck %s -check-prefix=WITH_I_ERROR_EXPR_SPECIFIC < %t.body.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_BODY_I_4 > %t.body.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_BODY_I_4 > %t.body.txt // RUN: FileCheck %s -check-prefix=COND_COMMON < %t.body.txt // RUN: FileCheck %s -check-prefix=WITH_I_INT_LOCAL < %t.body.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_BODY_I_5 > %t.body.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_BODY_I_5 > %t.body.txt // RUN: FileCheck %s -check-prefix=COND_COMMON < %t.body.txt // RUN: FileCheck %s -check-prefix=WITH_I_INT_LOCAL < %t.body.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_BODY_I_6 > %t.body.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=C_STYLE_FOR_BODY_I_6 > %t.body.txt // RUN: FileCheck %s -check-prefix=COND_COMMON < %t.body.txt // RUN: FileCheck %s -check-prefix=WITH_I_INT_LOCAL < %t.body.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FOR_EACH_EXPR_1 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FOR_EACH_EXPR_2 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOR_EACH_EXPR_1 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOR_EACH_EXPR_2 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=SWITCH_EXPR_1 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=SWITCH_EXPR_2 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=SWITCH_EXPR_1 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=SWITCH_EXPR_2 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=SWITCH_CASE_WHERE_EXPR_1 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=SWITCH_CASE_WHERE_EXPR_2 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=SWITCH_CASE_WHERE_EXPR_3 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=SWITCH_CASE_WHERE_EXPR_1 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=SWITCH_CASE_WHERE_EXPR_2 | FileCheck %s -check-prefix=COND_COMMON +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=SWITCH_CASE_WHERE_EXPR_3 | FileCheck %s -check-prefix=COND_COMMON -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=SWITCH_CASE_WHERE_EXPR_I_1 > %t.where.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=SWITCH_CASE_WHERE_EXPR_I_1 > %t.where.txt // RUN: FileCheck %s -check-prefix=COND_COMMON < %t.where.txt // RUN: FileCheck %s -check-prefix=WITH_I_INT_LOCAL < %t.where.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=SWITCH_CASE_WHERE_EXPR_I_2 > %t.where.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=SWITCH_CASE_WHERE_EXPR_I_2 > %t.where.txt // RUN: FileCheck %s -check-prefix=COND_COMMON < %t.where.txt // RUN: FileCheck %s -check-prefix=WITH_I_INT_LOCAL < %t.where.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=SWITCH_CASE_WHERE_EXPR_I_J_1 > %t.where.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=SWITCH_CASE_WHERE_EXPR_I_J_1 > %t.where.txt // RUN: FileCheck %s -check-prefix=COND_COMMON < %t.where.txt // RUN: FileCheck %s -check-prefix=WITH_I_INT_LOCAL < %t.where.txt // RUN: FileCheck %s -check-prefix=WITH_J_INT < %t.where.txt diff --git a/test/IDE/complete_type.swift b/test/IDE/complete_type.swift index affb3e914f04c..ae33fceab147e 100644 --- a/test/IDE/complete_type.swift +++ b/test/IDE/complete_type.swift @@ -1,377 +1,377 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PROTOCOL_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PROTOCOL_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_PROTOCOL < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_GENERIC_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_GENERIC_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_FUNC_PARAM_GENERIC_1 < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_GENERIC_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_GENERIC_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_FUNC_PARAM_GENERIC_2 < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_GENERIC_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_GENERIC_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_FUNC_PARAM_GENERIC_3 < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_GENERIC_4 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_GENERIC_4 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_FUNC_PARAM_GENERIC_4 < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_GENERIC_5 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_GENERIC_5 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_FUNC_PARAM_GENERIC_5 < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_GENERIC_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_GENERIC_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_CONSTRUCTOR_PARAM_GENERIC_1 < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_GENERIC_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_GENERIC_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_CONSTRUCTOR_PARAM_GENERIC_2 < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_GENERIC_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_GENERIC_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_CONSTRUCTOR_PARAM_GENERIC_3 < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_LOCAL_VAR_IN_FREE_FUNC_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_LOCAL_VAR_IN_FREE_FUNC_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_LOCAL_VAR_IN_FREE_FUNC_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_LOCAL_VAR_IN_FREE_FUNC_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_LOCAL_VAR_IN_FREE_FUNC_2 < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_LOCAL_VAR_IN_CONSTRUCTOR_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_LOCAL_VAR_IN_CONSTRUCTOR_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_LOCAL_VAR_IN_MEMBER_FUNC_1 < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_LOCAL_VAR_IN_DESTRUCTOR_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_LOCAL_VAR_IN_DESTRUCTOR_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_LOCAL_VAR_IN_MEMBER_FUNC_1 < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_LOCAL_VAR_IN_INSTANCE_FUNC_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_LOCAL_VAR_IN_INSTANCE_FUNC_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_LOCAL_VAR_IN_MEMBER_FUNC_1 < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_GLOBAL_VAR_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_GLOBAL_VAR_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_TYPEALIAS_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_TYPEALIAS_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_TYPEALIAS_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_TYPEALIAS_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_TYPEALIAS_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_TYPEALIAS_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_ASSOC_TYPE_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_ASSOC_TYPE_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_ASSOC_TYPE_INHERITANCE_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_ASSOC_TYPE_INHERITANCE_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_EXTENSION_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_EXTENSION_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_EXTENSION_INHERITANCE_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_EXTENSION_INHERITANCE_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_EXTENSION_INHERITANCE_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_EXTENSION_INHERITANCE_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_EXTENSION_INHERITANCE_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_EXTENSION_INHERITANCE_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_STRUCT_INHERITANCE_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_STRUCT_INHERITANCE_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_STRUCT_INHERITANCE_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_STRUCT_INHERITANCE_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_STRUCT_INHERITANCE_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_STRUCT_INHERITANCE_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_STRUCT_INHERITANCE_4 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_STRUCT_INHERITANCE_4 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_STRUCT_INHERITANCE_5 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_STRUCT_INHERITANCE_5 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_STRUCT_INHERITANCE_6 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_STRUCT_INHERITANCE_6 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_STRUCT_INHERITANCE_7 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_STRUCT_INHERITANCE_7 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_STRUCT_INHERITANCE_8 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_STRUCT_INHERITANCE_8 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CLASS_INHERITANCE_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CLASS_INHERITANCE_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CLASS_INHERITANCE_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CLASS_INHERITANCE_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_ENUM_INHERITANCE_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_ENUM_INHERITANCE_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_ENUM_INHERITANCE_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_ENUM_INHERITANCE_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PROTOCOL_INHERITANCE_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PROTOCOL_INHERITANCE_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PROTOCOL_INHERITANCE_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PROTOCOL_INHERITANCE_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_TUPLE_TYPE_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_TUPLE_TYPE_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_TUPLE_TYPE_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_TUPLE_TYPE_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_TUPLE_TYPE_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_TUPLE_TYPE_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_TUPLE_TYPE_4 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_TUPLE_TYPE_4 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_TUPLE_TYPE_5 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_TUPLE_TYPE_5 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_TUPLE_TYPE_6 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_TUPLE_TYPE_6 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNCTION_TYPE_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNCTION_TYPE_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNCTION_TYPE_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNCTION_TYPE_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNCTION_TYPE_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNCTION_TYPE_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNCTION_TYPE_4 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNCTION_TYPE_4 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNCTION_TYPE_5 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNCTION_TYPE_5 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNCTION_TYPE_6 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNCTION_TYPE_6 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PROTOCOL_COMPOSITION_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PROTOCOL_COMPOSITION_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PROTOCOL_COMPOSITION_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PROTOCOL_COMPOSITION_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PROTOCOL_COMPOSITION_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PROTOCOL_COMPOSITION_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_NESTED_TYPES_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_NESTED_TYPES_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_BASE_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_NESTED_TYPES_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_NESTED_TYPES_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_BASE_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_NESTED_TYPES_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_NESTED_TYPES_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_DERIVED_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_NESTED_TYPES_4 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_NESTED_TYPES_4 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_DERIVED_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_INSTANCE_VAR_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_INSTANCE_VAR_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_BASE_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_INSTANCE_VAR_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_INSTANCE_VAR_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_BASE_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_INSTANCE_VAR_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_INSTANCE_VAR_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_DERIVED_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_INSTANCE_VAR_4 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_INSTANCE_VAR_4 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_DERIVED_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_LOCAL_VAR_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_LOCAL_VAR_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_BASE_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_LOCAL_VAR_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_LOCAL_VAR_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_BASE_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_LOCAL_VAR_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_LOCAL_VAR_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_DERIVED_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_LOCAL_VAR_4 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_LOCAL_VAR_4 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_DERIVED_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_BASE_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_BASE_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_BASE_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITHOUT_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_BASE_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_BASE_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_BASE_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITHOUT_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_BASE_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_BASE_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_BASE_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITHOUT_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_BASE_4 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_BASE_4 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_BASE_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITHOUT_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_BASE_NO_DOT_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_BASE_NO_DOT_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_BASE_1_NO_DOT_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITHOUT_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_BASE_NO_DOT_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_BASE_NO_DOT_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_BASE_1_NO_DOT_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITHOUT_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_BASE_NO_DOT_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_BASE_NO_DOT_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_BASE_1_NO_DOT_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITHOUT_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_DERIVED_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_DERIVED_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_DERIVED_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITHOUT_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_DERIVED_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_DERIVED_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_DERIVED_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITHOUT_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_DERIVED_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_DERIVED_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=VAR_DERIVED_1_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=WITHOUT_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// FIXME: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_GENERIC_1 > %t.types.txt +// FIXME: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_GENERIC_1 > %t.types.txt // FIXME: FileCheck %s -check-prefix=TYPE_IDENTIFIER_GENERIC_1 < %t.types.txt // RUN: FileCheck %s -check-prefix=WITHOUT_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_GENERIC_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_GENERIC_2 > %t.types.txt // FIXME: FileCheck %s -check-prefix=TYPE_IDENTIFIER_GENERIC_2 < %t.types.txt // RUN: FileCheck %s -check-prefix=WITHOUT_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_GENERIC_3 | FileCheck %s -check-prefix=TYPE_IDENTIFIER_GENERIC_3 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_GENERIC_3 | FileCheck %s -check-prefix=TYPE_IDENTIFIER_GENERIC_3 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_IRRELEVANT_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IDENTIFIER_IRRELEVANT_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IDENTIFIER_IRRELEVANT_1 < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_AS_CAST_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_AS_CAST_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt diff --git a/test/IDE/complete_type_in_func_param.swift b/test/IDE/complete_type_in_func_param.swift index 1bdb92a1bbe62..a050cad6dfae1 100644 --- a/test/IDE/complete_type_in_func_param.swift +++ b/test/IDE/complete_type_in_func_param.swift @@ -1,178 +1,178 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_4 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_4 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// FIXME: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_5 > %t.types.txt +// FIXME: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_5 > %t.types.txt // FIXME: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // FIXME: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_6 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_6 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_7 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_7 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_8 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_8 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_9 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_9 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_4 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_4 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_5 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_5 > %t.types.txt // FIXME: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // FIXME: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_6 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_6 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_7 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_7 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_8 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_8 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_9 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_CONSTRUCTOR_PARAM_9 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_CURRIED_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_CURRIED_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_CURRIED_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_CURRIED_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_CURRIED_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_PARAM_CURRIED_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_4 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_4 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_5 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_5 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_6 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_6 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_7 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_7 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_8 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_8 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_9 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_9 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_10 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_10 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_11 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_11 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_12 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_12 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_13 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_FUNC_RESULT_13 > %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PARAM_FORWARD_1 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PARAM_FORWARD_1 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_PARAM_FORWARD < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PARAM_FORWARD_2 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PARAM_FORWARD_2 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_PARAM_FORWARD < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PARAM_FORWARD_3 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PARAM_FORWARD_3 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_PARAM_FORWARD < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PARAM_FORWARD_4 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PARAM_FORWARD_4 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_PARAM_FORWARD < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PARAM_FORWARD_5 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PARAM_FORWARD_5 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_PARAM_FORWARD < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PARAM_FORWARD_6 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PARAM_FORWARD_6 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_PARAM_FORWARD < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PARAM_FORWARD_7 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PARAM_FORWARD_7 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_PARAM_FORWARD < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PARAM_FORWARD_8 > %t.types.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE_IN_PARAM_FORWARD_8 > %t.types.txt // RUN: FileCheck %s -check-prefix=TYPE_IN_PARAM_FORWARD < %t.types.txt // RUN: FileCheck %s -check-prefix=WITH_GLOBAL_TYPES < %t.types.txt // RUN: FileCheck %s -check-prefix=GLOBAL_NEGATIVE < %t.types.txt diff --git a/test/IDE/complete_unicode.swift b/test/IDE/complete_unicode.swift index 2822698812b21..6fe9b567dc739 100644 --- a/test/IDE/complete_unicode.swift +++ b/test/IDE/complete_unicode.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=UNICODE_1 > %t.unicode.txt +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=UNICODE_1 > %t.unicode.txt // RUN: FileCheck %s -check-prefix=UNICODE_1 < %t.unicode.txt struct Unicode1 { diff --git a/test/IDE/complete_unwrapping_if_while.swift b/test/IDE/complete_unwrapping_if_while.swift index 54e9567cf3195..b1bb9977bd0ec 100644 --- a/test/IDE/complete_unwrapping_if_while.swift +++ b/test/IDE/complete_unwrapping_if_while.swift @@ -1,22 +1,22 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_IF_1 | FileCheck %s -check-prefix=UNWRAPPED_INT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_IF_2 | FileCheck %s -check-prefix=UNWRAPPED_INT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_IF_3 | FileCheck %s -check-prefix=UNWRAPPED_INT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_IF_4 | FileCheck %s -check-prefix=UNWRAPPED_INT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_IF_1 | FileCheck %s -check-prefix=UNWRAPPED_INT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_IF_2 | FileCheck %s -check-prefix=UNWRAPPED_INT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_IF_3 | FileCheck %s -check-prefix=UNWRAPPED_INT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_IF_4 | FileCheck %s -check-prefix=UNWRAPPED_INT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_WHILE_1 | FileCheck %s -check-prefix=UNWRAPPED_INT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_WHILE_2 | FileCheck %s -check-prefix=UNWRAPPED_INT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_WHILE_3 | FileCheck %s -check-prefix=UNWRAPPED_INT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_WHILE_4 | FileCheck %s -check-prefix=UNWRAPPED_INT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_WHILE_1 | FileCheck %s -check-prefix=UNWRAPPED_INT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_WHILE_2 | FileCheck %s -check-prefix=UNWRAPPED_INT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_WHILE_3 | FileCheck %s -check-prefix=UNWRAPPED_INT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_WHILE_4 | FileCheck %s -check-prefix=UNWRAPPED_INT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNCTION_IF_1 | FileCheck %s -check-prefix=UNWRAPPED_INT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNCTION_IF_2 | FileCheck %s -check-prefix=UNWRAPPED_INT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNCTION_IF_3 | FileCheck %s -check-prefix=UNWRAPPED_INT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNCTION_IF_4 | FileCheck %s -check-prefix=UNWRAPPED_INT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNCTION_IF_1 | FileCheck %s -check-prefix=UNWRAPPED_INT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNCTION_IF_2 | FileCheck %s -check-prefix=UNWRAPPED_INT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNCTION_IF_3 | FileCheck %s -check-prefix=UNWRAPPED_INT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNCTION_IF_4 | FileCheck %s -check-prefix=UNWRAPPED_INT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNCTION_WHILE_1 | FileCheck %s -check-prefix=UNWRAPPED_INT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNCTION_WHILE_2 | FileCheck %s -check-prefix=UNWRAPPED_INT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNCTION_WHILE_3 | FileCheck %s -check-prefix=UNWRAPPED_INT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNCTION_WHILE_4 | FileCheck %s -check-prefix=UNWRAPPED_INT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNCTION_WHILE_1 | FileCheck %s -check-prefix=UNWRAPPED_INT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNCTION_WHILE_2 | FileCheck %s -check-prefix=UNWRAPPED_INT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNCTION_WHILE_3 | FileCheck %s -check-prefix=UNWRAPPED_INT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_FUNCTION_WHILE_4 | FileCheck %s -check-prefix=UNWRAPPED_INT // UNWRAPPED_INT: Begin completions // UNWRAPPED_INT-DAG: Decl[LocalVar]/Local: unwrapped[#Int#]{{$}} diff --git a/test/IDE/complete_value_expr.swift b/test/IDE/complete_value_expr.swift index 0af23ae332566..6609d0bcd61fa 100644 --- a/test/IDE/complete_value_expr.swift +++ b/test/IDE/complete_value_expr.swift @@ -1,113 +1,113 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_DOT_1 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_DOT_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_DOT_3 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_DOT_4 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_DOT_5 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_NO_DOT_1 | FileCheck %s -check-prefix=FOO_OBJECT_NO_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_NO_DOT_2 | FileCheck %s -check-prefix=FOO_OBJECT_NO_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_STRUCT_DOT_1 | FileCheck %s -check-prefix=FOO_STRUCT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_STRUCT_NO_DOT_1 | FileCheck %s -check-prefix=FOO_STRUCT_NO_DOT - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CF1 | FileCheck %s -check-prefix=CF1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CF2 | FileCheck %s -check-prefix=CF2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CF3 | FileCheck %s -check-prefix=CF3 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CF4 | FileCheck %s -check-prefix=CF4 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_FUNC_0 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_FUNC_0 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_FUNC_1 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_FUNC_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_FUNC_2 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_FUNC_2 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_VARARG_FUNC_0 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_VARARG_FUNC_0 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_VARARG_FUNC_1 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_VARARG_FUNC_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_VARARG_FUNC_2 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_VARARG_FUNC_2 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_OVERLOADED_FUNC_1 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_OVERLOADED_FUNC_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_OVERLOADED_FUNC_2 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_OVERLOADED_FUNC_2 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_CURRIED_FUNC_1 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_CURRIED_FUNC_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_CURRIED_FUNC_2 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_CURRIED_FUNC_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_CURRIED_FUNC_3 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_CURRIED_FUNC_3 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_CURRIED_FUNC_4 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_CURRIED_FUNC_4 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_SWITCH_CASE_1 | FileCheck %s -check-prefix=IN_SWITCH_CASE -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_SWITCH_CASE_2 | FileCheck %s -check-prefix=IN_SWITCH_CASE -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_SWITCH_CASE_3 | FileCheck %s -check-prefix=IN_SWITCH_CASE -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_SWITCH_CASE_4 | FileCheck %s -check-prefix=IN_SWITCH_CASE - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=VF1 | FileCheck %s -check-prefix=VF1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=VF2 | FileCheck %s -check-prefix=VF2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=BASE_MEMBERS | FileCheck %s -check-prefix=BASE_MEMBERS -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=BASE_MEMBERS_STATIC | FileCheck %s -check-prefix=BASE_MEMBERS_STATIC - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTO_MEMBERS_NO_DOT_1 | FileCheck %s -check-prefix=PROTO_MEMBERS_NO_DOT_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTO_MEMBERS_NO_DOT_2 | FileCheck %s -check-prefix=PROTO_MEMBERS_NO_DOT_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTO_MEMBERS_NO_DOT_3 | FileCheck %s -check-prefix=PROTO_MEMBERS_NO_DOT_3 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTO_MEMBERS_1 | FileCheck %s -check-prefix=PROTO_MEMBERS_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTO_MEMBERS_2 | FileCheck %s -check-prefix=PROTO_MEMBERS_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTO_MEMBERS_3 | FileCheck %s -check-prefix=PROTO_MEMBERS_3 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTO_MEMBERS_4 | FileCheck %s -check-prefix=PROTO_MEMBERS_4 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_FUNCTION_CALL_0 | FileCheck %s -check-prefix=INSIDE_FUNCTION_CALL_0 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_FUNCTION_CALL_1 | FileCheck %s -check-prefix=INSIDE_FUNCTION_CALL_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_FUNCTION_CALL_2 | FileCheck %s -check-prefix=INSIDE_FUNCTION_CALL_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_FUNCTION_CALL_3 | FileCheck %s -check-prefix=INSIDE_FUNCTION_CALL_3 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_FUNCTION_CALL_4 | FileCheck %s -check-prefix=INSIDE_FUNCTION_CALL_4 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_FUNCTION_CALL_5 | FileCheck %s -check-prefix=INSIDE_FUNCTION_CALL_5 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_FUNCTION_CALL_6 | FileCheck %s -check-prefix=INSIDE_FUNCTION_CALL_6 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_FUNCTION_CALL_7 | FileCheck %s -check-prefix=INSIDE_FUNCTION_CALL_7 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_VARARG_FUNCTION_CALL_1 | FileCheck %s -check-prefix=INSIDE_VARARG_FUNCTION_CALL_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_VARARG_FUNCTION_CALL_2 | FileCheck %s -check-prefix=INSIDE_VARARG_FUNCTION_CALL_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_VARARG_FUNCTION_CALL_3 | FileCheck %s -check-prefix=INSIDE_VARARG_FUNCTION_CALL_3 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_OVERLOADED_FUNCTION_CALL_1 | FileCheck %s -check-prefix=INSIDE_OVERLOADED_FUNCTION_CALL_1 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_CURRIED_FUNCTION_CALL_1 | FileCheck %s -check-prefix=INSIDE_CURRIED_FUNCTION_CALL_1 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_FUNCTION_CALL_ON_CLASS_INSTANCE_1 | FileCheck %s -check-prefix=INSIDE_FUNCTION_CALL_ON_CLASS_INSTANCE_1 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_FUNC_PARAM_1 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_FUNC_PARAM_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_FUNC_PARAM_3 | FileCheck %s -check-prefix=RESOLVE_FUNC_PARAM_3 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_FUNC_PARAM_4 | FileCheck %s -check-prefix=RESOLVE_FUNC_PARAM_4 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_FUNC_PARAM_5 | FileCheck %s -check-prefix=RESOLVE_FUNC_PARAM_5 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_FUNC_PARAM_6 | FileCheck %s -check-prefix=RESOLVE_FUNC_PARAM_6 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_CONSTRUCTOR_PARAM_1 | FileCheck %s -check-prefix=FOO_OBJECT_DOT -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_CONSTRUCTOR_PARAM_2 | FileCheck %s -check-prefix=RESOLVE_CONSTRUCTOR_PARAM_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_CONSTRUCTOR_PARAM_3 | FileCheck %s -check-prefix=RESOLVE_CONSTRUCTOR_PARAM_3 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_PAREN_PATTERN_1 | FileCheck %s -check-prefix=FUNC_PAREN_PATTERN_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_PAREN_PATTERN_2 | FileCheck %s -check-prefix=FUNC_PAREN_PATTERN_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_PAREN_PATTERN_3 | FileCheck %s -check-prefix=FUNC_PAREN_PATTERN_3 - -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CHAINED_CALLS_1 | FileCheck %s -check-prefix=CHAINED_CALLS_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CHAINED_CALLS_2 | FileCheck %s -check-prefix=CHAINED_CALLS_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_DOT_1 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_DOT_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_DOT_3 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_DOT_4 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_DOT_5 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_NO_DOT_1 | FileCheck %s -check-prefix=FOO_OBJECT_NO_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_OBJECT_NO_DOT_2 | FileCheck %s -check-prefix=FOO_OBJECT_NO_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_STRUCT_DOT_1 | FileCheck %s -check-prefix=FOO_STRUCT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FOO_STRUCT_NO_DOT_1 | FileCheck %s -check-prefix=FOO_STRUCT_NO_DOT + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CF1 | FileCheck %s -check-prefix=CF1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CF2 | FileCheck %s -check-prefix=CF2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CF3 | FileCheck %s -check-prefix=CF3 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CF4 | FileCheck %s -check-prefix=CF4 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_FUNC_0 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_FUNC_0 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_FUNC_1 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_FUNC_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_FUNC_2 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_FUNC_2 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_VARARG_FUNC_0 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_VARARG_FUNC_0 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_VARARG_FUNC_1 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_VARARG_FUNC_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_VARARG_FUNC_2 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_VARARG_FUNC_2 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_OVERLOADED_FUNC_1 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_OVERLOADED_FUNC_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_OVERLOADED_FUNC_2 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_OVERLOADED_FUNC_2 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_CURRIED_FUNC_1 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_CURRIED_FUNC_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_CURRIED_FUNC_2 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_CURRIED_FUNC_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_CURRIED_FUNC_3 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_CURRIED_FUNC_3 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IMPLICITLY_CURRIED_CURRIED_FUNC_4 | FileCheck %s -check-prefix=IMPLICITLY_CURRIED_CURRIED_FUNC_4 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_SWITCH_CASE_1 | FileCheck %s -check-prefix=IN_SWITCH_CASE +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_SWITCH_CASE_2 | FileCheck %s -check-prefix=IN_SWITCH_CASE +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_SWITCH_CASE_3 | FileCheck %s -check-prefix=IN_SWITCH_CASE +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=IN_SWITCH_CASE_4 | FileCheck %s -check-prefix=IN_SWITCH_CASE + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=VF1 | FileCheck %s -check-prefix=VF1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=VF2 | FileCheck %s -check-prefix=VF2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=BASE_MEMBERS | FileCheck %s -check-prefix=BASE_MEMBERS +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=BASE_MEMBERS_STATIC | FileCheck %s -check-prefix=BASE_MEMBERS_STATIC + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTO_MEMBERS_NO_DOT_1 | FileCheck %s -check-prefix=PROTO_MEMBERS_NO_DOT_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTO_MEMBERS_NO_DOT_2 | FileCheck %s -check-prefix=PROTO_MEMBERS_NO_DOT_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTO_MEMBERS_NO_DOT_3 | FileCheck %s -check-prefix=PROTO_MEMBERS_NO_DOT_3 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTO_MEMBERS_1 | FileCheck %s -check-prefix=PROTO_MEMBERS_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTO_MEMBERS_2 | FileCheck %s -check-prefix=PROTO_MEMBERS_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTO_MEMBERS_3 | FileCheck %s -check-prefix=PROTO_MEMBERS_3 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=PROTO_MEMBERS_4 | FileCheck %s -check-prefix=PROTO_MEMBERS_4 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_FUNCTION_CALL_0 | FileCheck %s -check-prefix=INSIDE_FUNCTION_CALL_0 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_FUNCTION_CALL_1 | FileCheck %s -check-prefix=INSIDE_FUNCTION_CALL_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_FUNCTION_CALL_2 | FileCheck %s -check-prefix=INSIDE_FUNCTION_CALL_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_FUNCTION_CALL_3 | FileCheck %s -check-prefix=INSIDE_FUNCTION_CALL_3 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_FUNCTION_CALL_4 | FileCheck %s -check-prefix=INSIDE_FUNCTION_CALL_4 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_FUNCTION_CALL_5 | FileCheck %s -check-prefix=INSIDE_FUNCTION_CALL_5 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_FUNCTION_CALL_6 | FileCheck %s -check-prefix=INSIDE_FUNCTION_CALL_6 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_FUNCTION_CALL_7 | FileCheck %s -check-prefix=INSIDE_FUNCTION_CALL_7 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_VARARG_FUNCTION_CALL_1 | FileCheck %s -check-prefix=INSIDE_VARARG_FUNCTION_CALL_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_VARARG_FUNCTION_CALL_2 | FileCheck %s -check-prefix=INSIDE_VARARG_FUNCTION_CALL_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_VARARG_FUNCTION_CALL_3 | FileCheck %s -check-prefix=INSIDE_VARARG_FUNCTION_CALL_3 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_OVERLOADED_FUNCTION_CALL_1 | FileCheck %s -check-prefix=INSIDE_OVERLOADED_FUNCTION_CALL_1 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_CURRIED_FUNCTION_CALL_1 | FileCheck %s -check-prefix=INSIDE_CURRIED_FUNCTION_CALL_1 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INSIDE_FUNCTION_CALL_ON_CLASS_INSTANCE_1 | FileCheck %s -check-prefix=INSIDE_FUNCTION_CALL_ON_CLASS_INSTANCE_1 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_FUNC_PARAM_1 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_FUNC_PARAM_2 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_FUNC_PARAM_3 | FileCheck %s -check-prefix=RESOLVE_FUNC_PARAM_3 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_FUNC_PARAM_4 | FileCheck %s -check-prefix=RESOLVE_FUNC_PARAM_4 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_FUNC_PARAM_5 | FileCheck %s -check-prefix=RESOLVE_FUNC_PARAM_5 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_FUNC_PARAM_6 | FileCheck %s -check-prefix=RESOLVE_FUNC_PARAM_6 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_CONSTRUCTOR_PARAM_1 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_CONSTRUCTOR_PARAM_2 | FileCheck %s -check-prefix=RESOLVE_CONSTRUCTOR_PARAM_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_CONSTRUCTOR_PARAM_3 | FileCheck %s -check-prefix=RESOLVE_CONSTRUCTOR_PARAM_3 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_PAREN_PATTERN_1 | FileCheck %s -check-prefix=FUNC_PAREN_PATTERN_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_PAREN_PATTERN_2 | FileCheck %s -check-prefix=FUNC_PAREN_PATTERN_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FUNC_PAREN_PATTERN_3 | FileCheck %s -check-prefix=FUNC_PAREN_PATTERN_3 + +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CHAINED_CALLS_1 | FileCheck %s -check-prefix=CHAINED_CALLS_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CHAINED_CALLS_2 | FileCheck %s -check-prefix=CHAINED_CALLS_2 // Disabled because we aren't handling failures well. -// FIXME: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CHAINED_CALLS_3 | FileCheck %s -check-prefix=CHAINED_CALLS_3 +// FIXME: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CHAINED_CALLS_3 | FileCheck %s -check-prefix=CHAINED_CALLS_3 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_1 | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_2 | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_3 | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_3 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_4 | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_4 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_5 | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_5 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_ERROR_1 | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_ERROR_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_1 | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_2 | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_3 | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_3 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_4 | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_4 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_5 | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_5 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_ERROR_1 | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_ERROR_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_1_STATIC | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_1_STATIC -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_2_STATIC | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_2_STATIC -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_3_STATIC | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_3_STATIC -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_4_STATIC | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_4_STATIC -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_5_STATIC | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_5_STATIC +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_1_STATIC | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_1_STATIC +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_2_STATIC | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_2_STATIC +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_3_STATIC | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_3_STATIC +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_4_STATIC | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_4_STATIC +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_GENERIC_PARAMS_5_STATIC | FileCheck %s -check-prefix=RESOLVE_GENERIC_PARAMS_5_STATIC -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_UNSOLVED_VARIABLES_1 | FileCheck %s -check-prefix=TC_UNSOLVED_VARIABLES_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_UNSOLVED_VARIABLES_2 | FileCheck %s -check-prefix=TC_UNSOLVED_VARIABLES_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_UNSOLVED_VARIABLES_3 | FileCheck %s -check-prefix=TC_UNSOLVED_VARIABLES_3 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_UNSOLVED_VARIABLES_1 | FileCheck %s -check-prefix=TC_UNSOLVED_VARIABLES_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_UNSOLVED_VARIABLES_2 | FileCheck %s -check-prefix=TC_UNSOLVED_VARIABLES_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TC_UNSOLVED_VARIABLES_3 | FileCheck %s -check-prefix=TC_UNSOLVED_VARIABLES_3 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_MODULES_1 | FileCheck %s -check-prefix=RESOLVE_MODULES_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=RESOLVE_MODULES_1 | FileCheck %s -check-prefix=RESOLVE_MODULES_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=INTERPOLATED_STRING_1 | FileCheck %s -check-prefix=FOO_OBJECT_DOT +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INTERPOLATED_STRING_1 | FileCheck %s -check-prefix=FOO_OBJECT_DOT // Test code completion of expressions that produce a value. diff --git a/test/IDE/complete_vararg.swift b/test/IDE/complete_vararg.swift index fabf252f5598f..6e59ba1292eb7 100644 --- a/test/IDE/complete_vararg.swift +++ b/test/IDE/complete_vararg.swift @@ -1,15 +1,15 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_1 | FileCheck %s -check-prefix=TOP_LEVEL_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=OBJ_DOT_1 | FileCheck %s -check-prefix=OBJ_DOT_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FREE_FUNC_1 | FileCheck %s -check-prefix=FREE_FUNC_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=FREE_FUNC_2 | FileCheck %s -check-prefix=FREE_FUNC_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CURRIED_FREE_FUNC_1 | FileCheck %s -check-prefix=CURRIED_FREE_FUNC_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=CURRIED_FREE_FUNC_2 | FileCheck %s -check-prefix=CURRIED_FREE_FUNC_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=INIT_1 | FileCheck %s -check-prefix=INIT_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=METHOD_1 | FileCheck %s -check-prefix=METHOD_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=METHOD_2 | FileCheck %s -check-prefix=METHOD_2 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=SUBSCRIPT_1 | FileCheck %s -check-prefix=SUBSCRIPT_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=GENERIC_FREE_FUNC_1 | FileCheck %s -check-prefix=GENERIC_FREE_FUNC_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=INTERESTING_TYPE_1 | FileCheck %s -check-prefix=INTERESTING_TYPE_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP_LEVEL_1 | FileCheck %s -check-prefix=TOP_LEVEL_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=OBJ_DOT_1 | FileCheck %s -check-prefix=OBJ_DOT_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FREE_FUNC_1 | FileCheck %s -check-prefix=FREE_FUNC_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=FREE_FUNC_2 | FileCheck %s -check-prefix=FREE_FUNC_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CURRIED_FREE_FUNC_1 | FileCheck %s -check-prefix=CURRIED_FREE_FUNC_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=CURRIED_FREE_FUNC_2 | FileCheck %s -check-prefix=CURRIED_FREE_FUNC_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INIT_1 | FileCheck %s -check-prefix=INIT_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=METHOD_1 | FileCheck %s -check-prefix=METHOD_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=METHOD_2 | FileCheck %s -check-prefix=METHOD_2 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=SUBSCRIPT_1 | FileCheck %s -check-prefix=SUBSCRIPT_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=GENERIC_FREE_FUNC_1 | FileCheck %s -check-prefix=GENERIC_FREE_FUNC_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=INTERESTING_TYPE_1 | FileCheck %s -check-prefix=INTERESTING_TYPE_1 func freeFunc1(#x: Int...) { } func freeFunc2(#x: Int, #y: Int...) { } diff --git a/test/IDE/complete_weak.swift b/test/IDE/complete_weak.swift index 789aecaa3c21a..ce2573eed7011 100644 --- a/test/IDE/complete_weak.swift +++ b/test/IDE/complete_weak.swift @@ -1,8 +1,8 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=WEAK_VARS_1 | FileCheck %s -check-prefix=WEAK_VARS_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=WEAK_NO_DOT_1 | FileCheck %s -check-prefix=WEAK_NO_DOT_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=WEAK_DOT_1 | FileCheck %s -check-prefix=WEAK_DOT_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=UNOWNED_NO_DOT_1 | FileCheck %s -check-prefix=UNOWNED_NO_DOT_1 -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=UNOWNED_DOT_1 | FileCheck %s -check-prefix=UNOWNED_DOT_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=WEAK_VARS_1 | FileCheck %s -check-prefix=WEAK_VARS_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=WEAK_NO_DOT_1 | FileCheck %s -check-prefix=WEAK_NO_DOT_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=WEAK_DOT_1 | FileCheck %s -check-prefix=WEAK_DOT_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=UNOWNED_NO_DOT_1 | FileCheck %s -check-prefix=UNOWNED_NO_DOT_1 +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=UNOWNED_DOT_1 | FileCheck %s -check-prefix=UNOWNED_DOT_1 class CompleteWeak { func instanceFunc() {} diff --git a/test/IDE/complete_with_closure_param.swift b/test/IDE/complete_with_closure_param.swift index d26a3338b8911..b8c903d216673 100644 --- a/test/IDE/complete_with_closure_param.swift +++ b/test/IDE/complete_with_closure_param.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=COMPLETE | FileCheck %s +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=COMPLETE | FileCheck %s typealias FunctionTypealias = (Int, Int) -> Bool typealias OptionalFunctionTypealias = ((Int, Int) -> Bool)? diff --git a/test/IDE/complete_with_header_import.swift b/test/IDE/complete_with_header_import.swift index f12378abab227..ce31f327cc2d3 100644 --- a/test/IDE/complete_with_header_import.swift +++ b/test/IDE/complete_with_header_import.swift @@ -1,5 +1,5 @@ -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP -import-objc-header %S/Inputs/header.h | FileCheck %s -check-prefix=CHECK-TOP -// RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE -import-objc-header %S/Inputs/header.h | FileCheck %s -check-prefix=CHECK-TYPE +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TOP -import-objc-header %S/Inputs/header.h | FileCheck %s -check-prefix=CHECK-TOP +// RUN: %target-swift-ide-test -code-completion -source-filename %s -code-completion-token=TYPE -import-objc-header %S/Inputs/header.h | FileCheck %s -check-prefix=CHECK-TYPE func foo() { #^TOP^# diff --git a/test/IDE/complete_with_multiple_imports.swift b/test/IDE/complete_with_multiple_imports.swift index 7d4b4e1b84a7c..e4a1b7b2a927f 100644 --- a/test/IDE/complete_with_multiple_imports.swift +++ b/test/IDE/complete_with_multiple_imports.swift @@ -2,7 +2,7 @@ import Foo import FooHelper // This checks that we don't provide duplicate results because FooHelper is also imported through Foo. -// RUN: %swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=TOP_COMPLETIONS | FileCheck %s -check-prefix=CHECK-TOP +// RUN: %target-swift-ide-test -code-completion -source-filename %s -F %S/Inputs/mock-sdk -code-completion-token=TOP_COMPLETIONS | FileCheck %s -check-prefix=CHECK-TOP func testClangModule() { #^TOP_COMPLETIONS^# diff --git a/test/IDE/module_api_smoketest.swift b/test/IDE/module_api_smoketest.swift index e81f8558a6d31..68a46591eb923 100644 --- a/test/IDE/module_api_smoketest.swift +++ b/test/IDE/module_api_smoketest.swift @@ -1,6 +1,6 @@ // RUN: rm -rf %t // RUN: mkdir -p %t -// RUN: %swift-ide-test -generate-module-api-description -- -module-cache-path %t %s | FileCheck %s +// RUN: %swift-ide-test -generate-module-api-description -- -target %target-triple -module-cache-path %t %s | FileCheck %s public struct Struct1 {} diff --git a/test/IDE/print_ast_non_typechecked.swift b/test/IDE/print_ast_non_typechecked.swift index 6883469adcd91..210aae8d87c49 100644 --- a/test/IDE/print_ast_non_typechecked.swift +++ b/test/IDE/print_ast_non_typechecked.swift @@ -2,5 +2,5 @@ class C { func foo(s: Int, w } -// RUN: %swift-ide-test -print-ast-not-typechecked -source-filename %s | FileCheck %s -check-prefix=CHECK1 +// RUN: %target-swift-ide-test -print-ast-not-typechecked -source-filename %s | FileCheck %s -check-prefix=CHECK1 // CHECK1: func foo(s: Int, _: w) diff --git a/test/IDE/print_ast_overlay.swift b/test/IDE/print_ast_overlay.swift index ee825e1841e73..6a99b2de2f1bd 100644 --- a/test/IDE/print_ast_overlay.swift +++ b/test/IDE/print_ast_overlay.swift @@ -1,15 +1,15 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -module-name Foo -o %t -F %S/Inputs/mock-sdk %s +// RUN: %target-build-swift -emit-module -module-name Foo -o %t -F %S/Inputs/mock-sdk %s // -// RUN: %swift-ide-test -print-module -source-filename %s -I %t -F %S/Inputs/mock-sdk -module-to-print=Foo -accessibility-filter-public > %t.printed.txt +// RUN: %target-swift-ide-test -print-module -source-filename %s -I %t -F %S/Inputs/mock-sdk -module-to-print=Foo -accessibility-filter-public > %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_WITH_OVERLAY -strict-whitespace < %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_NO_INTERNAL -strict-whitespace < %t.printed.txt // -// RUN: %swift-ide-test -print-module -source-filename %s -I %t -F %S/Inputs/mock-sdk -module-to-print=Foo.FooSub > %t.printed.txt +// RUN: %target-swift-ide-test -print-module -source-filename %s -I %t -F %S/Inputs/mock-sdk -module-to-print=Foo.FooSub > %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_WITHOUT_OVERLAY -strict-whitespace < %t.printed.txt -// RUN: %swift-ide-test -print-module -source-filename %s -I %t -F %S/Inputs/mock-sdk -module-to-print=Foo -accessibility-filter-public -annotate-print > %t.annotated.txt +// RUN: %target-swift-ide-test -print-module -source-filename %s -I %t -F %S/Inputs/mock-sdk -module-to-print=Foo -accessibility-filter-public -annotate-print > %t.annotated.txt // RUN: FileCheck %s -check-prefix=PASS_ANNOTATED -strict-whitespace < %t.annotated.txt @exported import Foo diff --git a/test/IDE/print_ast_tc_decls.swift b/test/IDE/print_ast_tc_decls.swift index c4f4b7e3882dc..e8ace9b6edc16 100644 --- a/test/IDE/print_ast_tc_decls.swift +++ b/test/IDE/print_ast_tc_decls.swift @@ -2,12 +2,12 @@ // RUN: mkdir %t // // Build swift modules this test depends on. -// RUN: %swift -emit-module -target x86_64-apple-macosx10.9 -o %t %S/Inputs/foo_swift_module.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/foo_swift_module.swift // // This file should not have any syntax or type checker errors. -// RUN: %swift -parse -I %t %clang-importer-sdk -F %S/Inputs/mock-sdk -target x86_64-apple-macosx10.9 %s +// RUN: %target-swift-frontend -parse -verify -I %t %clang-importer-sdk -F %S/Inputs/mock-sdk %s // -// RUN: %swift-ide-test -print-ast-typechecked -source-filename %s -I %t %clang-importer-sdk -target x86_64-apple-macosx10.9 -F %S/Inputs/mock-sdk -function-definitions=false -prefer-type-repr=false -print-implicit-attrs=true > %t.printed.txt +// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -I %t %clang-importer-sdk -F %S/Inputs/mock-sdk -function-definitions=false -prefer-type-repr=false -print-implicit-attrs=true > %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_COMMON -strict-whitespace < %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_PRINT_AST -strict-whitespace < %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_RW_PROP_GET_SET -strict-whitespace < %t.printed.txt @@ -18,7 +18,7 @@ // RUN: FileCheck %s -check-prefix=PREFER_TYPE_PRINTING -strict-whitespace < %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_QUAL_UNQUAL -strict-whitespace < %t.printed.txt // -// RUN: %swift-ide-test -print-ast-typechecked -source-filename %s -I %t %clang-importer-sdk -target x86_64-apple-macosx10.9 -F %S/Inputs/mock-sdk -function-definitions=false -prefer-type-repr=true -print-implicit-attrs=true > %t.printed.txt +// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -I %t %clang-importer-sdk -F %S/Inputs/mock-sdk -function-definitions=false -prefer-type-repr=true -print-implicit-attrs=true > %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_COMMON -strict-whitespace < %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_PRINT_AST -strict-whitespace < %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_RW_PROP_GET_SET -strict-whitespace < %t.printed.txt @@ -29,8 +29,8 @@ // RUN: FileCheck %s -check-prefix=PREFER_TYPE_REPR_PRINTING -strict-whitespace < %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_QUAL_UNQUAL -strict-whitespace < %t.printed.txt // -// RUN: %swift -emit-module -o %t -I %t %clang-importer-sdk -target x86_64-apple-macosx10.9 -F %S/Inputs/mock-sdk %s -// RUN: %swift-ide-test -print-module -source-filename %s %clang-importer-sdk -target x86_64-apple-macosx10.9 -F %S/Inputs/mock-sdk -I %t -module-to-print=print_ast_tc_decls -print-implicit-attrs=true > %t.printed.txt +// RUN: %target-swift-frontend -emit-module -o %t -I %t %clang-importer-sdk -F %S/Inputs/mock-sdk %s +// RUN: %target-swift-ide-test -print-module -source-filename %s %clang-importer-sdk -F %S/Inputs/mock-sdk -I %t -module-to-print=print_ast_tc_decls -print-implicit-attrs=true > %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_COMMON -strict-whitespace < %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_PRINT_MODULE_INTERFACE -strict-whitespace < %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_RW_PROP_NO_GET_SET -strict-whitespace < %t.printed.txt @@ -42,13 +42,13 @@ // RUN: FileCheck %s -check-prefix=PASS_QUAL_UNQUAL -strict-whitespace < %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_EXPLODE_PATTERN -strict-whitespace < %t.printed.txt // -// RUN: %swift-ide-test -print-module -source-filename %s %clang-importer-sdk -target x86_64-apple-macosx10.9 -F %S/Inputs/mock-sdk -I %t -module-to-print=print_ast_tc_decls -synthesize-sugar-on-types=true -print-implicit-attrs=true > %t.printed.txt +// RUN: %target-swift-ide-test -print-module -source-filename %s %clang-importer-sdk -F %S/Inputs/mock-sdk -I %t -module-to-print=print_ast_tc_decls -synthesize-sugar-on-types=true -print-implicit-attrs=true > %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_PRINT_MODULE_INTERFACE -strict-whitespace < %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_QUAL_UNQUAL -strict-whitespace < %t.printed.txt // RUN: FileCheck %s -check-prefix=SYNTHESIZE_SUGAR_ON_TYPES -strict-whitespace < %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_EXPLODE_PATTERN -strict-whitespace < %t.printed.txt -// RUN: %swift-ide-test -print-module -source-filename %s %clang-importer-sdk -target x86_64-apple-macosx10.9 -F %S/Inputs/mock-sdk -I %t -module-to-print=print_ast_tc_decls -synthesize-sugar-on-types=true -fully-qualified-types-if-ambiguous=true -print-implicit-attrs=true > %t.printed.txt +// RUN: %target-swift-ide-test -print-module -source-filename %s %clang-importer-sdk -F %S/Inputs/mock-sdk -I %t -module-to-print=print_ast_tc_decls -synthesize-sugar-on-types=true -fully-qualified-types-if-ambiguous=true -print-implicit-attrs=true > %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_PRINT_MODULE_INTERFACE -strict-whitespace < %t.printed.txt // RUN: FileCheck %s -check-prefix=PASS_QUAL_IF_AMBIGUOUS -strict-whitespace < %t.printed.txt // RUN: FileCheck %s -check-prefix=SYNTHESIZE_SUGAR_ON_TYPES -strict-whitespace < %t.printed.txt diff --git a/test/IDE/print_ast_tc_decls_errors.swift b/test/IDE/print_ast_tc_decls_errors.swift index c1442622ba073..c93f9f4b7f806 100644 --- a/test/IDE/print_ast_tc_decls_errors.swift +++ b/test/IDE/print_ast_tc_decls_errors.swift @@ -1,12 +1,12 @@ // Verify errors in this file to ensure that parse and type checker errors // occur where we expect them. -// RUN: %swift -parse -verify -show-diagnostics-after-fatal %s +// RUN: %target-parse-verify-swift -show-diagnostics-after-fatal %s -// RUN: %swift-ide-test -print-ast-typechecked -source-filename %s -prefer-type-repr=false > %t.printed.txt +// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -prefer-type-repr=false > %t.printed.txt // RUN: FileCheck %s -strict-whitespace < %t.printed.txt // RUN: FileCheck -check-prefix=NO-TYPEREPR %s -strict-whitespace < %t.printed.txt -// RUN: %swift-ide-test -print-ast-typechecked -source-filename %s -prefer-type-repr=true > %t.printed.txt +// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -prefer-type-repr=true > %t.printed.txt // RUN: FileCheck %s -strict-whitespace < %t.printed.txt // RUN: FileCheck -check-prefix=TYPEREPR %s -strict-whitespace < %t.printed.txt diff --git a/test/IDE/print_ast_tc_function_bodies.swift b/test/IDE/print_ast_tc_function_bodies.swift index 6307038b2c465..8af415005628e 100644 --- a/test/IDE/print_ast_tc_function_bodies.swift +++ b/test/IDE/print_ast_tc_function_bodies.swift @@ -1,10 +1,10 @@ // This file should not have any syntax or type checker errors. -// RUN: %swift -parse %s +// RUN: %target-parse-verify-swift -// RUN: %swift-ide-test -print-ast-typechecked -source-filename %s -function-definitions=true -prefer-type-repr=false > %t.printed.txt +// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -function-definitions=true -prefer-type-repr=false > %t.printed.txt // RUN: FileCheck %s -strict-whitespace < %t.printed.txt -// RUN: %swift-ide-test -print-ast-typechecked -source-filename %s -function-definitions=true -prefer-type-repr=true > %t.printed.txt +// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -function-definitions=true -prefer-type-repr=true > %t.printed.txt // RUN: FileCheck %s -strict-whitespace < %t.printed.txt struct FooStruct { diff --git a/test/IDE/print_clang_decls.swift b/test/IDE/print_clang_decls.swift index 4a53104aa0388..5c7a835fcd7ee 100644 --- a/test/IDE/print_clang_decls.swift +++ b/test/IDE/print_clang_decls.swift @@ -1,27 +1,24 @@ // RUN: rm -rf %t // RUN: mkdir -p %t + // This file deliberately does not use %clang-importer-sdk for most RUN lines. // Instead, it generates custom overlay modules itself, and uses -I %t when it // wants to use them. -// RUN: %swift -emit-module -o %t %clang-importer-sdk -target x86_64-apple-macosx10.9 %S/../Inputs/clang-importer-sdk/swift-modules/ObjectiveC.swift -// RUN: %swift -emit-module -o %t %clang-importer-sdk -target x86_64-apple-macosx10.9 %S/../Inputs/clang-importer-sdk/swift-modules/CoreGraphics.swift -// RUN: %swift -emit-module -o %t -I %t %clang-importer-sdk -target x86_64-apple-macosx10.9 %S/../Inputs/clang-importer-sdk/swift-modules/Foundation.swift -// RUN: %swift -emit-module -o %t -I %t %clang-importer-sdk -target x86_64-apple-macosx10.9 %S/../Inputs/clang-importer-sdk/swift-modules/AppKit.swift -// RUN: %swift-ide-test -print-module -source-filename %s -module-to-print=ctypes -sdk %S/../Inputs/clang-importer-sdk -I %t -target x86_64-apple-macosx10.9 -function-definitions=false -prefer-type-repr=true > %t.printed.txt +// RUN: %target-swift-frontend -emit-module -o %t %clang-importer-sdk %S/../Inputs/clang-importer-sdk/swift-modules/ObjectiveC.swift +// RUN: %target-swift-frontend -emit-module -o %t %clang-importer-sdk %S/../Inputs/clang-importer-sdk/swift-modules/CoreGraphics.swift +// RUN: %target-swift-frontend -emit-module -o %t -I %t %clang-importer-sdk %S/../Inputs/clang-importer-sdk/swift-modules/Foundation.swift +// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=ctypes -sdk %S/../Inputs/clang-importer-sdk -I %t -function-definitions=false -prefer-type-repr=true > %t.printed.txt // RUN: FileCheck %s -check-prefix=TAG_DECLS_AND_TYPEDEFS -strict-whitespace < %t.printed.txt // RUN: FileCheck %s -check-prefix=NEGATIVE -strict-whitespace < %t.printed.txt -// RUN: %swift-ide-test -print-module -source-filename %s -module-to-print=Foundation -sdk %S/../Inputs/clang-importer-sdk -I %t -target x86_64-apple-macosx10.9 -function-definitions=false -prefer-type-repr=true > %t.printed.txt +// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=Foundation -sdk %S/../Inputs/clang-importer-sdk -I %t -function-definitions=false -prefer-type-repr=true > %t.printed.txt // RUN: FileCheck %s -check-prefix=FOUNDATION -strict-whitespace < %t.printed.txt -// RUN: %swift-ide-test -print-module -source-filename %s -module-to-print=AppKit -sdk %S/../Inputs/clang-importer-sdk -I %t -target x86_64-apple-macosx10.9 -function-definitions=false -prefer-type-repr=true > %t.printed.txt -// RUN: FileCheck %s -check-prefix=APPKIT -strict-whitespace < %t.printed.txt - -// RUN: %swift-ide-test -print-module -source-filename %s -module-to-print=ctypes.bits -sdk %S/../Inputs/clang-importer-sdk -I %t -target x86_64-apple-macosx10.9 -function-definitions=false -prefer-type-repr=true > %t.printed.txt +// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=ctypes.bits -sdk %S/../Inputs/clang-importer-sdk -I %t -function-definitions=false -prefer-type-repr=true > %t.printed.txt // RUN: FileCheck %s -check-prefix=CTYPESBITS -strict-whitespace < %t.printed.txt -// RUN: %swift-ide-test -print-module -source-filename %s -module-to-print=nullability -sdk %S/../Inputs/clang-importer-sdk -I %t -target x86_64-apple-macosx10.9 -function-definitions=false -prefer-type-repr=true > %t.printed.txt +// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=nullability -sdk %S/../Inputs/clang-importer-sdk -I %t -function-definitions=false -prefer-type-repr=true > %t.printed.txt // RUN: FileCheck %s -check-prefix=CHECK-NULLABILITY -strict-whitespace < %t.printed.txt // TAG_DECLS_AND_TYPEDEFS: {{^}}struct FooStruct1 {{{$}} @@ -105,31 +102,6 @@ // FOUNDATION-NEXT: @availability(*, unavailable) // FOUNDATION-NEXT: NSSetZoneName(zone: NSZone, name: String) -// APPKIT-LABEL: {{^}}extension NSString {{{$}} - -// APPKIT-LABEL: {{^}}class NSView : NSObject, NSCoding, NSAccessibility, NSObjectProtocol {{{$}} -// APPKIT-NEXT: init?(coder aDecoder: NSCoder) -// APPKIT-NEXT: func isDescendantOf(aView: NSView) -> Bool -// APPKIT-NEXT: func ancestorSharedWithView(aView: NSView) -> NSView? -// APPKIT-NEXT: func addSubview(aView: NSView) -// APPKIT-NEXT: func addSubview(aView: NSView, positioned place: UInt32, relativeTo otherView: NSView?) -// APPKIT-NEXT: unowned(unsafe) var superview: @sil_unmanaged NSView? { get } -// APPKIT-NEXT: var layer: CALayer? -// APPKIT-NEXT: var trackingAreas: [AnyObject] { get } -// APPKIT-NEXT: var subviews: [AnyObject] -// APPKIT-LABEL: extension NSView { -// APPKIT-NEXT: unowned(unsafe) var nextKeyView: @sil_unmanaged NSView? - -// APPKIT-LABEL: {{^}}class NSMenuItem : NSObject, NSCopying, NSCoding { -// APPKIT-NEXT: unowned(unsafe) var menu: @sil_unmanaged NSMenu? -// APPKIT-NEXT: var title: String -// APPKIT-NEXT: @NSCopying var attributedTitle: NSAttributedString? -// APPKIT-NEXT: weak var target: @sil_weak AnyObject -// APPKIT-NEXT: var action: Selector -// APPKIT: {{^}}}{{$}} -// APPKIT: let NSViewFrameDidChangeNotification: String -// APPKIT: let NSViewFocusDidChangeNotification: String - // CTYPESBITS-NOT: FooStruct1 // CTYPESBITS: {{^}}typealias DWORD = Int32{{$}} // CTYPESBITS-NEXT: {{^}}var MY_INT: Int32 { get }{{$}} diff --git a/test/IDE/print_clang_decls_AppKit.swift b/test/IDE/print_clang_decls_AppKit.swift new file mode 100644 index 0000000000000..b69305578026f --- /dev/null +++ b/test/IDE/print_clang_decls_AppKit.swift @@ -0,0 +1,43 @@ +// RUN: rm -rf %t +// RUN: mkdir -p %t + +// This file deliberately does not use %clang-importer-sdk for most RUN lines. +// Instead, it generates custom overlay modules itself, and uses -I %t when it +// wants to use them. + +// REQUIRES: OS=macosx + +// RUN: %target-swift-frontend -emit-module -o %t %clang-importer-sdk %S/../Inputs/clang-importer-sdk/swift-modules/ObjectiveC.swift +// RUN: %target-swift-frontend -emit-module -o %t %clang-importer-sdk %S/../Inputs/clang-importer-sdk/swift-modules/CoreGraphics.swift +// RUN: %target-swift-frontend -emit-module -o %t -I %t %clang-importer-sdk %S/../Inputs/clang-importer-sdk/swift-modules/Foundation.swift +// RUN: %target-swift-frontend -emit-module -o %t -I %t %clang-importer-sdk %S/../Inputs/clang-importer-sdk/swift-modules/AppKit.swift + +// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=AppKit -sdk %S/../Inputs/clang-importer-sdk -I %t -function-definitions=false -prefer-type-repr=true > %t.printed.txt +// RUN: FileCheck %s -check-prefix=APPKIT -strict-whitespace < %t.printed.txt + +// APPKIT-LABEL: {{^}}extension NSString {{{$}} + +// APPKIT-LABEL: {{^}}class NSView : NSObject, NSCoding, NSAccessibility, NSObjectProtocol {{{$}} +// APPKIT-NEXT: init?(coder aDecoder: NSCoder) +// APPKIT-NEXT: func isDescendantOf(aView: NSView) -> Bool +// APPKIT-NEXT: func ancestorSharedWithView(aView: NSView) -> NSView? +// APPKIT-NEXT: func addSubview(aView: NSView) +// APPKIT-NEXT: func addSubview(aView: NSView, positioned place: UInt32, relativeTo otherView: NSView?) +// APPKIT-NEXT: unowned(unsafe) var superview: @sil_unmanaged NSView? { get } +// APPKIT-NEXT: var layer: CALayer? +// APPKIT-NEXT: var trackingAreas: [AnyObject] { get } +// APPKIT-NEXT: var subviews: [AnyObject] +// APPKIT-LABEL: extension NSView { +// APPKIT-NEXT: unowned(unsafe) var nextKeyView: @sil_unmanaged NSView? + +// APPKIT-LABEL: {{^}}class NSMenuItem : NSObject, NSCopying, NSCoding { +// APPKIT-NEXT: unowned(unsafe) var menu: @sil_unmanaged NSMenu? +// APPKIT-NEXT: var title: String +// APPKIT-NEXT: @NSCopying var attributedTitle: NSAttributedString? +// APPKIT-NEXT: weak var target: @sil_weak AnyObject +// APPKIT-NEXT: var action: Selector +// APPKIT: {{^}}}{{$}} +// APPKIT: let NSViewFrameDidChangeNotification: String +// APPKIT: let NSViewFocusDidChangeNotification: String + + diff --git a/test/IDE/print_clang_framework.swift b/test/IDE/print_clang_framework.swift index 363904ff0649b..e66cd95b9b5db 100644 --- a/test/IDE/print_clang_framework.swift +++ b/test/IDE/print_clang_framework.swift @@ -1,25 +1,32 @@ // RUN: rm -rf %t // RUN: mkdir -p %t -// RUN: %swift-ide-test -print-module -source-filename %s -module-to-print=Foo -F %S/Inputs/mock-sdk -function-definitions=false -print-regular-comments > %t/Foo.printed.txt +// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=Foo -F %S/Inputs/mock-sdk -function-definitions=false -print-regular-comments > %t/Foo.printed.txt // RUN: diff -u %t/Foo.printed.txt %S/Inputs/mock-sdk/Foo.printed.txt -// RUN: %swift-ide-test -print-module -source-filename %s -module-to-print=Foo -F %S/Inputs/mock-sdk -function-definitions=false -prefer-type-repr=true -module-print-submodules > %t/Foo.printed.recursive.txt +// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=Foo -F %S/Inputs/mock-sdk -function-definitions=false -prefer-type-repr=true -module-print-submodules > %t/Foo.printed.recursive.txt // RUN: diff -u %t/Foo.printed.recursive.txt %S/Inputs/mock-sdk/Foo.printed.recursive.txt -// RUN: %swift-ide-test -print-module -source-filename %s -module-to-print=Foo.FooSub -F %S/Inputs/mock-sdk -function-definitions=false -prefer-type-repr=true > %t/Foo.FooSub.printed.txt +// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=Foo.FooSub -F %S/Inputs/mock-sdk -function-definitions=false -prefer-type-repr=true > %t/Foo.FooSub.printed.txt // RUN: diff -u %t/Foo.FooSub.printed.txt %S/Inputs/mock-sdk/Foo.FooSub.printed.txt -// RUN: %swift-ide-test -print-module -source-filename %s -module-to-print=FooHelper -F %S/Inputs/mock-sdk -function-definitions=false -prefer-type-repr=true > %t/FooHelper.printed.txt +// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=FooHelper -F %S/Inputs/mock-sdk -function-definitions=false -prefer-type-repr=true > %t/FooHelper.printed.txt // RUN: diff -u %t/FooHelper.printed.txt %S/Inputs/mock-sdk/FooHelper.printed.txt -// RUN: %swift-ide-test -print-module -source-filename %s -module-to-print=FooHelper.FooHelperSub -F %S/Inputs/mock-sdk -function-definitions=false -prefer-type-repr=true > %t/FooHelper.FooHelperSub.printed.txt +// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=FooHelper.FooHelperSub -F %S/Inputs/mock-sdk -function-definitions=false -prefer-type-repr=true > %t/FooHelper.FooHelperSub.printed.txt // RUN: diff -u %t/FooHelper.FooHelperSub.printed.txt %S/Inputs/mock-sdk/FooHelper.FooHelperSub.printed.txt -// RUN: %swift-ide-test -print-module -source-filename %s -module-to-print=FooHelper.FooHelperExplicit -F %S/Inputs/mock-sdk -function-definitions=false -prefer-type-repr=true > %t/FooHelper.FooHelperExplicit.printed.txt +// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=FooHelper.FooHelperExplicit -F %S/Inputs/mock-sdk -function-definitions=false -prefer-type-repr=true > %t/FooHelper.FooHelperExplicit.printed.txt // RUN: diff -u %t/FooHelper.FooHelperExplicit.printed.txt %S/Inputs/mock-sdk/FooHelper.FooHelperExplicit.printed.txt -// RUN: %swift-ide-test -print-module -source-filename %s -module-to-print=Foo -F %S/Inputs/mock-sdk -function-definitions=false -prefer-type-repr=true -annotate-print > %t/Foo.annotated.txt +// RUN: %target-swift-ide-test -print-module -source-filename %s -module-to-print=Foo -F %S/Inputs/mock-sdk -function-definitions=false -prefer-type-repr=true -annotate-print > %t/Foo.annotated.txt // RUN: diff -u %t/Foo.annotated.txt %S/Inputs/mock-sdk/Foo.annotated.txt +// This test is in general platform-independent, but it happens to check +// printing of @availability attributes for OS X, and those are not printed on +// iOS. +// +// FIXME: split OS X parts into a separate test. +// +// REQUIRES: OS=macosx diff --git a/test/IDE/print_module_comments.swift b/test/IDE/print_module_comments.swift index f4794d69b67ca..bcb2195522420 100644 --- a/test/IDE/print_module_comments.swift +++ b/test/IDE/print_module_comments.swift @@ -2,8 +2,8 @@ // RUN: mkdir %t // // Build swift modules this test depends on. -// RUN: %swift -emit-module -target x86_64-apple-macosx10.9 %S/Inputs/foo_swift_module.swift -emit-module-path %t/foo_swift_module.swiftmodule -emit-module-doc-path %t/foo_swift_module.swiftdoc +// RUN: %target-swift-frontend -emit-module %S/Inputs/foo_swift_module.swift -emit-module-path %t/foo_swift_module.swiftmodule -emit-module-doc-path %t/foo_swift_module.swiftdoc // -// RUN: %swift-ide-test -print-module -source-filename %s -I %t -module-to-print=foo_swift_module > %t.printed.txt +// RUN: %target-swift-ide-test -print-module -source-filename %s -I %t -module-to-print=foo_swift_module > %t.printed.txt // RUN: diff %t.printed.txt %S/Inputs/foo_swift_module.printed.comments.txt diff --git a/test/IDE/print_stdlib.swift b/test/IDE/print_stdlib.swift index 2d02f7238e3a5..36fd331ba8e49 100644 --- a/test/IDE/print_stdlib.swift +++ b/test/IDE/print_stdlib.swift @@ -1,12 +1,12 @@ // Make sure we don't crash while printing the standard library. // -// RUN: %swift-ide-test -print-module -module-to-print=Swift -source-filename %s -accessibility-filter-public -skip-private-stdlib-decls -fully-qualified-types-if-ambiguous -synthesize-sugar-on-types > %t.txt +// RUN: %target-swift-ide-test -print-module -module-to-print=Swift -source-filename %s -accessibility-filter-public -skip-private-stdlib-decls -fully-qualified-types-if-ambiguous -synthesize-sugar-on-types > %t.txt // RUN: FileCheck -check-prefix=CHECK-ARGC %s < %t.txt // RUN: FileCheck %s < %t.txt // RUN: FileCheck -check-prefix=CHECK-SUGAR %s < %t.txt // RUN: FileCheck -check-prefix=CHECK-MUTATING-ATTR %s < %t.txt -// RUN: %swift-ide-test -print-module -module-to-print=Swift -source-filename %s -accessibility-filter-public -skip-private-stdlib-decls -fully-qualified-types-if-ambiguous -synthesize-sugar-on-types -print-regular-comments | FileCheck -check-prefix=NO-FIXMES %s -// RUN: %swift-ide-test -print-module -module-to-print=Swift -source-filename %s -module-print-submodules | FileCheck -check-prefix=CHECK-ARGC %s +// RUN: %target-swift-ide-test -print-module -module-to-print=Swift -source-filename %s -accessibility-filter-public -skip-private-stdlib-decls -fully-qualified-types-if-ambiguous -synthesize-sugar-on-types -print-regular-comments | FileCheck -check-prefix=NO-FIXMES %s +// RUN: %target-swift-ide-test -print-module -module-to-print=Swift -source-filename %s -module-print-submodules | FileCheck -check-prefix=CHECK-ARGC %s // CHECK-ARGC: static var argc: CInt { get } diff --git a/test/IDE/print_types.swift b/test/IDE/print_types.swift index e8de5e5a3f7ec..fe2258c9ffb83 100644 --- a/test/IDE/print_types.swift +++ b/test/IDE/print_types.swift @@ -1,8 +1,8 @@ // This file should not have any syntax or type checker errors. -// RUN: %swift -parse %s +// RUN: %target-parse-verify-swift -// RUN: %swift-ide-test -print-types -source-filename %s -fully-qualified-types=false | FileCheck %s -strict-whitespace -// RUN: %swift-ide-test -print-types -source-filename %s -fully-qualified-types=true | FileCheck %s -check-prefix=FULL -strict-whitespace +// RUN: %target-swift-ide-test -print-types -source-filename %s -fully-qualified-types=false | FileCheck %s -strict-whitespace +// RUN: %target-swift-ide-test -print-types -source-filename %s -fully-qualified-types=true | FileCheck %s -check-prefix=FULL -strict-whitespace typealias MyInt = Int // CHECK: TypeAliasDecl '''MyInt''' MyInt.Type{{$}} diff --git a/test/IDE/print_usrs.swift b/test/IDE/print_usrs.swift index 38245c032c1f5..a474491e6303c 100644 --- a/test/IDE/print_usrs.swift +++ b/test/IDE/print_usrs.swift @@ -1,5 +1,5 @@ -// RUN: %swift -parse -verify %clang-importer-sdk %s -// RUN: %swift-ide-test -print-usrs -source-filename %s %clang-importer-sdk | FileCheck %s -strict-whitespace +// RUN: %target-swift-frontend -parse -verify %clang-importer-sdk -disable-objc-attr-requires-foundation-module %s +// RUN: %target-swift-ide-test -print-usrs -source-filename %s %clang-importer-sdk | FileCheck %s -strict-whitespace import macros diff --git a/test/IDE/print_usrs_invalid.swift b/test/IDE/print_usrs_invalid.swift index 755d7d43c74ab..0ade41d26ad55 100644 --- a/test/IDE/print_usrs_invalid.swift +++ b/test/IDE/print_usrs_invalid.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -print-usrs -source-filename %s | FileCheck %s -strict-whitespace +// RUN: %target-swift-ide-test -print-usrs -source-filename %s | FileCheck %s -strict-whitespace // CHECK: [[@LINE+1]]:6 s:O14swift_ide_test11InvalidEnum{{$}} enum InvalidEnum { diff --git a/test/IDE/sdk_sugar.swift b/test/IDE/sdk_sugar.swift index cf5ff5ea1a45e..464f76a315e6a 100644 --- a/test/IDE/sdk_sugar.swift +++ b/test/IDE/sdk_sugar.swift @@ -1,9 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir -p %t -// RUN: %swift-ide-test -sdk %sdk -target %target-triple -print-module -module-print-submodules -module-to-print=Foundation -function-definitions=false -source-filename %s > %t/out 2>&1 +// RUN: %target-swift-ide-test -print-module -module-print-submodules -module-to-print=Foundation -function-definitions=false -source-filename %s > %t/out 2>&1 // RUN: FileCheck -input-file=%t/out %s // REQUIRES: sdk -// REQUIRES: OS=macosx import Foundation diff --git a/test/IRGen/Inputs/ObjectiveC.swift b/test/IRGen/Inputs/ObjectiveC.swift index 152c14504775f..00eed68020dba 100644 --- a/test/IRGen/Inputs/ObjectiveC.swift +++ b/test/IRGen/Inputs/ObjectiveC.swift @@ -2,12 +2,30 @@ @exported import ObjectiveC public struct ObjCBool : Printable { - private var value : UInt8 +#if os(OSX) || (os(iOS) && (arch(i386) || arch(arm))) + // On OS X and 32-bit iOS, Objective-C's BOOL type is a "signed char". + private var value: Int8 + + public init(_ value: Bool) { + self.value = value ? 1 : 0 + } /// \brief Allow use in a Boolean context. public var boolValue: Bool { return value != 0 } +#else + // Everywhere else it is C/C++'s "Bool" + private var value: Bool + + public init(_ value: Bool) { + self.value = value + } + + public var boolValue: Bool { + return value + } +#endif public var description: String { // Dispatch to Bool. @@ -21,11 +39,10 @@ public struct Selector { // Functions used to implicitly bridge ObjCBool types to Swift's Bool type. -internal func _convertBoolToObjCBool(x: Bool) -> ObjCBool { - return ObjCBool(value: x ? 1 : 0) +public func _convertBoolToObjCBool(x: Bool) -> ObjCBool { + return ObjCBool(x) } -internal func _convertObjCBoolToBool(x: ObjCBool) -> Bool { +public func _convertObjCBoolToBool(x: ObjCBool) -> Bool { return x.boolValue } - diff --git a/test/IRGen/abitypes.swift b/test/IRGen/abitypes.swift index 85559d7dc14af..2360ba5c8cab3 100644 --- a/test/IRGen/abitypes.swift +++ b/test/IRGen/abitypes.swift @@ -1,4 +1,4 @@ -// RUN: %target-build-swift -Xfrontend %clang-importer-sdk -I=%S/Inputs/abi %s -emit-ir | FileCheck -check-prefix=%target-cpu-%target-os %s +// RUN: %target-swift-frontend %clang-importer-sdk -I %S/Inputs/abi %s -emit-ir | FileCheck -check-prefix=%target-cpu-%target-os %s import gadget import Foundation @@ -13,22 +13,22 @@ import Foundation class Foo { // x86_64-macosx: define hidden void @_TFC8abitypes3Foo3barfS0_FT_VSC6MyRect(%VSC6MyRect* noalias sret, %C8abitypes3Foo*) { - // x86_64-macosx: define internal { <2 x float>, <2 x float> } @_TToFC8abitypes3Foo3barfS0_FT_VSC6MyRect(i8*, i8*) unnamed_addr { + // x86_64-macosx: define hidden { <2 x float>, <2 x float> } @_TToFC8abitypes3Foo3barfS0_FT_VSC6MyRect(i8*, i8*) unnamed_addr { // x86_64-ios: define hidden void @_TFC8abitypes3Foo3barfS0_FT_VSC6MyRect(%VSC6MyRect* noalias sret, %C8abitypes3Foo*) { - // x86_64-ios: define internal { <2 x float>, <2 x float> } @_TToFC8abitypes3Foo3barfS0_FT_VSC6MyRect(i8*, i8*) unnamed_addr { + // x86_64-ios: define hidden { <2 x float>, <2 x float> } @_TToFC8abitypes3Foo3barfS0_FT_VSC6MyRect(i8*, i8*) unnamed_addr { // i386-ios: define hidden void @_TFC8abitypes3Foo3barfS0_FT_VSC6MyRect(%VSC6MyRect* noalias sret, %C8abitypes3Foo*) { - // i386-ios: define internal void @_TToFC8abitypes3Foo3barfS0_FT_VSC6MyRect(%VSC6MyRect* noalias sret, i8*, i8*) unnamed_addr { + // i386-ios: define hidden void @_TToFC8abitypes3Foo3barfS0_FT_VSC6MyRect(%VSC6MyRect* noalias sret, i8*, i8*) unnamed_addr { // armv7-ios: define hidden void @_TFC8abitypes3Foo3barfS0_FT_VSC6MyRect(%VSC6MyRect* noalias sret, %C8abitypes3Foo*) { - // armv7-ios: define internal void @_TToFC8abitypes3Foo3barfS0_FT_VSC6MyRect(%VSC6MyRect* noalias sret, i8*, i8*) unnamed_addr { + // armv7-ios: define hidden void @_TToFC8abitypes3Foo3barfS0_FT_VSC6MyRect(%VSC6MyRect* noalias sret, i8*, i8*) unnamed_addr { // arm64-ios: define hidden { float, float, float, float } @_TFC8abitypes3Foo3barfS0_FT_VSC6MyRect(%C8abitypes3Foo*) { - // arm64-ios: define internal [[ARM64MYRECT]] @_TToFC8abitypes3Foo3barfS0_FT_VSC6MyRect(i8*, i8*) unnamed_addr { + // arm64-ios: define hidden [[ARM64MYRECT]] @_TToFC8abitypes3Foo3barfS0_FT_VSC6MyRect(i8*, i8*) unnamed_addr { dynamic func bar() -> MyRect { return MyRect(x: 1, y: 2, width: 3, height: 4) } // x86_64-macosx: define hidden double @_TFC8abitypes3Foo14getXFromNSRect{{.*}}(double, double, double, double, %C8abitypes3Foo*) { - // x86_64-macosx: define internal double @_TToFC8abitypes3Foo14getXFromNSRect{{.*}}(i8*, i8*, %VSC6CGRect* byval align 8) unnamed_addr { + // x86_64-macosx: define hidden double @_TToFC8abitypes3Foo14getXFromNSRect{{.*}}(i8*, i8*, %VSC6CGRect* byval align 8) unnamed_addr { // armv7-ios: define hidden double @_TFC8abitypes3Foo14getXFromNSRect{{.*}}(float, float, float, float, %C8abitypes3Foo*) { // armv7-ios: define internal double @_TToFC8abitypes3Foo14getXFromNSRect{{.*}}(i8*, i8*, [4 x i32]) unnamed_addr { dynamic func getXFromNSRect(r: NSRect) -> Double { @@ -36,7 +36,7 @@ class Foo { } // x86_64-macosx: define hidden float @_TFC8abitypes3Foo12getXFromRect{{.*}}(float, float, float, float, %C8abitypes3Foo*) { - // x86_64-macosx: define internal float @_TToFC8abitypes3Foo12getXFromRect{{.*}}(i8*, i8*, <2 x float>, <2 x float>) unnamed_addr { + // x86_64-macosx: define hidden float @_TToFC8abitypes3Foo12getXFromRect{{.*}}(i8*, i8*, <2 x float>, <2 x float>) unnamed_addr { // armv7-ios: define hidden float @_TFC8abitypes3Foo12getXFromRect{{.*}}(float, float, float, float, %C8abitypes3Foo*) { // armv7-ios: define internal float @_TToFC8abitypes3Foo12getXFromRect{{.*}}(i8*, i8*, [4 x i32]) unnamed_addr { dynamic func getXFromRect(r: MyRect) -> Float { @@ -66,8 +66,8 @@ class Foo { return getXFromRect(r) } - // Ensure that MyRect is passed as an indirect-byval on x86-64 because we run out of registers for direct arguments - // x86_64-macosx: define internal float @_TToFC8abitypes3Foo25getXFromRectIndirectByVal{{.*}}(i8*, i8*, float, float, float, float, float, float, float, %VSC6MyRect* byval align 4) unnamed_addr { + // Ensure that MyRect is passed as an indirect-byval on x86_64 because we run out of registers for direct arguments + // x86_64-macosx: define hidden float @_TToFC8abitypes3Foo25getXFromRectIndirectByVal{{.*}}(i8*, i8*, float, float, float, float, float, float, float, %VSC6MyRect* byval align 4) unnamed_addr { dynamic func getXFromRectIndirectByVal(_: Float, second _: Float, third _: Float, fourth _: Float, fifth _: Float, sixth _: Float, @@ -86,7 +86,7 @@ class Foo { return getXFromRectIndirectByVal(f, second: f, third: f, fourth: f, fifth: f, sixth: f, seventh: f, withRect: r); } - // x86-64 returns an HA of four floats directly in two <2 x float> + // x86_64 returns an HA of four floats directly in two <2 x float> // x86_64-macosx: define hidden float @_TFC8abitypes3Foo4barc{{.*}}(%CSo13StructReturns*, %C8abitypes3Foo*) { // x86_64-macosx: load i8** @"\01L_selector(newRect)", align 8 // x86_64-macosx: [[RESULT:%.*]] = call { <2 x float>, <2 x float> } bitcast (void ()* @objc_msgSend @@ -108,7 +108,7 @@ class Foo { } // x86_64-macosx: define hidden { double, double, double } @_TFC8abitypes3Foo3baz{{.*}}(%C8abitypes3Foo*) { - // x86_64-macosx: define internal void @_TToFC8abitypes3Foo3baz{{.*}}(%VSC4Trio* noalias sret, i8*, i8*) unnamed_addr { + // x86_64-macosx: define hidden void @_TToFC8abitypes3Foo3baz{{.*}}(%VSC4Trio* noalias sret, i8*, i8*) unnamed_addr { dynamic func baz() -> Trio { return Trio(i: 1.0, j: 2.0, k: 3.0) } @@ -131,7 +131,7 @@ class Foo { return p.newPair() } - // x86_64-macosx: define internal i64 @_TToFC8abitypes3Foo8takepair{{.*}}(i8*, i8*, i64) unnamed_addr { + // x86_64-macosx: define hidden i64 @_TToFC8abitypes3Foo8takepair{{.*}}(i8*, i8*, i64) unnamed_addr { dynamic func takepair(p: IntPair) -> IntPair { return p } @@ -146,7 +146,7 @@ class Foo { return p.newNestedInts() } - // x86_64-macosx: define internal i8* @_TToFC8abitypes3Foo9copyClass{{.*}}(i8*, i8*, i8*) unnamed_addr { + // x86_64-macosx: define hidden i8* @_TToFC8abitypes3Foo9copyClass{{.*}}(i8*, i8*, i8*) unnamed_addr { // x86_64-macosx: [[VALUE:%[0-9]+]] = call [[TYPE:%.*]]* @_TFC8abitypes3Foo9copyClass // x86_64-macosx: [[T0:%.*]] = phi [[TYPE]]* [ [[VALUE]], // x86_64-macosx: [[T1:%.*]] = bitcast [[TYPE]]* [[T0]] to [[OBJC:%objc_class]]* @@ -156,7 +156,7 @@ class Foo { return a } - // x86_64-macosx: define internal i8* @_TToFC8abitypes3Foo9copyProto{{.*}}(i8*, i8*, i8*) unnamed_addr { + // x86_64-macosx: define hidden i8* @_TToFC8abitypes3Foo9copyProto{{.*}}(i8*, i8*, i8*) unnamed_addr { // x86_64-macosx: [[VALUE:%[0-9]+]] = call [[TYPE:%.*]] @_TFC8abitypes3Foo9copyProt // x86_64-macosx: [[RESULT:%[0-9]+]] = bitcast [[TYPE]] [[VALUE]] to i8* // x86_64-macosx: ret i8* [[RESULT]] @@ -164,7 +164,7 @@ class Foo { return a } - // x86_64-macosx: define internal i8* @_TToFC8abitypes3Foo13copyProtoComp{{.*}}(i8*, i8*, i8*) unnamed_addr { + // x86_64-macosx: define hidden i8* @_TToFC8abitypes3Foo13copyProtoComp{{.*}}(i8*, i8*, i8*) unnamed_addr { // x86_64-macosx: [[VALUE:%[0-9]+]] = call [[TYPE:%.*]] @_TFC8abitypes3Foo13copyProtoComp // x86_64-macosx: [[RESULT:%[0-9]+]] = bitcast [[TYPE]] [[VALUE]] to i8* // x86_64-macosx: ret i8* [[RESULT]] @@ -173,7 +173,7 @@ class Foo { } // x86_64-macosx: define hidden i1 @_TFC8abitypes3Foo6negate{{.*}}(i1, %C8abitypes3Foo*) { - // x86_64-macosx: define internal signext i8 @_TToFC8abitypes3Foo6negate{{.*}}(i8*, i8*, i8 signext) unnamed_addr { + // x86_64-macosx: define hidden signext i8 @_TToFC8abitypes3Foo6negate{{.*}}(i8*, i8*, i8 signext) unnamed_addr { // x86_64-macosx: [[R1:%[0-9]+]] = call i1 @_TF10ObjectiveC22_convertObjCBoolToBool // x86_64-macosx: [[R2:%[0-9]+]] = call i1 @_TFC8abitypes3Foo6negate // x86_64-macosx: [[R3:%[0-9]+]] = call i8 @_TF10ObjectiveC22_convertBoolToObjCBool{{.*}}(i1 [[R2]] @@ -215,7 +215,7 @@ class Foo { // x86_64-macosx: [[TOBOOL:%[0-9]+]] = call i1 @_TF10ObjectiveC22_convertObjCBoolToBool{{.*}}(i8 [[NEG]]) // x86_64-macosx: ret i1 [[TOBOOL]] // - // x86_64-macosx: define internal signext i8 @_TToFC8abitypes3Foo7negate2{{.*}}(i8*, i8*, i8 signext) + // x86_64-macosx: define hidden signext i8 @_TToFC8abitypes3Foo7negate2{{.*}}(i8*, i8*, i8 signext) // x86_64-macosx: [[TOBOOL:%[0-9]+]] = call i1 @_TF10ObjectiveC22_convertObjCBoolToBool // x86_64-macosx: [[NEG:%[0-9]+]] = call i1 @_TFC8abitypes3Foo7negate2{{.*}}(i1 [[TOBOOL]] // x86_64-macosx: [[TOOBJCBOOL:%[0-9]+]] = call i8 @_TF10ObjectiveC22_convertBoolToObjCBool{{.*}}(i1 [[NEG]]) @@ -226,7 +226,7 @@ class Foo { // x86_64-ios: [[NEG:%[0-9]+]] = call i1 bitcast (void ()* @objc_msgSend to i1 ([[RECEIVER:.*]]*, i8*, i1)*)([[RECEIVER]]* {{%[0-9]+}}, i8* [[SEL]], i1 %0) // x86_64-ios: ret i1 [[NEG]] // - // x86_64-ios: define internal zeroext i1 @_TToFC8abitypes3Foo7negate2{{.*}}(i8*, i8*, i1 zeroext) + // x86_64-ios: define hidden zeroext i1 @_TToFC8abitypes3Foo7negate2{{.*}}(i8*, i8*, i1 zeroext) // x86_64-ios: [[NEG:%[0-9]+]] = call i1 @_TFC8abitypes3Foo7negate2{{.*}}(i1 // x86_64-ios: [[TOOBJCBOOL:%[0-9]+]] = call i1 @_TF10ObjectiveC22_convertBoolToObjCBool{{.*}}(i1 [[NEG]]) // x86_64-ios: ret i1 [[TOOBJCBOOL]] @@ -249,7 +249,7 @@ class Foo { // arm64-ios: [[NEG:%[0-9]+]] = call i1 bitcast (void ()* @objc_msgSend to i1 ([[RECEIVER:.*]]*, i8*, i1)*)([[RECEIVER]]* {{%[0-9]+}}, i8* [[SEL]], i1 %0) // arm64-ios: ret i1 [[NEG]] // - // arm64-ios: define internal zeroext i1 @_TToFC8abitypes3Foo7negate2{{.*}}(i8*, i8*, i1 zeroext) + // arm64-ios: define hidden zeroext i1 @_TToFC8abitypes3Foo7negate2{{.*}}(i8*, i8*, i1 zeroext) // arm64-ios: [[NEG:%[0-9]+]] = call i1 @_TFC8abitypes3Foo7negate2{{.*}}(i1 // arm64-ios: [[TOOBJCBOOL:%[0-9]+]] = call i1 @_TF10ObjectiveC22_convertBoolToObjCBool{{.*}}(i1 [[NEG]]) // arm64-ios: ret i1 [[TOOBJCBOOL]] @@ -261,7 +261,7 @@ class Foo { // i386-ios: [[TOBOOL:%[0-9]+]] = call i1 @_TF10ObjectiveC22_convertObjCBoolToBool{{.*}}(i8 [[NEG]]) // i386-ios: ret i1 [[TOBOOL]] // - // i386-ios: define internal signext i8 @_TToFC8abitypes3Foo7negate2{{.*}}(i8*, i8*, i8 signext) + // i386-ios: define hidden signext i8 @_TToFC8abitypes3Foo7negate2{{.*}}(i8*, i8*, i8 signext) // i386-ios: [[TOBOOL:%[0-9]+]] = call i1 @_TF10ObjectiveC22_convertObjCBoolToBool // i386-ios: [[NEG:%[0-9]+]] = call i1 @_TFC8abitypes3Foo7negate2{{.*}}(i1 [[TOBOOL]] // i386-ios: [[TOOBJCBOOL:%[0-9]+]] = call i8 @_TF10ObjectiveC22_convertBoolToObjCBool{{.*}}(i1 [[NEG]]) @@ -272,17 +272,17 @@ class Foo { return g.negate(b) } - // x86_64-macosx: define internal i32* @_TToFC8abitypes3Foo24copyUnsafeMutablePointer{{.*}}(i8*, i8*, i32*) unnamed_addr { + // x86_64-macosx: define hidden i32* @_TToFC8abitypes3Foo24copyUnsafeMutablePointer{{.*}}(i8*, i8*, i32*) unnamed_addr { dynamic func copyUnsafeMutablePointer(p: UnsafeMutablePointer) -> UnsafeMutablePointer { return p } - // x86_64-macosx: define internal i64 @_TToFC8abitypes3Foo17returnNSEnumValue{{.*}}(i8*, i8*) unnamed_addr { + // x86_64-macosx: define hidden i64 @_TToFC8abitypes3Foo17returnNSEnumValue{{.*}}(i8*, i8*) unnamed_addr { dynamic func returnNSEnumValue() -> NSByteCountFormatterCountStyle { return .File } - // x86_64-macosx: define internal zeroext i16 @_TToFC8abitypes3Foo20returnOtherEnumValue{{.*}}(i8*, i8*, i16 zeroext) unnamed_addr { + // x86_64-macosx: define hidden zeroext i16 @_TToFC8abitypes3Foo20returnOtherEnumValue{{.*}}(i8*, i8*, i16 zeroext) unnamed_addr { dynamic func returnOtherEnumValue(choice: ChooseTo) -> ChooseTo { switch choice { case .TakeIt: return .LeaveIt @@ -291,7 +291,7 @@ class Foo { } // x86_64-macosx: define hidden i32 @_TFC8abitypes3Foo10getRawEnum{{.*}}(%C8abitypes3Foo*) { - // x86_64-macosx: define internal i32 @_TToFC8abitypes3Foo10getRawEnum{{.*}}(i8*, i8*) unnamed_addr { + // x86_64-macosx: define hidden i32 @_TToFC8abitypes3Foo10getRawEnum{{.*}}(i8*, i8*) unnamed_addr { dynamic func getRawEnum() -> RawEnum { return Intergalactic } @@ -301,7 +301,7 @@ class Foo { self.work = work } - // x86_64-macosx: define internal void @_TToFC8abitypes3Foo13testArchetypef{{.*}}(i8*, i8*, i8*) unnamed_addr { + // x86_64-macosx: define hidden void @_TToFC8abitypes3Foo13testArchetypef{{.*}}(i8*, i8*, i8*) unnamed_addr { dynamic func testArchetype(work: Work) { work.doStuff(1) // x86_64-macosx: [[OBJCPTR:%.*]] = bitcast i8* %2 to %objc_object* @@ -322,7 +322,7 @@ class Foo { } // arm64-ios: define hidden void @_TFC8abitypes3Foo14callJustReturn{{.*}}(%VSC9BigStruct* noalias sret, %CSo13StructReturns*, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, %C8abitypes3Foo*) { - // arm64-ios: define internal void @_TToFC8abitypes3Foo14callJustReturnfS0_FTCSo13StructReturns4withVSC9BigStruct_S2_(%VSC9BigStruct* noalias sret, i8*, i8*, [[OPAQUE:.*]]*, %VSC9BigStruct*) unnamed_addr { + // arm64-ios: define hidden void @_TToFC8abitypes3Foo14callJustReturnfS0_FTCSo13StructReturns4withVSC9BigStruct_S2_(%VSC9BigStruct* noalias sret, i8*, i8*, [[OPAQUE:.*]]*, %VSC9BigStruct*) unnamed_addr { dynamic func callJustReturn(r: StructReturns, with v: BigStruct) -> BigStruct { return r.justReturn(v) } @@ -337,7 +337,7 @@ class Foo { // armv7-ios: define internal void @makeOne(%struct.One* noalias sret %agg.result, float %f, float %s) // rdar://17631440 - Expand direct arguments that are coerced to aggregates. -// x86_64-macosx: define hidden float @_TF8abitypes13testInlineAggFVSC6MyRectSf(float, float, float, float) { +// x86_64-macosx: define float @_TF8abitypes13testInlineAggFVSC6MyRectSf(float, float, float, float) { // x86_64-macosx: [[COERCED:%.*]] = alloca %VSC6MyRect, align 4 // x86_64-macosx: store float %0, // x86_64-macosx: store float %1, @@ -350,6 +350,6 @@ class Foo { // x86_64-macosx: [[SECOND_HALF:%.*]] = load <2 x float>* [[T0]], align 4 // x86_64-macosx: [[RESULT:%.*]] = call float @MyRect_Area(<2 x float> [[FIRST_HALF]], <2 x float> [[SECOND_HALF]]) // x86_64-macosx: ret float [[RESULT]] -func testInlineAgg(rect: MyRect) -> Float { +public func testInlineAgg(rect: MyRect) -> Float { return MyRect_Area(rect) } diff --git a/test/IRGen/alloc.sil b/test/IRGen/alloc.sil index 8b99159cced7d..5062d267c765f 100644 --- a/test/IRGen/alloc.sil +++ b/test/IRGen/alloc.sil @@ -1,4 +1,12 @@ -// RUN: %target-build-swift %s -emit-ir -o - | FileCheck %s +// RUN: %swift -target x86_64-apple-macosx10.9 -module-name main %s -emit-ir -o - | FileCheck %s +// RUN: %swift -target i386-apple-ios7.0 %s -module-name main -emit-ir -o - | FileCheck %s +// RUN: %swift -target x86_64-apple-ios7.0 %s -module-name main -emit-ir -o - | FileCheck %s +// RUN: %swift -target armv7-apple-ios7.0 %s -module-name main -emit-ir -o - | FileCheck %s +// RUN: %swift -target arm64-apple-ios7.0 %s -module-name main -emit-ir -o - | FileCheck %s +// RUN: %swift -target x86_64-unknown-linux-gnu %s -disable-objc-interop -module-name main -emit-ir -o - | FileCheck %s + +// REQUIRES: X86 +// REQUIRES: ARM import Builtin diff --git a/test/IRGen/array_value_witnesses.sil b/test/IRGen/array_value_witnesses.sil index 39f79546e40d0..faeb542f9faa9 100644 --- a/test/IRGen/array_value_witnesses.sil +++ b/test/IRGen/array_value_witnesses.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 import Swift @@ -17,7 +19,7 @@ struct SomeWeak { weak var y: C? } -// CHECK: @_TWVV21array_value_witnesses3POD = +// CHECK: @_TWVV21array_value_witnesses3POD = // CHECK-NOT: @_TwXxV21array_value_witnesses3POD // CHECK: @__swift_noop_void_return // CHECK-NOT: @_TwCcV21array_value_witnesses3POD @@ -27,7 +29,7 @@ struct SomeWeak { // CHECK-NOT: @_TwtTV21array_value_witnesses3POD // CHECK: @__swift_memmove_array8_8 -// CHECK: @_TWVV21array_value_witnesses14BitwiseTakable = +// CHECK: @_TWVV21array_value_witnesses14BitwiseTakable = // CHECK: @_TwXxV21array_value_witnesses14BitwiseTakable // CHECK: @_TwCcV21array_value_witnesses14BitwiseTakable // CHECK-NOT: @_TwTtV21array_value_witnesses14BitwiseTakable diff --git a/test/IRGen/asmname.swift b/test/IRGen/asmname.swift index c7aa430bbb232..06db143729181 100644 --- a/test/IRGen/asmname.swift +++ b/test/IRGen/asmname.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 @asmname("atan2") func atan2test(a: Double, b: Double) -> Double diff --git a/test/IRGen/assert_conf_default.sil b/test/IRGen/assert_conf_default.sil index bd511a390ca2f..8bc938cf2618c 100644 --- a/test/IRGen/assert_conf_default.sil +++ b/test/IRGen/assert_conf_default.sil @@ -1,6 +1,6 @@ -// RUN: %swift -assert-config DisableReplacement -emit-ir %s | FileCheck %s --check-prefix=DISABLED -// RUN: %swift -assert-config Release -emit-ir %s | FileCheck %s --check-prefix=RELEASE -// RUN: %swift -assert-config Debug -emit-ir %s | FileCheck %s --check-prefix=DEBUG +// RUN: %target-swift-frontend -assert-config DisableReplacement -emit-ir %s | FileCheck %s --check-prefix=DISABLED +// RUN: %target-swift-frontend -assert-config Release -emit-ir %s | FileCheck %s --check-prefix=RELEASE +// RUN: %target-swift-frontend -assert-config Debug -emit-ir %s | FileCheck %s --check-prefix=DEBUG import Builtin diff --git a/test/IRGen/associated_types.swift b/test/IRGen/associated_types.swift index 4147a010ff9cc..0526c3d2e424b 100644 --- a/test/IRGen/associated_types.swift +++ b/test/IRGen/associated_types.swift @@ -1,4 +1,7 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 -primary-file %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir -primary-file %s | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 + protocol Runcer { typealias Runcee } diff --git a/test/IRGen/autorelease.sil b/test/IRGen/autorelease.sil index 12edd812c8d51..8284d87461b82 100644 --- a/test/IRGen/autorelease.sil +++ b/test/IRGen/autorelease.sil @@ -1,4 +1,4 @@ -// RUN: %target-build-swift -Xfrontend %clang-importer-sdk %s -emit-ir | FileCheck -check-prefix=%target-cpu %s +// RUN: %target-swift-frontend %clang-importer-sdk %s -emit-ir | FileCheck -check-prefix=%target-cpu %s // rdar://16565958 diff --git a/test/IRGen/bitcast.sil b/test/IRGen/bitcast.sil index 323ac02a2cdd4..13eab84a4f8a9 100644 --- a/test/IRGen/bitcast.sil +++ b/test/IRGen/bitcast.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -emit-ir %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s + +// REQUIRES: CPU=i386_or_x86_64 sil_stage canonical @@ -6,30 +8,49 @@ import Swift class C {} -// CHECK-LABEL: define i64 @bitcast_trivial(%C7bitcast1C*) { -// CHECK: [[BUF:%.*]] = alloca %C7bitcast1C*, align 8 -// CHECK: store %C7bitcast1C* %0, %C7bitcast1C** [[BUF]] -// CHECK: [[OUT_BUF:%.*]] = bitcast %C7bitcast1C** [[BUF]] to %Si* -// CHECK: [[VALUE_BUF:%.*]] = getelementptr inbounds %Si* [[OUT_BUF]], i32 0, i32 0 -// CHECK: [[VALUE:%.*]] = load i64* [[VALUE_BUF]], align 8 -// CHECK: ret i64 [[VALUE]] -// CHECK: } +// CHECK-i386-LABEL: define i32 @bitcast_trivial(%C7bitcast1C*) { +// CHECK-i386: [[BUF:%.*]] = alloca %C7bitcast1C*, align 4 +// CHECK-i386: store %C7bitcast1C* %0, %C7bitcast1C** [[BUF]] +// CHECK-i386: [[OUT_BUF:%.*]] = bitcast %C7bitcast1C** [[BUF]] to %Si* +// CHECK-i386: [[VALUE_BUF:%.*]] = getelementptr inbounds %Si* [[OUT_BUF]], i32 0, i32 0 +// CHECK-i386: [[VALUE:%.*]] = load i32* [[VALUE_BUF]], align 4 +// CHECK-i386: ret i32 [[VALUE]] +// CHECK-i386: } + +// CHECK-x86_64-LABEL: define i64 @bitcast_trivial(%C7bitcast1C*) { +// CHECK-x86_64: [[BUF:%.*]] = alloca %C7bitcast1C*, align 8 +// CHECK-x86_64: store %C7bitcast1C* %0, %C7bitcast1C** [[BUF]] +// CHECK-x86_64: [[OUT_BUF:%.*]] = bitcast %C7bitcast1C** [[BUF]] to %Si* +// CHECK-x86_64: [[VALUE_BUF:%.*]] = getelementptr inbounds %Si* [[OUT_BUF]], i32 0, i32 0 +// CHECK-x86_64: [[VALUE:%.*]] = load i64* [[VALUE_BUF]], align 8 +// CHECK-x86_64: ret i64 [[VALUE]] +// CHECK-x86_64: } sil @bitcast_trivial: $@thin (C) -> Int { entry(%c : $C): %i = unchecked_trivial_bit_cast %c : $C to $Int return %i : $Int } -// CHECK-LABEL: define i64 @bitcast_ref(%C7bitcast1C*) { -// CHECK: [[BUF:%.*]] = alloca %C7bitcast1C*, align 8 -// CHECK: store %C7bitcast1C* %0, %C7bitcast1C** [[BUF]] -// CHECK: [[OUT_BUF:%.*]] = bitcast %C7bitcast1C** [[BUF]] to %Sq* -// CHECK: [[VALUE_BUF:%.*]] = bitcast %Sq* [[OUT_BUF]] to i64* -// CHECK: [[VALUE:%.*]] = load i64* [[VALUE_BUF]], align 8 -// CHECK: ret i64 [[VALUE]] -// CHECK: } +// CHECK-i386-LABEL: define i32 @bitcast_ref(%C7bitcast1C*) { +// CHECK-i386: [[BUF:%.*]] = alloca %C7bitcast1C*, align 4 +// CHECK-i386: store %C7bitcast1C* %0, %C7bitcast1C** [[BUF]] +// CHECK-i386: [[OUT_BUF:%.*]] = bitcast %C7bitcast1C** [[BUF]] to %Sq* +// CHECK-i386: [[VALUE_BUF:%.*]] = bitcast %Sq* [[OUT_BUF]] to i32* +// CHECK-i386: [[VALUE:%.*]] = load i32* [[VALUE_BUF]], align 4 +// CHECK-i386: ret i32 [[VALUE]] +// CHECK-i386: } + +// CHECK-x86_64-LABEL: define i64 @bitcast_ref(%C7bitcast1C*) { +// CHECK-x86_64: [[BUF:%.*]] = alloca %C7bitcast1C*, align 8 +// CHECK-x86_64: store %C7bitcast1C* %0, %C7bitcast1C** [[BUF]] +// CHECK-x86_64: [[OUT_BUF:%.*]] = bitcast %C7bitcast1C** [[BUF]] to %Sq* +// CHECK-x86_64: [[VALUE_BUF:%.*]] = bitcast %Sq* [[OUT_BUF]] to i64* +// CHECK-x86_64: [[VALUE:%.*]] = load i64* [[VALUE_BUF]], align 8 +// CHECK-x86_64: ret i64 [[VALUE]] +// CHECK-x86_64: } sil @bitcast_ref: $@thin (C) -> Optional { entry(%c : $C): %o = unchecked_ref_bit_cast %c : $C to $Optional return %o : $Optional } + diff --git a/test/IRGen/bitcast_different_size.sil b/test/IRGen/bitcast_different_size.sil index 4b9cc4f50437a..818b1179fac4f 100644 --- a/test/IRGen/bitcast_different_size.sil +++ b/test/IRGen/bitcast_different_size.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -emit-ir %s -verify | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s -verify | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 sil_stage canonical diff --git a/test/IRGen/bitcast_specialization.swift b/test/IRGen/bitcast_specialization.swift index 549cf7c25eb44..240b6cf12c14f 100644 --- a/test/IRGen/bitcast_specialization.swift +++ b/test/IRGen/bitcast_specialization.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-object -target x86_64-apple-macosx10.9 -O %s +// RUN: %target-swift-frontend -emit-object -O %s // This is a compile-only test. It checks that the compiler does not crash for // a (not executed) bitcast with different sizes. This appears in the diff --git a/test/IRGen/boxes.sil b/test/IRGen/boxes.sil index a5742f686c73f..3521fd1bf2e60 100644 --- a/test/IRGen/boxes.sil +++ b/test/IRGen/boxes.sil @@ -1,4 +1,12 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -emit-ir %s | FileCheck %s +// RUN: %swift -target x86_64-apple-macosx10.9 -module-name main %s -emit-ir -o - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 %s +// RUN: %swift -target i386-apple-ios7.0 %s -module-name main -emit-ir -o - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-32 %s +// RUN: %swift -target x86_64-apple-ios7.0 %s -module-name main -emit-ir -o - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 %s +// RUN: %swift -target armv7-apple-ios7.0 %s -module-name main -emit-ir -o - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-32 %s +// RUN: %swift -target arm64-apple-ios7.0 %s -module-name main -emit-ir -o - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 %s +// RUN: %swift -target x86_64-unknown-linux-gnu -disable-objc-interop %s -module-name main -emit-ir -o - | FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 %s + +// REQUIRES: X86 +// REQUIRES: ARM import Builtin @@ -16,9 +24,13 @@ entry: return undef : $() } -// CHECK-LABEL: define void @fixed_box_alloc_dealloc() -// CHECK: [[BOX:%.*]] = call noalias %swift.refcounted* @swift_allocObject(%swift.type* getelementptr inbounds (%swift.full_heapmetadata* @metadata, i32 0, i32 2), i64 24, i64 7) -// CHECK: call void @swift_deallocObject(%swift.refcounted* [[BOX]], i64 24, i64 7) +// CHECK-32-LABEL: define void @fixed_box_alloc_dealloc() +// CHECK-32: [[BOX:%.*]] = call noalias %swift.refcounted* @swift_allocObject(%swift.type* getelementptr inbounds (%swift.full_heapmetadata* @metadata, i32 0, i32 2), i32 16, i32 3) +// CHECK-32: call void @swift_deallocObject(%swift.refcounted* [[BOX]], i32 16, i32 3) + +// CHECK-64-LABEL: define void @fixed_box_alloc_dealloc() +// CHECK-64: [[BOX:%.*]] = call noalias %swift.refcounted* @swift_allocObject(%swift.type* getelementptr inbounds (%swift.full_heapmetadata* @metadata, i32 0, i32 2), i64 24, i64 7) +// CHECK-64: call void @swift_deallocObject(%swift.refcounted* [[BOX]], i64 24, i64 7) sil @fixed_box_alloc_dealloc : $@thin () -> () { entry: %b = alloc_box $Builtin.Word diff --git a/test/IRGen/bridge_object.sil b/test/IRGen/bridge_object.sil index 2ff632c82a953..340bbffe80fe6 100644 --- a/test/IRGen/bridge_object.sil +++ b/test/IRGen/bridge_object.sil @@ -1,6 +1,6 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck --check-prefix=X86_64 %s -// RUN: %swift -emit-ir -target arm64-apple-ios8.0 %s | FileCheck --check-prefix=ARM64 %s -// RUN: %swift -emit-ir -target armv7-apple-ios8.0 %s | FileCheck --check-prefix=ARMV7 %s +// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck --check-prefix=X86_64 %s +// RUN: %swift -emit-ir -target arm64-apple-ios8.0 %s | FileCheck --check-prefix=ARM64 %s +// RUN: %swift -emit-ir -target armv7-apple-ios8.0 %s | FileCheck --check-prefix=ARMV7 %s sil_stage canonical diff --git a/test/IRGen/builtin_word.sil b/test/IRGen/builtin_word.sil index 7d7dff81e5bec..f5feefca526af 100644 --- a/test/IRGen/builtin_word.sil +++ b/test/IRGen/builtin_word.sil @@ -1,7 +1,8 @@ // RUN: %swift -target x86_64-apple-macosx10.9 %s -gnone -emit-ir -o - | FileCheck %s -check-prefix=INTEL -// REQUIRES: ARM // RUN: %swift -target armv7-apple-ios7 %s -gnone -emit-ir -o - | FileCheck %s -check-prefix=ARM32 +// REQUIRES: ARM + sil_stage canonical import Builtin diff --git a/test/IRGen/builtins.swift b/test/IRGen/builtins.swift index 6de392799e274..8b4cb8939ffc0 100644 --- a/test/IRGen/builtins.swift +++ b/test/IRGen/builtins.swift @@ -1,4 +1,6 @@ -// RUN: %swift -parse-stdlib -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir -o - | FileCheck %s +// RUN: %target-swift-frontend -parse-stdlib -primary-file %s -emit-ir -o - -disable-objc-attr-requires-foundation-module | FileCheck %s + +// REQUIRES: CPU=x86_64 import Swift diff --git a/test/IRGen/c_function_pointer.sil b/test/IRGen/c_function_pointer.sil index 8412da1d8a123..4ae01befd6750 100644 --- a/test/IRGen/c_function_pointer.sil +++ b/test/IRGen/c_function_pointer.sil @@ -1,4 +1,6 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 import Swift diff --git a/test/IRGen/c_layout.sil b/test/IRGen/c_layout.sil index 3dc19c081dce1..de4f36e688a98 100644 --- a/test/IRGen/c_layout.sil +++ b/test/IRGen/c_layout.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -I %S/Inputs/abi %s -emit-ir -enable-union-import | FileCheck %s +// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir -enable-union-import | FileCheck %s + +// REQUIRES: CPU=x86_64 sil_stage canonical import c_layout diff --git a/test/IRGen/casts.sil b/test/IRGen/casts.sil index 22a42519961ce..8e1e32144b588 100644 --- a/test/IRGen/casts.sil +++ b/test/IRGen/casts.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 sil_stage canonical @@ -99,7 +101,7 @@ entry(%a : $AnyObject): } // CHECK-LABEL: define { %swift.type*, i8**, i8** } @u_cast_to_existential_metatype_mixed(%swift.type*) -// CHECK: [[CAST:%.*]] = call %swift.type* @swift_dynamicCastTypeToObjCProtocolUnconditional(%swift.type* %0, i64 1, i8** {{%.*}}) +// CHECK: [[CAST:%.*]] = call %swift.type* @swift_dynamicCastTypeToObjCProtocolUnconditional(%swift.type* %0, {{(i32|i64)}} 1, i8** {{%.*}}) // CHECK: call { i8**, i8** } @dynamic_cast_existential_2_unconditional(%swift.type* %0, %swift.protocol* @_TMp5casts2CP, %swift.protocol* @_TMp5casts3CP2) // CHECK: insertvalue {{.*}} [[CAST]] sil @u_cast_to_existential_metatype_mixed : $@thin (@owned @thick Any.Type) -> @owned @thick protocol.Type { @@ -181,7 +183,7 @@ nay: } // CHECK-LABEL: define { %swift.type*, i8**, i8** } @c_cast_to_existential_metatype_mixed(%swift.type*) -// CHECK: [[OBJC_CAST:%.*]] = call %swift.type* @swift_dynamicCastTypeToObjCProtocolConditional(%swift.type* %0, i64 1, i8** {{%.*}}) +// CHECK: [[OBJC_CAST:%.*]] = call %swift.type* @swift_dynamicCastTypeToObjCProtocolConditional(%swift.type* %0, {{(i32|i64)}} 1, i8** {{%.*}}) // CHECK: [[IS_NULL:%.*]] = icmp eq %swift.type* [[OBJC_CAST]], null // CHECK: br i1 [[IS_NULL]], label %cont, label %success // CHECK: success: diff --git a/test/IRGen/cf.sil b/test/IRGen/cf.sil index 2f41057f1e607..db664cc519223 100644 --- a/test/IRGen/cf.sil +++ b/test/IRGen/cf.sil @@ -1,4 +1,7 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs %s -emit-ir -import-cf-types | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs %s -emit-ir -import-cf-types | FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %s + +// REQUIRES: CPU=i386_or_x86_64 +// REQUIRES: objc_interop // CHECK: [[TYPE:%swift.type]] = type // CHECK: [[REFRIGERATOR:%CSo14CCRefrigerator]] = type @@ -6,7 +9,9 @@ // CHECK: [[REFRIGERATOR_NAME:@.*]] = private unnamed_addr constant [20 x i8] c"CSo14CCRefrigerator\00" -// CHECK: @_TMdCSo14CCRefrigerator = linkonce_odr hidden global { {{.*}} } { i8* getelementptr inbounds ([20 x i8]* [[REFRIGERATOR_NAME]], i64 0, i64 0), [[TYPE]]* null, i64 0, i8** @_TWVBO, i64 16, [[TYPE]]* null, i8* null, i8* null, i8* null } +// CHECK-32: @_TMdCSo14CCRefrigerator = linkonce_odr hidden global { {{.*}} } { i8* getelementptr inbounds ([20 x i8]* [[REFRIGERATOR_NAME]], i32 0, i32 0), [[TYPE]]* null, i32 0, i8** @_TWVBO, i32 16, [[TYPE]]* null, i8* null, i8* null, i8* null } + +// CHECK-64: @_TMdCSo14CCRefrigerator = linkonce_odr hidden global { {{.*}} } { i8* getelementptr inbounds ([20 x i8]* [[REFRIGERATOR_NAME]], i64 0, i64 0), [[TYPE]]* null, i64 0, i8** @_TWVBO, i64 16, [[TYPE]]* null, i8* null, i8* null, i8* null } sil_stage canonical @@ -30,4 +35,5 @@ bb0(%0 : $CCRefrigerator): // CHECK-NEXT: ret void // CHECK: define linkonce_odr hidden [[TYPE]]* @_TMaCSo14CCRefrigerator() -// CHECK: call [[TYPE]]* @swift_getForeignTypeMetadata([[TYPE]]* bitcast (i8* getelementptr inbounds (i8* bitcast ({{.*}}* @_TMdCSo14CCRefrigerator to i8*), i64 32) to [[TYPE]]*)) +// CHECK-32: call [[TYPE]]* @swift_getForeignTypeMetadata([[TYPE]]* bitcast (i8* getelementptr inbounds (i8* bitcast ({{.*}}* @_TMdCSo14CCRefrigerator to i8*), i32 16) to [[TYPE]]*)) +// CHECK-64: call [[TYPE]]* @swift_getForeignTypeMetadata([[TYPE]]* bitcast (i8* getelementptr inbounds (i8* bitcast ({{.*}}* @_TMdCSo14CCRefrigerator to i8*), i64 32) to [[TYPE]]*)) diff --git a/test/IRGen/clang_inline.swift b/test/IRGen/clang_inline.swift index 1358f43dda360..68bc4e63d7c58 100644 --- a/test/IRGen/clang_inline.swift +++ b/test/IRGen/clang_inline.swift @@ -1,28 +1,30 @@ // RUN: rm -rf %t && mkdir -p %t -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -primary-file %s -emit-ir | FileCheck %s // RUN: mkdir -p %t/Empty.framework/Modules/Empty.swiftmodule -// RUN: %swift -target x86_64-apple-macosx10.9 -emit-module-path %t/Empty.framework/Modules/Empty.swiftmodule/x86_64.swiftmodule %S/../Inputs/empty.swift -module-name Empty -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -primary-file %s -F %t -DIMPORT_EMPTY -emit-ir > %t.ll +// RUN: %target-swift-frontend -emit-module-path %t/Empty.framework/Modules/Empty.swiftmodule/%target-swiftmodule-name %S/../Inputs/empty.swift -module-name Empty +// RUN: %target-swift-frontend -sdk %S/Inputs -primary-file %s -F %t -DIMPORT_EMPTY -emit-ir > %t.ll // RUN: FileCheck %s < %t.ll // RUN: FileCheck -check-prefix=NEGATIVE %s < %t.ll +// REQUIRES: CPU=i386_or_x86_64 + #if IMPORT_EMPTY import Empty #endif import gizmo -// CHECK: define hidden i64 @_TFC12clang_inline16CallStaticInline10ReturnZerofS0_FT_Si(%C12clang_inline16CallStaticInline*) { +// CHECK: define hidden i64 @_TFC12clang_inline16CallStaticInline10ReturnZerofS0_FT_VSs5Int64(%C12clang_inline16CallStaticInline*) { // CHECK: define internal i32 @zero() #0 { class CallStaticInline { - func ReturnZero() -> Int { return Int(zero()) } + func ReturnZero() -> Int64 { return Int64(zero()) } } -// CHECK: define hidden i64 @_TFC12clang_inline17CallStaticInline210ReturnZerofS0_FT_Si(%C12clang_inline17CallStaticInline2*) { +// CHECK: define hidden i64 @_TFC12clang_inline17CallStaticInline210ReturnZerofS0_FT_VSs5Int64(%C12clang_inline17CallStaticInline2*) { // CHECK: define internal i32 @wrappedZero() #0 { class CallStaticInline2 { - func ReturnZero() -> Int { return Int(wrappedZero()) } + func ReturnZero() -> Int64 { return Int64(wrappedZero()) } } // CHECK: define hidden i32 @_TF12clang_inline10testExternFT_VSs5Int32() { diff --git a/test/IRGen/clang_inline_reverse.swift b/test/IRGen/clang_inline_reverse.swift index 3be05117b586b..af7192c4eeffc 100644 --- a/test/IRGen/clang_inline_reverse.swift +++ b/test/IRGen/clang_inline_reverse.swift @@ -1,18 +1,21 @@ // Same test as clang_inline.swift, but with the order swapped. -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -primary-file %s -emit-ir -module-name clang_inline | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -primary-file %s -emit-ir -module-name clang_inline | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 + import gizmo -// CHECK: define hidden i64 @_TFC12clang_inline16CallStaticInline10ReturnZerofS0_FT_Si(%C12clang_inline16CallStaticInline*) { +// CHECK: define hidden i64 @_TFC12clang_inline16CallStaticInline10ReturnZerofS0_FT_VSs5Int64(%C12clang_inline16CallStaticInline*) { // CHECK: define internal i32 @wrappedZero() #0 { class CallStaticInline { - func ReturnZero() -> Int { return Int(wrappedZero()) } + func ReturnZero() -> Int64 { return Int64(wrappedZero()) } } -// CHECK: define hidden i64 @_TFC12clang_inline17CallStaticInline210ReturnZerofS0_FT_Si(%C12clang_inline17CallStaticInline2*) { +// CHECK: define hidden i64 @_TFC12clang_inline17CallStaticInline210ReturnZerofS0_FT_VSs5Int64(%C12clang_inline17CallStaticInline2*) { // CHECK: define internal i32 @zero() #0 { class CallStaticInline2 { - func ReturnZero() -> Int { return Int(zero()) } + func ReturnZero() -> Int64 { return Int64(zero()) } } // CHECK: define internal i32 @innerZero() #2 { diff --git a/test/IRGen/class.sil b/test/IRGen/class.sil index 45df2a0fe6152..467a00d5251a3 100644 --- a/test/IRGen/class.sil +++ b/test/IRGen/class.sil @@ -1,4 +1,7 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=x86_64 +// REQUIRES: objc_interop import Builtin import Swift @@ -36,7 +39,7 @@ class C {} // \ CHECK: i64 ptrtoint ([[OBJCCLASS]]* @_TMmC5class1C to i64), // \ CHECK: [[OBJCCLASS]]* @"OBJC_CLASS_$_SwiftObject", // \ CHECK: [[OPAQUE]]* @_objc_empty_cache, -// \ CHECK: [[OPAQUE]]* @_objc_empty_vtable, +// \ CHECK: [[OPAQUE]]* {{(@_objc_empty_vtable|null)}}, // \ CHECK: i64 add (i64 ptrtoint ({{.*}}* @_DATA__TtC5class1C to i64), i64 1) // \ CHECK: } @@ -46,7 +49,7 @@ class C {} // \ CHECK: i64 ptrtoint ([[OBJCCLASS]]* @_TMmC5class1D to i64), // \ CHECK: [[OBJCCLASS]]* @"OBJC_CLASS_$_SwiftObject", // \ CHECK: [[OPAQUE]]* @_objc_empty_cache, -// \ CHECK: [[OPAQUE]]* @_objc_empty_vtable, +// \ CHECK: [[OPAQUE]]* {{(@_objc_empty_vtable|null)}}, // \ CHECK: i64 add (i64 ptrtoint ({{.*}}* @_DATA__TtC5class1D to i64), i64 1), // \ CHECK: i32 3, // \ CHECK: i32 0, diff --git a/test/IRGen/class_bounded_generics.swift b/test/IRGen/class_bounded_generics.swift index 658c37ad2e888..a675a9ca3995b 100644 --- a/test/IRGen/class_bounded_generics.swift +++ b/test/IRGen/class_bounded_generics.swift @@ -1,4 +1,6 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 -primary-file %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir -primary-file %s -disable-objc-attr-requires-foundation-module | FileCheck %s + +// REQUIRES: CPU=x86_64 protocol ClassBound : class { func classBoundMethod() diff --git a/test/IRGen/class_isa_pointers.sil b/test/IRGen/class_isa_pointers.sil index 9d05d701c45aa..19333b97a017f 100644 --- a/test/IRGen/class_isa_pointers.sil +++ b/test/IRGen/class_isa_pointers.sil @@ -1,6 +1,9 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 +// REQUIRES: objc_interop import Swift import gizmo diff --git a/test/IRGen/class_with_stub_initializers.swift b/test/IRGen/class_with_stub_initializers.swift index ba763af385adc..d3c9e52f8587a 100644 --- a/test/IRGen/class_with_stub_initializers.swift +++ b/test/IRGen/class_with_stub_initializers.swift @@ -1,6 +1,8 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s + +// REQUIRES: objc_interop import Foundation diff --git a/test/IRGen/closure.swift b/test/IRGen/closure.swift index cf807d223b857..b10c34db4be1b 100644 --- a/test/IRGen/closure.swift +++ b/test/IRGen/closure.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 // -- partial_apply context metadata diff --git a/test/IRGen/deallocate.swift b/test/IRGen/deallocate.swift index 7c55ea306a789..e78f445432c87 100644 --- a/test/IRGen/deallocate.swift +++ b/test/IRGen/deallocate.swift @@ -1,4 +1,7 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=x86_64 +// REQUIRES: objc_interop // rdar://16979846 diff --git a/test/IRGen/decls.swift b/test/IRGen/decls.swift index de819c97fae4b..23d7a97af6c4e 100644 --- a/test/IRGen/decls.swift +++ b/test/IRGen/decls.swift @@ -1,16 +1,16 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s // Multiple local decls. func test1() { - class a { + class a { var x, y : Int init() { x = 0 y = 0 } } - class b { - var a, b : Int + class b { + var a, b : Int init() { a = 0 b = 0 diff --git a/test/IRGen/dependent_reabstraction.swift b/test/IRGen/dependent_reabstraction.swift index ba0ce53f6a3b5..e005f7e1053c1 100644 --- a/test/IRGen/dependent_reabstraction.swift +++ b/test/IRGen/dependent_reabstraction.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-ir %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s protocol A { typealias B diff --git a/test/IRGen/dynamic_cast.sil b/test/IRGen/dynamic_cast.sil index 90ce28cffb644..4d962868055c5 100644 --- a/test/IRGen/dynamic_cast.sil +++ b/test/IRGen/dynamic_cast.sil @@ -1,4 +1,6 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 // We have to claim this is raw SIL because there are critical edges from non // cond_br instructions. @@ -15,6 +17,8 @@ struct S { var v: Int } +// CHECK: [[INT:%Si]] = type <{ [[LLVM_PTRSIZE_INT:i(32|64)]] }> + // CHECK-LABEL: define void @testUnconditional0( sil @testUnconditional0 : $@thin (@in P) -> () { bb0(%0 : $*P): @@ -22,7 +26,7 @@ bb0(%0 : $*P): // CHECK: [[T1:%.*]] = bitcast [[S]]* [[T0]] to [[OPAQUE:%swift.opaque]]* // CHECK: [[T2:%.*]] = bitcast [[P:%.*]]* {{%.*}} to [[OPAQUE]]* // CHECK: [[T3:%.*]] = call [[TYPE:%.*]]* @_TMaP12dynamic_cast1P_() - // CHECK: call i1 @swift_dynamicCast([[OPAQUE]]* [[T1]], [[OPAQUE]]* [[T2]], [[TYPE]]* [[T3]], [[TYPE]]* getelementptr {{.*}}, i64 7) + // CHECK: call i1 @swift_dynamicCast([[OPAQUE]]* [[T1]], [[OPAQUE]]* [[T2]], [[TYPE]]* [[T3]], [[TYPE]]* getelementptr {{.*}}, [[LLVM_PTRSIZE_INT]] 7) %1 = alloc_stack $S unconditional_checked_cast_addr take_always P in %0 : $*P to S in %1#1 : $*S destroy_addr %1#1 : $*S @@ -41,7 +45,7 @@ bb0(%0 : $*P): // CHECK: [[T1:%.*]] = bitcast [[S]]* [[T0]] to [[OPAQUE:%swift.opaque]]* // CHECK: [[T2:%.*]] = bitcast [[P:%.*]]* {{%.*}} to [[OPAQUE]]* // CHECK: [[T3:%.*]] = call [[TYPE:%.*]]* @_TMaP12dynamic_cast1P_() - // CHECK: call i1 @swift_dynamicCast([[OPAQUE]]* [[T1]], [[OPAQUE]]* [[T2]], [[TYPE]]* [[T3]], [[TYPE]]* getelementptr {{.*}}, i64 3) + // CHECK: call i1 @swift_dynamicCast([[OPAQUE]]* [[T1]], [[OPAQUE]]* [[T2]], [[TYPE]]* [[T3]], [[TYPE]]* getelementptr {{.*}}, [[LLVM_PTRSIZE_INT]] 3) %1 = alloc_stack $S unconditional_checked_cast_addr take_on_success P in %0 : $*P to S in %1#1 : $*S destroy_addr %1#1 : $*S @@ -57,7 +61,7 @@ bb0(%0 : $*P): // CHECK: [[T1:%.*]] = bitcast [[S]]* [[T0]] to [[OPAQUE:%swift.opaque]]* // CHECK: [[T2:%.*]] = bitcast [[P:%.*]]* {{%.*}} to [[OPAQUE]]* // CHECK: [[T3:%.*]] = call [[TYPE:%.*]]* @_TMaP12dynamic_cast1P_() - // CHECK: call i1 @swift_dynamicCast([[OPAQUE]]* [[T1]], [[OPAQUE]]* [[T2]], [[TYPE]]* [[T3]], [[TYPE]]* getelementptr {{.*}}, i64 1) + // CHECK: call i1 @swift_dynamicCast([[OPAQUE]]* [[T1]], [[OPAQUE]]* [[T2]], [[TYPE]]* [[T3]], [[TYPE]]* getelementptr {{.*}}, [[LLVM_PTRSIZE_INT]] 1) %1 = alloc_stack $S unconditional_checked_cast_addr copy_on_success P in %0 : $*P to S in %1#1 : $*S destroy_addr %1#1 : $*S @@ -73,7 +77,7 @@ bb0(%0 : $*P): // CHECK: [[T1:%.*]] = bitcast [[S]]* [[T0]] to [[OPAQUE:%swift.opaque]]* // CHECK: [[T2:%.*]] = bitcast [[P:%.*]]* {{%.*}} to [[OPAQUE]]* // CHECK: [[T3:%.*]] = call [[TYPE:%.*]]* @_TMaP12dynamic_cast1P_() - // CHECK: [[T4:%.*]] = call i1 @swift_dynamicCast([[OPAQUE]]* [[T1]], [[OPAQUE]]* [[T2]], [[TYPE]]* [[T3]], [[TYPE]]* getelementptr {{.*}}, i64 6) + // CHECK: [[T4:%.*]] = call i1 @swift_dynamicCast([[OPAQUE]]* [[T1]], [[OPAQUE]]* [[T2]], [[TYPE]]* [[T3]], [[TYPE]]* getelementptr {{.*}}, [[LLVM_PTRSIZE_INT]] 6) // CHECK: br i1 [[T4]], %1 = alloc_stack $S checked_cast_addr_br take_always P in %0 : $*P to S in %1#1 : $*S, bb1, bb2 @@ -93,7 +97,7 @@ bb0(%0 : $*P): // CHECK: [[T1:%.*]] = bitcast [[S]]* [[T0]] to [[OPAQUE:%swift.opaque]]* // CHECK: [[T2:%.*]] = bitcast [[P:%.*]]* {{%.*}} to [[OPAQUE]]* // CHECK: [[T3:%.*]] = call [[TYPE:%.*]]* @_TMaP12dynamic_cast1P_() - // CHECK: [[T4:%.*]] = call i1 @swift_dynamicCast([[OPAQUE]]* [[T1]], [[OPAQUE]]* [[T2]], [[TYPE]]* [[T3]], [[TYPE]]* getelementptr {{.*}}, i64 2) + // CHECK: [[T4:%.*]] = call i1 @swift_dynamicCast([[OPAQUE]]* [[T1]], [[OPAQUE]]* [[T2]], [[TYPE]]* [[T3]], [[TYPE]]* getelementptr {{.*}}, [[LLVM_PTRSIZE_INT]] 2) // CHECK: br i1 [[T4]], %1 = alloc_stack $S checked_cast_addr_br take_on_success P in %0 : $*P to S in %1#1 : $*S, bb1, bb2 @@ -113,7 +117,7 @@ bb0(%0 : $*P): // CHECK: [[T1:%.*]] = bitcast [[S]]* [[T0]] to [[OPAQUE:%swift.opaque]]* // CHECK: [[T2:%.*]] = bitcast [[P:%.*]]* {{%.*}} to [[OPAQUE]]* // CHECK: [[T3:%.*]] = call [[TYPE:%.*]]* @_TMaP12dynamic_cast1P_() - // CHECK: [[T4:%.*]] = call i1 @swift_dynamicCast([[OPAQUE]]* [[T1]], [[OPAQUE]]* [[T2]], [[TYPE]]* [[T3]], [[TYPE]]* getelementptr {{.*}}, i64 0) + // CHECK: [[T4:%.*]] = call i1 @swift_dynamicCast([[OPAQUE]]* [[T1]], [[OPAQUE]]* [[T2]], [[TYPE]]* [[T3]], [[TYPE]]* getelementptr {{.*}}, [[LLVM_PTRSIZE_INT]] 0) // CHECK: br i1 [[T4]], %1 = alloc_stack $S checked_cast_addr_br copy_on_success P in %0 : $*P to S in %1#1 : $*S, bb1, bb2 diff --git a/test/IRGen/dynamic_init.sil b/test/IRGen/dynamic_init.sil index bd2e2fd81dfe7..05da62c74492f 100644 --- a/test/IRGen/dynamic_init.sil +++ b/test/IRGen/dynamic_init.sil @@ -1,4 +1,7 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=x86_64 + sil_stage canonical import Builtin diff --git a/test/IRGen/dynamic_lookup.sil b/test/IRGen/dynamic_lookup.sil index 72b6281572734..1ed8f448eb5ee 100644 --- a/test/IRGen/dynamic_lookup.sil +++ b/test/IRGen/dynamic_lookup.sil @@ -1,4 +1,7 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 +// REQUIRES: objc_interop import Swift import Builtin @@ -58,7 +61,7 @@ bb0(%0 : $AnyObject): %6 = open_existential_ref %4 : $AnyObject to $@opened("01234567-89ab-cdef-0123-000000000000") AnyObject %7 = unchecked_ref_cast %6 : $@opened("01234567-89ab-cdef-0123-000000000000") AnyObject to $Builtin.UnknownObject - // CHECK: [[SEL:%[0-9]+]] = load i8** @"\01L_selector(f)", align 8 + // CHECK: [[SEL:%[0-9]+]] = load i8** @"\01L_selector(f)", align {{(4|8)}} // CHECK: [[HAS_SEL:%[0-9]]] = call i1 @swift_objcRespondsToSelector(%objc_object* [[OBJECT:%[0-9]+]], i8* [[SEL]]) // CHECK: br i1 [[HAS_SEL]] dynamic_method_br %7 : $Builtin.UnknownObject, #X.f!1.foreign, bb1, bb2 @@ -77,7 +80,7 @@ bb3: // CHECK: define void @dynamic_lookup_static_br(%swift.type*) sil @dynamic_lookup_static_br : $@thin (@thick AnyObject.Type) -> () { bb0(%0 : $@thick AnyObject.Type): - // CHECK: [[SEL:%[0-9]+]] = load i8** @"\01L_selector(g)", align 8 + // CHECK: [[SEL:%[0-9]+]] = load i8** @"\01L_selector(g)", align {{(4|8)}} // CHECK: [[HAS_SEL:%[0-9]]] = call i1 @swift_objcRespondsToSelector(%objc_object* [[OBJECT:%[0-9]+]], i8* [[SEL]]) // CHECK: br i1 [[HAS_SEL]] dynamic_method_br %0 : $@thick AnyObject.Type, #X.g!1.foreign, bb1, bb2 @@ -114,7 +117,7 @@ bb3: return %43 : $() } -// CHECK-LABEL: define void @_T1t16opt_to_subscriptFT3objPSo13AnyObject_1iSi_T_(%objc_object*, i64) +// CHECK-LABEL: define void @_T1t16opt_to_subscriptFT3objPSo13AnyObject_1iSi_T_(%objc_object*, {{(i32|i64)}}) sil @_T1t16opt_to_subscriptFT3objPSo13AnyObject_1iSi_T_ : $@thin (AnyObject, Int) -> () { bb0(%0 : $AnyObject, %1 : $Int): %2 = alloc_box $AnyObject @@ -125,7 +128,7 @@ bb0(%0 : $AnyObject, %1 : $Int): strong_retain %8 : $AnyObject %10 = open_existential_ref %8 : $AnyObject to $@opened("01234567-89ab-cdef-0123-111111111111") AnyObject %11 = unchecked_ref_cast %10 : $@opened("01234567-89ab-cdef-0123-111111111111") AnyObject to $Builtin.UnknownObject - // CHECK: [[SEL:%[0-9]+]] = load i8** @"\01L_selector(objectAtIndexedSubscript:)", align 8 + // CHECK: [[SEL:%[0-9]+]] = load i8** @"\01L_selector(objectAtIndexedSubscript:)", align {{(4|8)}} // CHECK-NEXT: [[HAS_SEL:%[0-9]+]] = call i1 @swift_objcRespondsToSelector(%objc_object* %0, i8* [[SEL]]) // CHECK-NEXT: br i1 [[HAS_SEL]], label [[HAS_METHOD:%[0-9]+]], label [[HAS_METHOD:%[0-9]+]] diff --git a/test/IRGen/dynamic_self.sil b/test/IRGen/dynamic_self.sil index 88c21f5d7b9fe..d973ecee4ff2a 100644 --- a/test/IRGen/dynamic_self.sil +++ b/test/IRGen/dynamic_self.sil @@ -1,4 +1,7 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 + sil_stage canonical import Builtin diff --git a/test/IRGen/dynamic_self_metadata.swift b/test/IRGen/dynamic_self_metadata.swift index 664405a67d39a..b18280b7acd93 100644 --- a/test/IRGen/dynamic_self_metadata.swift +++ b/test/IRGen/dynamic_self_metadata.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 // FIXME: Not a SIL test because we can't parse dynamic Self in SIL. // diff --git a/test/IRGen/empty_array.sil b/test/IRGen/empty_array.sil index 133e36d5fa2bf..d22b151386f79 100644 --- a/test/IRGen/empty_array.sil +++ b/test/IRGen/empty_array.sil @@ -1,12 +1,25 @@ -// RUN: %swift -emit-ir %s | FileCheck %s +// RUN: %swift -target x86_64-apple-macosx10.9 -module-name main %s -emit-ir -o - | FileCheck -check-prefix=CHECK-64 %s +// RUN: %swift -target i386-apple-ios7.1 %s -module-name main -emit-ir -o - | FileCheck -check-prefix=CHECK-32 %s +// RUN: %swift -target x86_64-apple-ios7.1 %s -module-name main -emit-ir -o - | FileCheck -check-prefix=CHECK-64 %s +// RUN: %swift -target armv7-apple-ios7.1 %s -module-name main -emit-ir -o - | FileCheck -check-prefix=CHECK-32 %s +// RUN: %swift -target arm64-apple-ios7.1 %s -module-name main -emit-ir -o - | FileCheck -check-prefix=CHECK-64 %s +// RUN: %swift -target x86_64-unknown-linux-gnu -disable-objc-interop %s -module-name main -emit-ir -o - | FileCheck -check-prefix=CHECK-64 %s + +// REQUIRES: X86 +// REQUIRES: ARM sil_stage canonical import Builtin -// CHECK-LABEL: define void @empty_array(%swift.opaque* noalias) { -// CHECK: %1 = bitcast %swift.opaque* %0 to i8* -// CHECK: %2 = getelementptr inbounds i8* %1, i64 0 +// CHECK-32-LABEL: define void @empty_array(%swift.opaque* noalias) { +// CHECK-32: %1 = bitcast %swift.opaque* %0 to i8* +// CHECK-32: %2 = getelementptr inbounds i8* %1, i32 0 + +// CHECK-64-LABEL: define void @empty_array(%swift.opaque* noalias) { +// CHECK-64: %1 = bitcast %swift.opaque* %0 to i8* +// CHECK-64: %2 = getelementptr inbounds i8* %1, i64 0 + sil @empty_array : $@thin (@in ()) -> () { entry(%0 : $*()): %1 = integer_literal $Builtin.Word, 1 diff --git a/test/IRGen/empty_objc_ivar.swift b/test/IRGen/empty_objc_ivar.swift index 208af844dab3d..1e005682a8bfe 100644 --- a/test/IRGen/empty_objc_ivar.swift +++ b/test/IRGen/empty_objc_ivar.swift @@ -1,6 +1,6 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -emit-ir -verify -sdk %S/Inputs -I %t %s +// RUN: %target-swift-frontend -emit-ir -verify -sdk %S/Inputs -I %t %s import Foundation diff --git a/test/IRGen/enum.sil b/test/IRGen/enum.sil index 3dd75f4c47f9b..e51b40bb884ac 100644 --- a/test/IRGen/enum.sil +++ b/test/IRGen/enum.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -gnone -emit-ir -enable-dynamic-value-type-layout | FileCheck %s +// RUN: %target-swift-frontend %s -gnone -emit-ir -enable-dynamic-value-type-layout | FileCheck %s + +// REQUIRES: CPU=x86_64 // We have to claim this is raw SIL because there are critical edges from non // cond_br instructions. diff --git a/test/IRGen/enum_32_bit.sil b/test/IRGen/enum_32_bit.sil index 35558a5bd632f..869a50b74d9bf 100644 --- a/test/IRGen/enum_32_bit.sil +++ b/test/IRGen/enum_32_bit.sil @@ -1,8 +1,9 @@ -// REQUIRES: X86 -// REQUIRES: ARM // RUN: %swift -target i386-apple-ios7 %s -gnone -emit-ir | FileCheck %s // RUN: %swift -target armv7-apple-ios7 %s -gnone -emit-ir | FileCheck %s +// REQUIRES: X86 +// REQUIRES: ARM + // Check that we correctly lay out single-payload enums with a class reference // payload as nullable pointers. diff --git a/test/IRGen/enum_function.sil b/test/IRGen/enum_function.sil index ad5bfd3f75d6e..84f3b8768a550 100644 --- a/test/IRGen/enum_function.sil +++ b/test/IRGen/enum_function.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -gnone -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -gnone -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 sil_stage canonical diff --git a/test/IRGen/enum_function_payload.swift b/test/IRGen/enum_function_payload.swift index ed0ac2920aa2f..8ddaf822f4849 100644 --- a/test/IRGen/enum_function_payload.swift +++ b/test/IRGen/enum_function_payload.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-ir %s +// RUN: %target-swift-frontend -emit-ir %s enum Singleton { case F(Singleton -> ()) diff --git a/test/IRGen/enum_pack.sil b/test/IRGen/enum_pack.sil index 3a5ecaacf7c0a..5e97f121214b3 100644 --- a/test/IRGen/enum_pack.sil +++ b/test/IRGen/enum_pack.sil @@ -1,4 +1,4 @@ -// RUN: %swift -emit-ir %s +// RUN: %target-swift-frontend -emit-ir %s // This is a compile-only test. It checks if IRGen does not crash when packing // and unpacking enums (e.g. optionas) which contain empty structs as payloads. diff --git a/test/IRGen/enum_spare_bits.sil b/test/IRGen/enum_spare_bits.sil index c87dda5433982..2665752a9b2c0 100644 --- a/test/IRGen/enum_spare_bits.sil +++ b/test/IRGen/enum_spare_bits.sil @@ -1,6 +1,9 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %s + +// REQUIRES: CPU=i386_or_x86_64 +// REQUIRES: objc_interop import Swift import Foundation @@ -12,13 +15,15 @@ enum SwiftClass { case A(C), B(D) } // can use spare bits—both payloads are Swift-defined classes -// CHECK: %O15enum_spare_bits10SwiftClass = type <{ [8 x i8] }> +// CHECK-32: %O15enum_spare_bits10SwiftClass = type <{ [4 x i8] }> +// CHECK-64: %O15enum_spare_bits10SwiftClass = type <{ [8 x i8] }> enum ObjCClass { case A(NSObject), B(C) } // can't use spare bits—NSObject is an ObjC-defined class -// CHECK: %O15enum_spare_bits9ObjCClass = type <{ [8 x i8], [1 x i8] }> +// CHECK-32: %O15enum_spare_bits9ObjCClass = type <{ [4 x i8] }> +// CHECK-64: %O15enum_spare_bits9ObjCClass = type <{ [8 x i8], [1 x i8] }> @objc @unsafe_no_objc_tagged_pointer protocol NoTaggedPointers {} @@ -27,19 +32,22 @@ enum Existential { case A(AnyObject), B(C) } // can't use spare bits—existential may be bound to tagged pointer type -// CHECK: %O15enum_spare_bits11Existential = type <{ [8 x i8], [1 x i8] }> +// CHECK-32: %O15enum_spare_bits11Existential = type <{ [4 x i8] }> +// CHECK-64: %O15enum_spare_bits11Existential = type <{ [8 x i8], [1 x i8] }> enum ExistentialNoTaggedPointers { case A(NoTaggedPointers), B(C) } // can use spare bits—@unsafe_no_objc_tagged_pointer says it's ok -// CHECK: %O15enum_spare_bits27ExistentialNoTaggedPointers = type <{ [8 x i8] }> +// CHECK-32: %O15enum_spare_bits27ExistentialNoTaggedPointers = type <{ [4 x i8] }> +// CHECK-64: %O15enum_spare_bits27ExistentialNoTaggedPointers = type <{ [8 x i8] }> enum Archetype { case A(T), B(C) } // can't use spare bits—archetype may be bound to tagged pointer type -// CHECK: [[ARCHETYPE:%O15enum_spare_bits9Archetype.*]] = type <{ [8 x i8], [1 x i8] }> +// CHECK-32: [[ARCHETYPE:%O15enum_spare_bits9Archetype.*]] = type <{ [4 x i8], [1 x i8] }> +// CHECK-64: [[ARCHETYPE:%O15enum_spare_bits9Archetype.*]] = type <{ [8 x i8], [1 x i8] }> sil_global @swiftClass: $SwiftClass sil_global @objcClass: $ObjCClass diff --git a/test/IRGen/enum_value_semantics.sil b/test/IRGen/enum_value_semantics.sil index 55832a6559a31..098493190380b 100644 --- a/test/IRGen/enum_value_semantics.sil +++ b/test/IRGen/enum_value_semantics.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -gnone -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -gnone -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 import Builtin diff --git a/test/IRGen/enum_value_semantics_special_cases.sil b/test/IRGen/enum_value_semantics_special_cases.sil index 0ad96f364c98a..19231b8766c9f 100644 --- a/test/IRGen/enum_value_semantics_special_cases.sil +++ b/test/IRGen/enum_value_semantics_special_cases.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 import Builtin diff --git a/test/IRGen/exactcast.sil b/test/IRGen/exactcast.sil index 9d4e19c19960a..b1549970aaeb0 100644 --- a/test/IRGen/exactcast.sil +++ b/test/IRGen/exactcast.sil @@ -1,4 +1,6 @@ -// RUN: %swift -emit-ir %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=x86_64 sil_stage canonical diff --git a/test/IRGen/exactcast2.sil b/test/IRGen/exactcast2.sil index bd9984f451c14..db74775a640d6 100644 --- a/test/IRGen/exactcast2.sil +++ b/test/IRGen/exactcast2.sil @@ -1,4 +1,5 @@ // RUN: %target-build-swift %s -emit-ir -o - + // Make sure we are not crashing here. sil_stage canonical diff --git a/test/IRGen/existential_metatypes.swift b/test/IRGen/existential_metatypes.swift index a6281646e219d..aa1cc1e947745 100644 --- a/test/IRGen/existential_metatypes.swift +++ b/test/IRGen/existential_metatypes.swift @@ -1,4 +1,6 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 -o - -primary-file %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir -o - -primary-file %s | FileCheck %s + +// REQUIRES: CPU=x86_64 // Currently, this can't be a SIL file because we don't parse // conformances correctly. diff --git a/test/IRGen/existentials.sil b/test/IRGen/existentials.sil index e71ea4f35c6ed..1ce3c70f413cf 100644 --- a/test/IRGen/existentials.sil +++ b/test/IRGen/existentials.sil @@ -1,6 +1,8 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 sil_stage canonical diff --git a/test/IRGen/expressions.swift b/test/IRGen/expressions.swift index 7a97f96d8e988..8f20e0e3006d2 100644 --- a/test/IRGen/expressions.swift +++ b/test/IRGen/expressions.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir -parse-stdlib -disable-access-control -enable-character-literals | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -parse-stdlib -disable-access-control -enable-character-literals | FileCheck %s + +// REQUIRES: CPU=x86_64 import Swift diff --git a/test/IRGen/field_type_vectors.sil b/test/IRGen/field_type_vectors.sil index b0500c293f43c..bd2fc649e1bd6 100644 --- a/test/IRGen/field_type_vectors.sil +++ b/test/IRGen/field_type_vectors.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 import Swift diff --git a/test/IRGen/fixlifetime.sil b/test/IRGen/fixlifetime.sil index 4381a31cd01c0..66f2334278903 100644 --- a/test/IRGen/fixlifetime.sil +++ b/test/IRGen/fixlifetime.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -parse-sil -emit-ir %s | FileCheck %s +// RUN: %target-swift-frontend -parse-sil -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 // CHECK-LABEL: define void @test(%C11fixlifetime1C*, %objc_object*, i8**, i8*, %swift.refcounted*, %C11fixlifetime1C*, %objc_object*, i8**, i8*, %swift.refcounted*) { // CHECK: entry: @@ -31,4 +33,4 @@ bb0(%0 : $C, %1 : $P, %2 : $@callee_owned () -> (), %3 : $Agg): dealloc_stack %4#0 : $*@local_storage C %9999 = tuple() return %9999 : $() -} \ No newline at end of file +} diff --git a/test/IRGen/foreign_class_extension.swift b/test/IRGen/foreign_class_extension.swift index d216b0bfa8b1c..913eafdad7472 100644 --- a/test/IRGen/foreign_class_extension.swift +++ b/test/IRGen/foreign_class_extension.swift @@ -1,6 +1,8 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s + +// REQUIRES: objc_interop import Foundation diff --git a/test/IRGen/fulfillment.sil b/test/IRGen/fulfillment.sil index b5e7ba1661470..e3aeff620097c 100644 --- a/test/IRGen/fulfillment.sil +++ b/test/IRGen/fulfillment.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 sil_stage canonical diff --git a/test/IRGen/function_metadata.swift b/test/IRGen/function_metadata.swift index 22e089dc988da..61fa8e60a79e1 100644 --- a/test/IRGen/function_metadata.swift +++ b/test/IRGen/function_metadata.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -emit-ir -primary-file %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir -primary-file %s | FileCheck %s + +// REQUIRES: CPU=x86_64 func arch(f: F) {} diff --git a/test/IRGen/function_types.sil b/test/IRGen/function_types.sil index ac83df309ca96..3ad1fa484ba16 100644 --- a/test/IRGen/function_types.sil +++ b/test/IRGen/function_types.sil @@ -1,4 +1,12 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %swift -target x86_64-apple-macosx10.9 -module-name function_types %s -emit-ir -o - | FileCheck %s +// RUN: %swift -target i386-apple-ios7.1 %s -module-name function_types -emit-ir -o - | FileCheck %s +// RUN: %swift -target x86_64-apple-ios7.1 %s -module-name function_types -emit-ir -o - | FileCheck %s +// RUN: %swift -target armv7-apple-ios7.1 %s -module-name function_types -emit-ir -o - | FileCheck %s +// RUN: %swift -target arm64-apple-ios7.1 %s -module-name function_types -emit-ir -o - | FileCheck %s +// RUN: %swift -target x86_64-unknown-linux-gnu -disable-objc-interop %s -module-name function_types -emit-ir -o - | FileCheck %s + +// REQUIRES: X86 +// REQUIRES: ARM import Builtin diff --git a/test/IRGen/generic_casts.swift b/test/IRGen/generic_casts.swift index c34c837753bc6..3bf8cfe628a8f 100644 --- a/test/IRGen/generic_casts.swift +++ b/test/IRGen/generic_casts.swift @@ -1,6 +1,9 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 +// REQUIRES: objc_interop import Foundation import gizmo diff --git a/test/IRGen/generic_class_anyobject.swift b/test/IRGen/generic_class_anyobject.swift index 0e1c3deb82b2f..e7c35ea7df825 100644 --- a/test/IRGen/generic_class_anyobject.swift +++ b/test/IRGen/generic_class_anyobject.swift @@ -1,4 +1,7 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 +// REQUIRES: objc_interop func foo(x: T) -> T { return x } diff --git a/test/IRGen/generic_classes.sil b/test/IRGen/generic_classes.sil index 72e6cfa509989..c8e1a06ac85d3 100644 --- a/test/IRGen/generic_classes.sil +++ b/test/IRGen/generic_classes.sil @@ -1,6 +1,8 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 import Builtin import Swift @@ -75,7 +77,7 @@ import gizmo // CHECK: i64 ptrtoint (%objc_class* @_TMmC15generic_classes14RootNonGeneric to i64), // CHECK: %objc_class* @"OBJC_CLASS_$_SwiftObject", // CHECK: %swift.opaque* @_objc_empty_cache, -// CHECK: %swift.opaque* @_objc_empty_vtable, +// CHECK: %swift.opaque* {{(@_objc_empty_vtable|null)}}, // CHECK: @_DATA__TtC15generic_classes14RootNonGeneric // CHECK: i32 33, // CHECK: i16 7, diff --git a/test/IRGen/generic_classes_objc.sil b/test/IRGen/generic_classes_objc.sil index 037d0decc6b33..d0343fba7ea28 100644 --- a/test/IRGen/generic_classes_objc.sil +++ b/test/IRGen/generic_classes_objc.sil @@ -1,6 +1,9 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -enable-dynamic-value-type-layout -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -enable-dynamic-value-type-layout -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 +// REQUIRES: objc_interop import Builtin import Swift diff --git a/test/IRGen/generic_classes_osx_iphonesimulator.sil b/test/IRGen/generic_classes_osx_iphonesimulator.sil new file mode 100644 index 0000000000000..f94bb39040a33 --- /dev/null +++ b/test/IRGen/generic_classes_osx_iphonesimulator.sil @@ -0,0 +1,83 @@ +// RUN: %target-swift-frontend -module-name generic_classes %s -emit-ir | FileCheck %s -check-prefix=CHECK-%target-os + +// REQUIRES: CPU=x86_64 + +// rdar://15806697 - use null pointers for &_objc_empty_vtable in the simulator +// +// Objective-C class objects contain two pointers which are +// canonically supposed to be initialized to a pair of symbols +// vended by the Objective-C runtime: &objc_empty_cache and +// &objc_empty_vtable. The runtime defines the first with a +// normal global variable. The second is currently defined as +// an absolute symbol 0, i.e. the runtime says that the address +// of that symbol is a null pointer, meaning that references to +// it should resolve to a null pointer, i.e. that field in ObjC +// classes should be initialized to zero. +// +// If you go far back enough in time, you can find a version of +// dyld that does not actually support absolute symbols; but +// much more importantly, the iOS simulator does not actually +// use dyld, and instead uses its own gross collection of hacks, +// which do not happen to include support for absolute symbols. +// So this pointer is getting initialized in a totally bogus way +// when running on the iOS simulator. +// +// This field is actually used by the runtime, and it's for +// something completely unrelated to v-tables: it's used as a +// mask for the method cache hashtable. So using a totally +// bogus value here really screws up the runtime. +// +// The reason this doesn't break everything in the world is that +// the ObjC runtime has a hack in it for running on the +// simulator: it goes through every class in the class list and +// initializes this field to zero. However, Swift generic +// classes do not actually appear in the class list, and so they +// do not benefit from this hack. +// +// The crash in this bug occurs when the initialization of a +// generic class specialization calls +class in order to force +// the ObjC runtime to recognize the new class. (This is +// important if ObjC messages will be sent to the object; in +// this case, no messages will be sent to the object, but the +// generic-class runtime doesn't know that.) Because the +// "vtable" field is misinitialized, this message send explodes. + +import Swift + +class RootNonGeneric { + var x : UInt8 + var y : Int + var z : UInt8 + + init() +} +sil @_TFC15generic_classes14RootNonGenericD : $@cc(method) @thin (RootNonGeneric) -> () + +// CHECK-macosx: @_TMdC15generic_classes14RootNonGeneric = global { {{.*}} } { +// CHECK-macosx: void (%C15generic_classes14RootNonGeneric*)* @_TFC15generic_classes14RootNonGenericD, +// CHECK-macosx: i8** @_TWVBo, +// CHECK-macosx: i64 ptrtoint (%objc_class* @_TMmC15generic_classes14RootNonGeneric to i64), +// CHECK-macosx: %objc_class* @"OBJC_CLASS_$_SwiftObject", +// CHECK-macosx: %swift.opaque* @_objc_empty_cache, +// CHECK-macosx: %swift.opaque* @_objc_empty_vtable, +// CHECK-macosx: @_DATA__TtC15generic_classes14RootNonGeneric +// CHECK-macosx: i32 33, +// CHECK-macosx: i16 7, +// CHECK-macosx: i16 0, +// CHECK-macosx: {{.*}}* @_TMnC15generic_classes14RootNonGeneric, +// CHECK-macosx: } + +// CHECK-ios: @_TMdC15generic_classes14RootNonGeneric = global { {{.*}} } { +// CHECK-ios: void (%C15generic_classes14RootNonGeneric*)* @_TFC15generic_classes14RootNonGenericD, +// CHECK-ios: i8** @_TWVBo, +// CHECK-ios: i64 ptrtoint (%objc_class* @_TMmC15generic_classes14RootNonGeneric to i64), +// CHECK-ios: %objc_class* @"OBJC_CLASS_$_SwiftObject", +// CHECK-ios: %swift.opaque* @_objc_empty_cache, +// CHECK-ios: %swift.opaque* null, +// CHECK-ios: @_DATA__TtC15generic_classes14RootNonGeneric +// CHECK-ios: i32 33, +// CHECK-ios: i16 7, +// CHECK-ios: i16 0, +// CHECK-ios: {{.*}}* @_TMnC15generic_classes14RootNonGeneric, +// CHECK-ios: } + diff --git a/test/IRGen/generic_metatypes.swift b/test/IRGen/generic_metatypes.swift index 0b2549d49bcdf..6fafe4005c947 100644 --- a/test/IRGen/generic_metatypes.swift +++ b/test/IRGen/generic_metatypes.swift @@ -1,4 +1,11 @@ -// RUN: %swift -emit-ir -parse-stdlib -target x86_64-apple-macosx10.9 -primary-file %s | FileCheck %s +// RUN: %swift -target x86_64-apple-macosx10.9 -emit-ir -parse-stdlib -primary-file %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 %s +// RUN: %swift -target i386-apple-ios7.0 -emit-ir -parse-stdlib -primary-file %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-32 %s +// RUN: %swift -target x86_64-apple-ios7.0 -emit-ir -parse-stdlib -primary-file %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 %s +// RUN: %swift -target armv7-apple-ios7.0 -emit-ir -parse-stdlib -primary-file %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-32 %s +// RUN: %swift -target arm64-apple-ios7.0 -emit-ir -parse-stdlib -primary-file %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 %s +// RUN: %swift -target x86_64-unknown-linux-gnu -disable-objc-interop -emit-ir -parse-stdlib -primary-file %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-64 %s + +// REQUIRES: X86 // CHECK: define hidden %swift.type* [[GENERIC_TYPEOF:@_TF17generic_metatypes13genericTypeof.*]](%swift.opaque* noalias, %swift.type* [[TYPE:%.*]]) func genericTypeof(x: T) -> T.Type { @@ -40,15 +47,20 @@ func protocolTypeof(x: Bas) -> Bas.Type { // CHECK: [[METADATA:%.*]] = load %swift.type** [[METADATA_ADDR]] // CHECK: [[BUFFER:%.*]] = getelementptr inbounds %P17generic_metatypes3Bas_* [[X]], i32 0, i32 0 // CHECK: [[METADATA_I8:%.*]] = bitcast %swift.type* [[METADATA]] to i8*** - // CHECK: [[VW_ADDR:%.*]] = getelementptr inbounds i8*** [[METADATA_I8]], i64 -1 + // CHECK-32: [[VW_ADDR:%.*]] = getelementptr inbounds i8*** [[METADATA_I8]], i32 -1 + // CHECK-64: [[VW_ADDR:%.*]] = getelementptr inbounds i8*** [[METADATA_I8]], i64 -1 // CHECK: [[VW:%.*]] = load i8*** [[VW_ADDR]] // CHECK: [[PROJECT_ADDR:%.*]] = getelementptr inbounds i8** [[VW]], i32 2 - // CHECK: [[PROJECT_PTR:%.*]] = load i8** [[PROJECT_ADDR]], align 8 - // CHECK: [[PROJECT:%.*]] = bitcast i8* [[PROJECT_PTR]] to %swift.opaque* ([24 x i8]*, %swift.type*)* - // CHECK: [[PROJECTION:%.*]] = call %swift.opaque* [[PROJECT]]([24 x i8]* [[BUFFER]], %swift.type* [[METADATA]]) + // CHECK-32: [[PROJECT_PTR:%.*]] = load i8** [[PROJECT_ADDR]], align 4 + // CHECK-64: [[PROJECT_PTR:%.*]] = load i8** [[PROJECT_ADDR]], align 8 + // CHECK-32: [[PROJECT:%.*]] = bitcast i8* [[PROJECT_PTR]] to %swift.opaque* ([12 x i8]*, %swift.type*)* + // CHECK-64: [[PROJECT:%.*]] = bitcast i8* [[PROJECT_PTR]] to %swift.opaque* ([24 x i8]*, %swift.type*)* + // CHECK-32: [[PROJECTION:%.*]] = call %swift.opaque* [[PROJECT]]([12 x i8]* [[BUFFER]], %swift.type* [[METADATA]]) + // CHECK-64: [[PROJECTION:%.*]] = call %swift.opaque* [[PROJECT]]([24 x i8]* [[BUFFER]], %swift.type* [[METADATA]]) // CHECK: [[METATYPE:%.*]] = call %swift.type* @swift_getDynamicType(%swift.opaque* [[PROJECTION]], %swift.type* [[METADATA]]) // CHECK: [[T0:%.*]] = getelementptr inbounds %P17generic_metatypes3Bas_* [[X]], i32 0, i32 2 - // CHECK: [[WTABLE:%.*]] = load i8*** [[T0]], align 8 + // CHECK-32: [[WTABLE:%.*]] = load i8*** [[T0]], align 4 + // CHECK-64: [[WTABLE:%.*]] = load i8*** [[T0]], align 8 // CHECK: [[T0:%.*]] = insertvalue { %swift.type*, i8** } undef, %swift.type* [[METATYPE]], 0 // CHECK: [[T1:%.*]] = insertvalue { %swift.type*, i8** } [[T0]], i8** [[WTABLE]], 1 // CHECK: ret { %swift.type*, i8** } [[T1]] diff --git a/test/IRGen/generic_same_type.swift b/test/IRGen/generic_same_type.swift index a8c7e3a430c0c..8c6767db86c1f 100644 --- a/test/IRGen/generic_same_type.swift +++ b/test/IRGen/generic_same_type.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir -Onone | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -Onone | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 // FIXME: Should be a SIL test, but we can't parse same-type constraints // diff --git a/test/IRGen/generic_structs.sil b/test/IRGen/generic_structs.sil index 66116bb603395..b43284d95f1bf 100644 --- a/test/IRGen/generic_structs.sil +++ b/test/IRGen/generic_structs.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -enable-dynamic-value-type-layout | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -enable-dynamic-value-type-layout | FileCheck %s + +// REQUIRES: CPU=x86_64 import Builtin diff --git a/test/IRGen/generic_ternary.swift b/test/IRGen/generic_ternary.swift index 19046c538f29e..eb946d2afb027 100644 --- a/test/IRGen/generic_ternary.swift +++ b/test/IRGen/generic_ternary.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 // struct OptionalStreamAdaptor { diff --git a/test/IRGen/generic_tuples.swift b/test/IRGen/generic_tuples.swift index b2dd8172b4384..3ccf91fdba6c1 100644 --- a/test/IRGen/generic_tuples.swift +++ b/test/IRGen/generic_tuples.swift @@ -1,7 +1,9 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -emit-ir -primary-file %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir -primary-file %s | FileCheck %s // Make sure that optimization passes don't choke on storage types for generic tuples -// RUN: %swift -target x86_64-apple-macosx10.9 -emit-ir -O %s +// RUN: %target-swift-frontend -emit-ir -O %s + +// REQUIRES: CPU=x86_64 // CHECK: [[TYPE:%swift.type]] = type { // CHECK: [[OPAQUE:%swift.opaque]] = type opaque diff --git a/test/IRGen/generic_types.swift b/test/IRGen/generic_types.swift index 49708a2d68b33..6a0b4eaedecfe 100644 --- a/test/IRGen/generic_types.swift +++ b/test/IRGen/generic_types.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 import Swift @@ -19,7 +21,7 @@ import Swift // CHECK: i64 0, // CHECK: %objc_class* @"OBJC_CLASS_$_SwiftObject", // CHECK: %swift.opaque* @_objc_empty_cache, -// CHECK: %swift.opaque* @_objc_empty_vtable, +// CHECK: %swift.opaque* {{(@_objc_empty_vtable|null)}}, // CHECK: i64 1, // CHECK: i32 3, // CHECK: i32 0, @@ -43,7 +45,7 @@ import Swift // CHECK: i64 0, // CHECK: %objc_class* @"OBJC_CLASS_$_SwiftObject", // CHECK: %swift.opaque* @_objc_empty_cache, -// CHECK: %swift.opaque* @_objc_empty_vtable, +// CHECK: %swift.opaque* {{(@_objc_empty_vtable|null)}}, // CHECK: i64 1, // CHECK: i32 3, // CHECK: i32 0, @@ -60,7 +62,7 @@ import Swift // CHECK: i64 0, // CHECK: %swift.type* null, // CHECK: %swift.opaque* @_objc_empty_cache, -// CHECK: %swift.opaque* @_objc_empty_vtable, +// CHECK: %swift.opaque* {{(@_objc_empty_vtable|null)}}, // CHECK: i64 1, // CHECK: void (%swift.opaque*, [[A]]*)* @_TFC13generic_types1A3run // CHECK: } @@ -70,7 +72,7 @@ import Swift // CHECK: i64 0, // CHECK: %swift.type* null, // CHECK: %swift.opaque* @_objc_empty_cache, -// CHECK: %swift.opaque* @_objc_empty_vtable, +// CHECK: %swift.opaque* {{(@_objc_empty_vtable|null)}}, // CHECK: i64 1, // CHECK: void (i64, [[D]]*)* @_TFC13generic_types1D3run // CHECK: } diff --git a/test/IRGen/globals.swift b/test/IRGen/globals.swift index 37e98707a8ef3..e096103b2d421 100644 --- a/test/IRGen/globals.swift +++ b/test/IRGen/globals.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 var g0 : Int = 1 var g1 : (Void, Int, Void) diff --git a/test/IRGen/indexing.sil b/test/IRGen/indexing.sil index bb657e78409b5..44b071f1914b0 100644 --- a/test/IRGen/indexing.sil +++ b/test/IRGen/indexing.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 sil_stage canonical diff --git a/test/IRGen/indirect_return.swift b/test/IRGen/indirect_return.swift index 7e231fb7aa06c..0af29933571db 100644 --- a/test/IRGen/indirect_return.swift +++ b/test/IRGen/indirect_return.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 // CHECK: define hidden void @_TF15indirect_return11generic_get func generic_get(p: UnsafeMutablePointer) -> T { diff --git a/test/IRGen/infinite_archetype.swift b/test/IRGen/infinite_archetype.swift index 33042c5d1571f..0869f531f0fb3 100644 --- a/test/IRGen/infinite_archetype.swift +++ b/test/IRGen/infinite_archetype.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 protocol Fooable { typealias Foo diff --git a/test/IRGen/lazy_globals.swift b/test/IRGen/lazy_globals.swift index c8091fb870c60..b54f40422869b 100644 --- a/test/IRGen/lazy_globals.swift +++ b/test/IRGen/lazy_globals.swift @@ -1,4 +1,6 @@ -// RUN: %swift -parse-as-library -emit-ir -target x86_64-apple-macosx10.9 -primary-file %s | FileCheck %s +// RUN: %target-swift-frontend -parse-as-library -emit-ir -primary-file %s | FileCheck %s + +// REQUIRES: CPU=x86_64 // CHECK: @_Tv12lazy_globals1xSi = global %Si zeroinitializer, align 8 // CHECK: @_Tv12lazy_globals1ySi = global %Si zeroinitializer, align 8 diff --git a/test/IRGen/lazy_multi_file.swift b/test/IRGen/lazy_multi_file.swift index a726afc2fe539..dd99682151f24 100644 --- a/test/IRGen/lazy_multi_file.swift +++ b/test/IRGen/lazy_multi_file.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -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 | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 // CHECK: %C15lazy_multi_file8Subclass = type <{ %swift.refcounted, %[[OPTIONAL_INT_TY:Sq[^,]+]], [{{[0-9]+}} x i8], %SS }> // CHECK: %[[OPTIONAL_INT_TY]] = type <{ [{{[0-9]+}} x i8], [1 x i8] }> diff --git a/test/IRGen/lifetime.sil b/test/IRGen/lifetime.sil index db9f99b5d287e..4b662fa4b873f 100644 --- a/test/IRGen/lifetime.sil +++ b/test/IRGen/lifetime.sil @@ -1,4 +1,6 @@ -// RUN: %swift -gnone -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend -gnone -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=x86_64 // CHECK: [[OPAQUE:%swift.opaque]] = type opaque // CHECK: [[TYPE:%swift.type]] = type diff --git a/test/IRGen/lit.local.cfg b/test/IRGen/lit.local.cfg index 604850816ecdc..189f532e8428c 100644 --- a/test/IRGen/lit.local.cfg +++ b/test/IRGen/lit.local.cfg @@ -2,5 +2,5 @@ config.substitutions = list(config.substitutions) config.substitutions.insert(0, ('%build-irgen-test-overlays', - '%swift -emit-module -o %t -sdk %S/Inputs %S/Inputs/ObjectiveC.swift && ' - '%swift -emit-module -o %t -sdk %S/Inputs %S/Inputs/Foundation.swift')) + '%target-swift-frontend -emit-module -o %t -sdk %S/Inputs %S/Inputs/ObjectiveC.swift && ' + '%target-swift-frontend -emit-module -o %t -sdk %S/Inputs %S/Inputs/Foundation.swift')) diff --git a/test/IRGen/literals.sil b/test/IRGen/literals.sil index 4b8526ffa232f..f145a317138a2 100644 --- a/test/IRGen/literals.sil +++ b/test/IRGen/literals.sil @@ -1,4 +1,6 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=x86_64 // CHECK: [[U8_0:@.*]] = private unnamed_addr constant [8 x i8] c"help\09me\00" // CHECK: [[U8_1:@.*]] = private unnamed_addr constant [5 x i8] c"\00x\C6\AB\00" diff --git a/test/IRGen/mangle-anonclosure.swift b/test/IRGen/mangle-anonclosure.swift index 15d99d4edc90a..94e0f80a0f804 100644 --- a/test/IRGen/mangle-anonclosure.swift +++ b/test/IRGen/mangle-anonclosure.swift @@ -1,5 +1,7 @@ -// RUN: %swift -emit-ir %s -disable-access-control -parse-stdlib -o - | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s -disable-access-control -parse-stdlib -o - | FileCheck %s + import Swift + class HeapStorage { public final func withUnsafeMutablePointerToElements( body: (UnsafeMutablePointer)->R diff --git a/test/IRGen/metatype.sil b/test/IRGen/metatype.sil index 86398f7219643..d4139e030273e 100644 --- a/test/IRGen/metatype.sil +++ b/test/IRGen/metatype.sil @@ -1,6 +1,8 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=x86_64 sil_stage canonical diff --git a/test/IRGen/metatype_casts.sil b/test/IRGen/metatype_casts.sil index 919c19c322369..e854fcc21712a 100644 --- a/test/IRGen/metatype_casts.sil +++ b/test/IRGen/metatype_casts.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 import Swift diff --git a/test/IRGen/method_linkage.swift b/test/IRGen/method_linkage.swift index 32feb620481c3..5816475fdd029 100644 --- a/test/IRGen/method_linkage.swift +++ b/test/IRGen/method_linkage.swift @@ -1,4 +1,4 @@ -// RUN: %swift -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir | FileCheck %s // Test if all methods which go into a vtable have at least the visibility of its class. // Reason: Derived classes from "outside" still have to put the less visible base members diff --git a/test/IRGen/mixed_objc_native_protocol_constraints.swift b/test/IRGen/mixed_objc_native_protocol_constraints.swift index 096ab0d74cfd5..bda4d79b1b549 100644 --- a/test/IRGen/mixed_objc_native_protocol_constraints.swift +++ b/test/IRGen/mixed_objc_native_protocol_constraints.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-ir -verify %s +// RUN: %target-swift-frontend -emit-ir -verify %s // compiler_crashers/029-class-with-anyobject-type-constraint.swift // Test case submitted to project by https://github.com/jansabbe (Jan Sabbe) diff --git a/test/IRGen/noinline.swift b/test/IRGen/noinline.swift index b0ff11839a188..47280e5c4e022 100644 --- a/test/IRGen/noinline.swift +++ b/test/IRGen/noinline.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -O -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -O -emit-ir | FileCheck %s public var x = 0 diff --git a/test/IRGen/nondominant.sil b/test/IRGen/nondominant.sil index 760b7fa8ae982..3f5d72f206283 100644 --- a/test/IRGen/nondominant.sil +++ b/test/IRGen/nondominant.sil @@ -1,4 +1,6 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=i386_or_x86_64 import Builtin diff --git a/test/IRGen/objc.swift b/test/IRGen/objc.swift index 80f74cf743773..57679531ae209 100644 --- a/test/IRGen/objc.swift +++ b/test/IRGen/objc.swift @@ -1,6 +1,8 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 import Foundation import gizmo diff --git a/test/IRGen/objc_attr_NSManaged.sil b/test/IRGen/objc_attr_NSManaged.sil index 282ea14f9c93f..ce90edda76ad5 100644 --- a/test/IRGen/objc_attr_NSManaged.sil +++ b/test/IRGen/objc_attr_NSManaged.sil @@ -1,6 +1,8 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 // CHECK: [[SGIZMO:%C19objc_attr_NSManaged10SwiftGizmo]] = type @@ -20,7 +22,7 @@ import gizmo // CHECK: @_PROPERTIES__TtC19objc_attr_NSManaged10SwiftGizmo = private constant { {{.*}}i32, i32, [1 x { i8*, i8* }] } { i32 16, i32 1, [1 x { i8*, i8* }] [{ i8*, i8* } { i8* getelementptr inbounds ([2 x i8]* [[X]], i64 0, i64 0), // The getter/setter should not show up in the Swift metadata. -// CHECK: @_TMdC19objc_attr_NSManaged10SwiftGizmo = global { {{.*}} } { void (%C19objc_attr_NSManaged10SwiftGizmo*)* @_TFC19objc_attr_NSManaged10SwiftGizmoD, i8** @_TWVBO, i64 ptrtoint (%objc_class* @"OBJC_METACLASS_$__TtC19objc_attr_NSManaged10SwiftGizmo" to i64), %objc_class* @"OBJC_CLASS_$_Gizmo", %swift.opaque* @_objc_empty_cache, %swift.opaque* @_objc_empty_vtable, i64 add (i64 ptrtoint ({ i32, i32, i32, i32, i8*, i8*, { i32, i32, [2 x { i8*, i8*, i8* }] }*, i8*, i8*, i8*, { i32, i32, [1 x { i8*, i8* }] }* }* @_DATA__TtC19objc_attr_NSManaged10SwiftGizmo to i64), i64 1), i32 1, i32 0, i32 16, i16 7, i16 0, i32 104, i32 16, { i64, i8*, i32, i32, i8*, %swift.type** (%swift.type*)*, %swift.type_pattern*, i32, i32, i32 }* @_TMnC19objc_attr_NSManaged10SwiftGizmo, i64 (i64, %C19objc_attr_NSManaged10SwiftGizmo*)* @_TFC19objc_attr_NSManaged10SwiftGizmocfMS0_FT7bellsOnSi_GSQS0__, %C19objc_attr_NSManaged10SwiftGizmo* (%C19objc_attr_NSManaged10SwiftGizmo*)* @_TFC19objc_attr_NSManaged10SwiftGizmocfMS0_FT_S0_ } +// CHECK: @_TMdC19objc_attr_NSManaged10SwiftGizmo = global { {{.*}} } { void (%C19objc_attr_NSManaged10SwiftGizmo*)* @_TFC19objc_attr_NSManaged10SwiftGizmoD, i8** @_TWVBO, i64 ptrtoint (%objc_class* @"OBJC_METACLASS_$__TtC19objc_attr_NSManaged10SwiftGizmo" to i64), %objc_class* @"OBJC_CLASS_$_Gizmo", %swift.opaque* @_objc_empty_cache, %swift.opaque* {{(@_objc_empty_vtable|null)}}, i64 add (i64 ptrtoint ({ i32, i32, i32, i32, i8*, i8*, { i32, i32, [2 x { i8*, i8*, i8* }] }*, i8*, i8*, i8*, { i32, i32, [1 x { i8*, i8* }] }* }* @_DATA__TtC19objc_attr_NSManaged10SwiftGizmo to i64), i64 1), i32 1, i32 0, i32 16, i16 7, i16 0, i32 104, i32 16, { i64, i8*, i32, i32, i8*, %swift.type** (%swift.type*)*, %swift.type_pattern*, i32, i32, i32 }* @_TMnC19objc_attr_NSManaged10SwiftGizmo, i64 (i64, %C19objc_attr_NSManaged10SwiftGizmo*)* @_TFC19objc_attr_NSManaged10SwiftGizmocfMS0_FT7bellsOnSi_GSQS0__, %C19objc_attr_NSManaged10SwiftGizmo* (%C19objc_attr_NSManaged10SwiftGizmo*)* @_TFC19objc_attr_NSManaged10SwiftGizmocfMS0_FT_S0_ } @objc class SwiftGizmo : Gizmo { @objc @NSManaged var x: X diff --git a/test/IRGen/objc_block.sil b/test/IRGen/objc_block.sil index 5fc294d0b97d7..5f75b8504189b 100644 --- a/test/IRGen/objc_block.sil +++ b/test/IRGen/objc_block.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 sil_stage canonical diff --git a/test/IRGen/objc_block_storage.sil b/test/IRGen/objc_block_storage.sil index a9bad6cfd7cc5..d533447b43fb9 100644 --- a/test/IRGen/objc_block_storage.sil +++ b/test/IRGen/objc_block_storage.sil @@ -1,4 +1,6 @@ -// RUN: %swift -gnone -target x86_64-apple-macosx10.9 -sdk %S/Inputs %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -gnone -sdk %S/Inputs %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 sil_stage canonical diff --git a/test/IRGen/objc_bridge.swift b/test/IRGen/objc_bridge.swift index 99051b0eabbcb..312d5235eb073 100644 --- a/test/IRGen/objc_bridge.swift +++ b/test/IRGen/objc_bridge.swift @@ -1,6 +1,8 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -emit-ir -sdk %S/Inputs -I %t -primary-file %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir -sdk %S/Inputs -I %t -primary-file %s | FileCheck %s + +// REQUIRES: CPU=x86_64 import Foundation diff --git a/test/IRGen/objc_class_export.swift b/test/IRGen/objc_class_export.swift index 9bfde49a66ba5..e0242ec7e73df 100644 --- a/test/IRGen/objc_class_export.swift +++ b/test/IRGen/objc_class_export.swift @@ -1,6 +1,9 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | FileCheck %s + +// REQUIRES: CPU=x86_64 +// REQUIRES: objc_interop // CHECK: [[HOOZIT:%C17objc_class_export6Hoozit]] = type <{ [[REF:%swift.refcounted]] }> // CHECK: [[REF]] = type @@ -16,7 +19,7 @@ // CHECK: %objc_class* @"OBJC_METACLASS_$_SwiftObject", // CHECK: %objc_class* @"OBJC_METACLASS_$_SwiftObject", // CHECK: %swift.opaque* @_objc_empty_cache, -// CHECK: %swift.opaque* @_objc_empty_vtable, +// CHECK: %swift.opaque* {{(@_objc_empty_vtable|null)}}, // CHECK: i64 ptrtoint ({{.*}}* @_METACLASS_DATA__TtC17objc_class_export3Foo to i64) // CHECK: } // CHECK: [[FOO_NAME:@.*]] = private unnamed_addr constant [28 x i8] c"_TtC17objc_class_export3Foo\00" @@ -52,7 +55,7 @@ // CHECK: i64 ptrtoint (%objc_class* @"OBJC_METACLASS_$__TtC17objc_class_export3Foo" to i64), // CHECK: %objc_class* @"OBJC_CLASS_$_SwiftObject", // CHECK: %swift.opaque* @_objc_empty_cache, -// CHECK: %swift.opaque* @_objc_empty_vtable, +// CHECK: %swift.opaque* {{(@_objc_empty_vtable|null)}}, // CHECK: i64 add (i64 ptrtoint ({{.*}}* @_DATA__TtC17objc_class_export3Foo to i64), i64 1), // CHECK: [[FOO]]* (%swift.type*)* @_TFC17objc_class_export3Foo6createfMS0_FT_S0_, // CHECK: void (double, double, double, double, [[FOO]]*)* @_TFC17objc_class_export3Foo10drawInRectfS0_FT5dirtyVSC6NSRect_T_ diff --git a/test/IRGen/objc_class_property.swift b/test/IRGen/objc_class_property.swift index 0d56170494784..85ad85a4ad65f 100644 --- a/test/IRGen/objc_class_property.swift +++ b/test/IRGen/objc_class_property.swift @@ -1,5 +1,6 @@ -// RUN: rm -rf %t/clang-module-cache -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -disable-objc-attr-requires-foundation-module | FileCheck %s + +// REQUIRES: CPU=x86_64 // Class properties get reflected to ObjC as class methods. ObjC does not have // class properties, so no ObjC property is reflected. diff --git a/test/IRGen/objc_dealloc.sil b/test/IRGen/objc_dealloc.sil index 594a0fa78089e..050170554304d 100644 --- a/test/IRGen/objc_dealloc.sil +++ b/test/IRGen/objc_dealloc.sil @@ -1,6 +1,8 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 // CHECK: [[SGIZMO:%C12objc_dealloc10SwiftGizmo]] = type // CHECK: [[GIZMO:%CSo5Gizmo]] = type opaque diff --git a/test/IRGen/objc_extensions.swift b/test/IRGen/objc_extensions.swift index f33429b23a6f1..7b9bd05050b81 100644 --- a/test/IRGen/objc_extensions.swift +++ b/test/IRGen/objc_extensions.swift @@ -1,6 +1,8 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 import Foundation import gizmo diff --git a/test/IRGen/objc_factory_method.sil b/test/IRGen/objc_factory_method.sil index a2243e39e677c..7ed023c6f37fc 100644 --- a/test/IRGen/objc_factory_method.sil +++ b/test/IRGen/objc_factory_method.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %clang-importer-sdk %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %clang-importer-sdk %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 // CHECK: [[SWIFT_TYPE:%swift.type]] = type { i64 } sil_stage canonical diff --git a/test/IRGen/objc_implicit_with.sil b/test/IRGen/objc_implicit_with.sil index 04380e9273f61..fddbdec42df75 100644 --- a/test/IRGen/objc_implicit_with.sil +++ b/test/IRGen/objc_implicit_with.sil @@ -1,6 +1,8 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 // CHECK: @"\01L_selector_data(initWithRed:green:blue:)" // CHECK: @"\01L_selector_data(colorWithRed:green:blue:)" diff --git a/test/IRGen/objc_local.swift b/test/IRGen/objc_local.swift index d2746f9bcf6a8..1e9c60acf0144 100644 --- a/test/IRGen/objc_local.swift +++ b/test/IRGen/objc_local.swift @@ -1,13 +1,13 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s import Foundation -func foo() -> Int { - // CHECK-LABEL: define internal i64 @_TToFCF10objc_local3fooFT_SiL_3Bar10returnFivefS0_FT_Si +func foo() -> Int64 { + // CHECK-LABEL: define internal i64 @_TToFCF10objc_local3fooFT_VSs5Int64L_3Bar10returnFivefS1_FT_S0_ class Bar: NSObject { - @objc func returnFive() -> Int { return 6 } + @objc func returnFive() -> Int64 { return 6 } } return 0 } diff --git a/test/IRGen/objc_methods.swift b/test/IRGen/objc_methods.swift index 57dfd9c127474..e0474941b126f 100644 --- a/test/IRGen/objc_methods.swift +++ b/test/IRGen/objc_methods.swift @@ -1,5 +1,6 @@ -// RUN: rm -rf %t/clang-module-cache -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -disable-objc-attr-requires-foundation-module | FileCheck %s + +// REQUIRES: CPU=x86_64 // Protocol methods require extended method type encodings to capture block // signatures. diff --git a/test/IRGen/objc_methods_split.swift b/test/IRGen/objc_methods_split.swift index da02541c60e05..feb0fb01e2690 100644 --- a/test/IRGen/objc_methods_split.swift +++ b/test/IRGen/objc_methods_split.swift @@ -1,5 +1,6 @@ -// RUN: rm -rf %t/clang-module-cache -// RUN: %swift -split-objc-selectors -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -split-objc-selectors %s -emit-ir -disable-objc-attr-requires-foundation-module | FileCheck %s + +// REQUIRES: CPU=x86_64 // CHECK: @"\01L_selector_data(bazWithInt:)" = internal constant [{{[0-9]+}} x i8] c"bazWithInt:\00", section "__TEXT,__objc_methname,cstring_literals", align 1 // CHECK: @"\01L_selector_data(fooWithInt:)" = internal constant [12 x i8] c"fooWithInt:\00", section "__TEXT,__objc_methname,cstring_literals", align 1 diff --git a/test/IRGen/objc_ns_enum.swift b/test/IRGen/objc_ns_enum.swift index 8aee470a77918..0e68277beee2c 100644 --- a/test/IRGen/objc_ns_enum.swift +++ b/test/IRGen/objc_ns_enum.swift @@ -1,6 +1,8 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 import Foundation import gizmo diff --git a/test/IRGen/objc_pointers.swift b/test/IRGen/objc_pointers.swift index 1ff350b347152..8f81b63d4d1a7 100644 --- a/test/IRGen/objc_pointers.swift +++ b/test/IRGen/objc_pointers.swift @@ -1,6 +1,8 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 import Foundation diff --git a/test/IRGen/objc_properties.swift b/test/IRGen/objc_properties.swift index 6e8865ec98e61..c50364b4cb8b4 100644 --- a/test/IRGen/objc_properties.swift +++ b/test/IRGen/objc_properties.swift @@ -1,5 +1,6 @@ -// RUN: rm -rf %t/clang-module-cache -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -disable-objc-attr-requires-foundation-module | FileCheck %s + +// REQUIRES: CPU=x86_64 @objc class SomeObject { var readonly : SomeObject { diff --git a/test/IRGen/objc_properties_imported.swift b/test/IRGen/objc_properties_imported.swift index f7db4dba5d479..e7caa57c02528 100644 --- a/test/IRGen/objc_properties_imported.swift +++ b/test/IRGen/objc_properties_imported.swift @@ -1,4 +1,7 @@ -// RUN: %swift %clang-importer-sdk -enable-source-import -target x86_64-apple-macosx10.9 -emit-ir -o - -primary-file %s | FileCheck %s +// RUN: %target-swift-frontend %clang-importer-sdk -enable-source-import -emit-ir -o - -primary-file %s | FileCheck %s + +// REQUIRES: CPU=x86_64 + // FIXME: This test uses IRGen with -enable-source-import; it may fail with -g. import Properties diff --git a/test/IRGen/objc_property_attrs.swift b/test/IRGen/objc_property_attrs.swift index 9d28f257daa81..b57a317abf001 100644 --- a/test/IRGen/objc_property_attrs.swift +++ b/test/IRGen/objc_property_attrs.swift @@ -1,6 +1,9 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 +// REQUIRES: objc_interop import Foundation diff --git a/test/IRGen/objc_protocol_conversion.sil b/test/IRGen/objc_protocol_conversion.sil index 1bbba51452e28..e92501c5aa78f 100644 --- a/test/IRGen/objc_protocol_conversion.sil +++ b/test/IRGen/objc_protocol_conversion.sil @@ -1,6 +1,9 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 +// REQUIRES: objc_interop sil_stage canonical diff --git a/test/IRGen/objc_protocol_extended_method_types.swift b/test/IRGen/objc_protocol_extended_method_types.swift index 9710b9e5be2dd..4f52664fcfec0 100644 --- a/test/IRGen/objc_protocol_extended_method_types.swift +++ b/test/IRGen/objc_protocol_extended_method_types.swift @@ -1,6 +1,9 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 +// REQUIRES: objc_interop import Foundation diff --git a/test/IRGen/objc_protocol_multi_file.swift b/test/IRGen/objc_protocol_multi_file.swift index 84b788bf7ffb9..ccb464b8f1fb1 100644 --- a/test/IRGen/objc_protocol_multi_file.swift +++ b/test/IRGen/objc_protocol_multi_file.swift @@ -1,5 +1,4 @@ -// RUN: rm -rf %t/clang-module-cache -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s %S/Inputs/objc_protocol_multi_file_helper.swift -g -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s %S/Inputs/objc_protocol_multi_file_helper.swift -g -emit-ir | FileCheck %s // This used to crash . // To tickle the crash, SubProto must not be used elsewhere in this file. diff --git a/test/IRGen/objc_protocols.swift b/test/IRGen/objc_protocols.swift index e97f02cc48a0f..b96ca96c637a9 100644 --- a/test/IRGen/objc_protocols.swift +++ b/test/IRGen/objc_protocols.swift @@ -1,7 +1,9 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -emit-module -o %t %S/Inputs/objc_protocols_Bas.swift -// RUN: %swift -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/objc_protocols_Bas.swift +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | FileCheck %s + +// REQUIRES: CPU=x86_64 import gizmo import objc_protocols_Bas diff --git a/test/IRGen/objc_remapped_inits.swift b/test/IRGen/objc_remapped_inits.swift index 39565372c86e7..487d8b12a3f73 100644 --- a/test/IRGen/objc_remapped_inits.swift +++ b/test/IRGen/objc_remapped_inits.swift @@ -1,5 +1,9 @@ -// RUN: rm -rf %t/clang-module-cache -// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir -disable-objc-attr-requires-foundation-module | FileCheck %s + +// FIXME: This test could use %clang-importer-sdk, but the compiler crashes. + +// REQUIRES: OS=ios +// REQUIRES: objc_interop import UIKit diff --git a/test/IRGen/objc_structs.swift b/test/IRGen/objc_structs.swift index 4042b0b513f0c..30010177cfdcd 100644 --- a/test/IRGen/objc_structs.swift +++ b/test/IRGen/objc_structs.swift @@ -1,6 +1,9 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 + import Foundation import gizmo diff --git a/test/IRGen/objc_subclass.swift b/test/IRGen/objc_subclass.swift index 71fa2d6e6ed94..bd0d13d952d4c 100644 --- a/test/IRGen/objc_subclass.swift +++ b/test/IRGen/objc_subclass.swift @@ -1,146 +1,275 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %s + +// REQUIRES: objc_interop // CHECK: [[SGIZMO:C13objc_subclass10SwiftGizmo]] = type // CHECK: [[TYPE:%swift.type]] = type -// CHECK: [[INT:%Si]] = type <{ i64 }> +// CHECK: [[INT:%Si]] = type <{ [[LLVM_PTRSIZE_INT:i(32|64)]] }> // CHECK: [[OBJC_CLASS:%objc_class]] = type // CHECK: [[OPAQUE:%swift.opaque]] = type // CHECK: [[GIZMO:%CSo5Gizmo]] = type opaque // CHECK: [[OBJC:%objc_object]] = type opaque -// CHECK: @_TWvdvC13objc_subclass10SwiftGizmo1xSi = global i64 16, align 8 -// CHECK: @"OBJC_METACLASS_$__TtC13objc_subclass10SwiftGizmo" = global [[OBJC_CLASS]] { [[OBJC_CLASS]]* @"OBJC_METACLASS_$_NSObject", [[OBJC_CLASS]]* @"OBJC_METACLASS_$_Gizmo", [[OPAQUE]]* @_objc_empty_cache, [[OPAQUE]]* @_objc_empty_vtable, i64 ptrtoint ({{.*}} @_METACLASS_DATA__TtC13objc_subclass10SwiftGizmo to i64) } +// CHECK-32: @_TWvdvC13objc_subclass10SwiftGizmo1xSi = global i32 12, align [[WORD_SIZE_IN_BYTES:4]] +// CHECK-64: @_TWvdvC13objc_subclass10SwiftGizmo1xSi = global i64 16, align [[WORD_SIZE_IN_BYTES:8]] +// CHECK: @"OBJC_METACLASS_$__TtC13objc_subclass10SwiftGizmo" = global [[OBJC_CLASS]] { [[OBJC_CLASS]]* @"OBJC_METACLASS_$_NSObject", [[OBJC_CLASS]]* @"OBJC_METACLASS_$_Gizmo", [[OPAQUE]]* @_objc_empty_cache, [[OPAQUE]]* {{(@_objc_empty_vtable|null)}}, [[LLVM_PTRSIZE_INT]] ptrtoint ({{.*}} @_METACLASS_DATA__TtC13objc_subclass10SwiftGizmo to [[LLVM_PTRSIZE_INT]]) } // CHECK: [[STRING_X:@.*]] = private unnamed_addr constant [2 x i8] c"x\00" // CHECK: [[STRING_EMPTY:@.*]] = private unnamed_addr constant [1 x i8] zeroinitializer -// CHECK: [[METHOD_TYPE_ENCODING1:@.*]] = private unnamed_addr constant [8 x i8] c"q16@0:8\00" -// CHECK: [[METHOD_TYPE_ENCODING2:@.*]] = private unnamed_addr constant [11 x i8] c"v24@0:8q16\00" -// CHECK: [[GETTER_ENCODING:@.*]] = private unnamed_addr constant [8 x i8] c"@16@0:8\00" -// CHECK: [[INIT_ENCODING:@.*]] = private unnamed_addr constant [14 x i8] c"@32@0:8q16@24\00" -// CHECK: [[DEALLOC_ENCODING:@.*]] = private unnamed_addr constant [11 x i8] c"v24@0:8@16\00" +// CHECK-32: [[METHOD_TYPE_ENCODING1:@.*]] = private unnamed_addr constant [7 x i8] c"l8@0:4\00" +// CHECK-64: [[METHOD_TYPE_ENCODING1:@.*]] = private unnamed_addr constant [8 x i8] c"q16@0:8\00" +// CHECK-32: [[METHOD_TYPE_ENCODING2:@.*]] = private unnamed_addr constant [10 x i8] c"v12@0:4l8\00" +// CHECK-64: [[METHOD_TYPE_ENCODING2:@.*]] = private unnamed_addr constant [11 x i8] c"v24@0:8q16\00" +// CHECK-32: [[GETTER_ENCODING:@.*]] = private unnamed_addr constant [7 x i8] c"@8@0:4\00" +// CHECK-64: [[GETTER_ENCODING:@.*]] = private unnamed_addr constant [8 x i8] c"@16@0:8\00" +// CHECK-32: [[INIT_ENCODING:@.*]] = private unnamed_addr constant [13 x i8] c"@16@0:4l8@12\00" +// CHECK-64: [[INIT_ENCODING:@.*]] = private unnamed_addr constant [14 x i8] c"@32@0:8q16@24\00" +// CHECK-32: [[DEALLOC_ENCODING:@.*]] = private unnamed_addr constant [10 x i8] c"v12@0:4@8\00" +// CHECK-64: [[DEALLOC_ENCODING:@.*]] = private unnamed_addr constant [11 x i8] c"v24@0:8@16\00" // CHECK: [[STRING_SWIFTGIZMO:@.*]] = private unnamed_addr constant [32 x i8] c"_TtC13objc_subclass10SwiftGizmo\00" -// CHECK: @_METACLASS_DATA__TtC13objc_subclass10SwiftGizmo = private constant { {{.*}}* } { -// CHECK: i32 129, -// CHECK: i32 40, -// CHECK: i32 40, -// CHECK: i32 0, -// CHECK: i8* null, -// CHECK: i8* getelementptr inbounds ([{{[0-9]+}} x i8]* [[STRING_SWIFTGIZMO]], i64 0, i64 0), -// CHECK: i8* null, -// CHECK: i8* null, -// CHECK: i8* null, -// CHECK: i8* null, -// CHECK: i8* null -// CHECK: }, section "__DATA, __objc_const", align 8 - -// CHECK: @_INSTANCE_METHODS__TtC13objc_subclass10SwiftGizmo = private constant { {{.*}}] } { -// CHECK: i32 24, -// CHECK: i32 11, -// CHECK: [11 x { i8*, i8*, i8* }] [{ -// CHECK: i8* getelementptr inbounds ([2 x i8]* @"\01L_selector_data(x)", i64 0, i64 0), -// CHECK: i8* getelementptr inbounds ([8 x i8]* [[METHOD_TYPE_ENCODING1]], i64 0, i64 0) -// CHECK: i8* bitcast (i64 ([[OPAQUE2:%.*]]*, i8*)* @_TToFC13objc_subclass10SwiftGizmog1xSi to i8*) -// CHECK: }, { -// CHECK: i8* getelementptr inbounds ([6 x i8]* @"\01L_selector_data(setX:)", i64 0, i64 0), -// CHECK: i8* getelementptr inbounds ([11 x i8]* [[METHOD_TYPE_ENCODING2]], i64 0, i64 0) -// CHECK: i8* bitcast (void ([[OPAQUE3:%.*]]*, i8*, i64)* @_TToFC13objc_subclass10SwiftGizmos1xSi to i8*) -// CHECK: }, { -// CHECK: i8* getelementptr inbounds ([5 x i8]* @"\01L_selector_data(getX)", i64 0, i64 0), -// CHECK: i8* getelementptr inbounds ([8 x i8]* [[METHOD_TYPE_ENCODING1]], i64 0, i64 0) -// CHECK: i8* bitcast (i64 ([[OPAQUE2]]*, i8*)* @_TToFC13objc_subclass10SwiftGizmo4getXfS0_FT_Si to i8*) -// CHECK: }, { -// CHECK: i8* getelementptr inbounds ([10 x i8]* @"\01L_selector_data(duplicate)", i64 0, i64 0), -// CHECK: i8* getelementptr inbounds ([8 x i8]* [[GETTER_ENCODING]], i64 0, i64 0), -// CHECK: i8* bitcast ([[OPAQUE1:.*]]* ([[OPAQUE0:%.*]]*, i8*)* @_TToFC13objc_subclass10SwiftGizmo9duplicatefS0_FT_CSo5Gizmo to i8*) -// CHECK: }, { -// CHECK: i8* getelementptr inbounds ([5 x i8]* @"\01L_selector_data(init)", i64 0, i64 0), -// CHECK: i8* getelementptr inbounds ([8 x i8]* [[GETTER_ENCODING]], i64 0, i64 0), -// CHECK: i8* bitcast ([[OPAQUE5:.*]]* ([[OPAQUE6:.*]]*, i8*)* @_TToFC13objc_subclass10SwiftGizmocfMS0_FT_S0_ to i8*) -// CHECK: }, { -// CHECK: i8* getelementptr inbounds ([20 x i8]* @"\01L_selector_data(initWithInt:string:)", i64 0, i64 0), -// CHECK: i8* getelementptr inbounds ([14 x i8]* [[INIT_ENCODING]], i64 0, i64 0), -// CHECK: i8* bitcast ([[OPAQUE7:%.*]]* ([[OPAQUE8:%.*]]*, i8*, i64, [[OPAQUEONE:.*]]*)* @_TToFC13objc_subclass10SwiftGizmocfMS0_FT3intSi6stringSS_S0_ to i8*) -// CHECK: }, { -// CHECK: i8* getelementptr inbounds ([8 x i8]* @"\01L_selector_data(dealloc)", i64 0, i64 0), -// CHECK: i8* getelementptr inbounds ([11 x i8]* {{@[0-9]+}}, i64 0, i64 0), -// CHECK: i8* bitcast (void ([[OPAQUE10:%.*]]*, i8*)* @_TToFC13objc_subclass10SwiftGizmoD to i8*) -// CHECK: }, { -// CHECK: i8* getelementptr inbounds ([10 x i8]* @"\01L_selector_data(isEnabled)", i64 0, i64 0), -// CHECK: i8* getelementptr inbounds ([8 x i8]* {{@[0-9]+}}, i64 0, i64 0), -// CHECK: i8* bitcast (i8 ([[OPAQUE11:%.*]]*, i8*)* @_TToFC13objc_subclass10SwiftGizmog7enabledSb to i8*) -// CHECK: }, { -// CHECK: i8* getelementptr inbounds ([14 x i8]* @"\01L_selector_data(setIsEnabled:)", i64 0, i64 0), -// CHECK: i8* getelementptr inbounds ([11 x i8]* {{@[0-9]+}}, i64 0, i64 0), -// CHECK: i8* bitcast (void ([[OPAQUE12:%.*]]*, i8*, i8)* @_TToFC13objc_subclass10SwiftGizmos7enabledSb to i8*) -// CHECK: }, { -// CHECK: i8* getelementptr inbounds ([17 x i8]* @"\01L_selector_data(initWithBellsOn:)", i64 0, i64 0), -// CHECK: i8* getelementptr inbounds ([11 x i8]* {{@[0-9]+}}, i64 0, i64 0), -// CHECK: i8* bitcast ([[OPAQUE11:%.*]]* ([[OPAQUE12:%.*]]*, i8*, i64)* @_TToFC13objc_subclass10SwiftGizmocfMS0_FT7bellsOnSi_GSQS0__ to i8*) -// CHECK: }, { -// CHECK: i8* getelementptr inbounds ([15 x i8]* @"\01L_selector_data(.cxx_construct)", i64 0, i64 0), -// CHECK: i8* getelementptr inbounds ([3 x i8]* {{@[0-9]+}}, i64 0, i64 0), -// CHECK: i8* bitcast ([[OPAQUE5]]* ([[OPAQUE6]]*, i8*)* @_TToFC13objc_subclass10SwiftGizmoe to i8*) -// CHECK: }] -// CHECK: }, section "__DATA, __objc_const", align 8 -// CHECK: @_IVARS__TtC13objc_subclass10SwiftGizmo = private constant { {{.*}}] } { -// CHECK: i32 32, -// CHECK: i32 1, -// CHECK: [1 x { i64*, i8*, i8*, i32, i32 }] [{ i64*, i8*, i8*, i32, i32 } { -// CHECK: i64* @_TWvdvC13objc_subclass10SwiftGizmo1xSi, -// CHECK: i8* getelementptr inbounds ([2 x i8]* [[STRING_X]], i64 0, i64 0), -// CHECK: i8* getelementptr inbounds ([1 x i8]* [[STRING_EMPTY]], i64 0, i64 0), -// CHECK: i32 3, -// CHECK: i32 8 }] -// CHECK: }, section "__DATA, __objc_const", align 8 -// CHECK: @_DATA__TtC13objc_subclass10SwiftGizmo = private constant { {{.*}}* } { -// CHECK: i32 132, -// CHECK: i32 16, -// CHECK: i32 24, -// CHECK: i32 0, -// CHECK: i8* null, -// CHECK: i8* getelementptr inbounds ([{{[0-9]+}} x i8]* [[STRING_SWIFTGIZMO]], i64 0, i64 0), -// CHECK: @_INSTANCE_METHODS__TtC13objc_subclass10SwiftGizmo, -// CHECK: i8* null, -// CHECK: @_IVARS__TtC13objc_subclass10SwiftGizmo, -// CHECK: i8* null, -// CHECK: }, section "__DATA, __objc_const", align 8 +// CHECK-32: @_METACLASS_DATA__TtC13objc_subclass10SwiftGizmo = private constant { {{.*}}* } { +// CHECK-32: i32 129, +// CHECK-32: i32 20, +// CHECK-32: i32 20, +// CHECK-32: i8* null, +// CHECK-32: i8* getelementptr inbounds ([{{[0-9]+}} x i8]* [[STRING_SWIFTGIZMO]], i32 0, i32 0), +// CHECK-32: i8* null, +// CHECK-32: i8* null, +// CHECK-32: i8* null, +// CHECK-32: i8* null, +// CHECK-32: i8* null +// CHECK-32: }, section "__DATA, __objc_const", align 4 + +// CHECK-64: @_METACLASS_DATA__TtC13objc_subclass10SwiftGizmo = private constant { {{.*}}* } { +// CHECK-64: i32 129, +// CHECK-64: i32 40, +// CHECK-64: i32 40, +// CHECK-64: i32 0, +// CHECK-64: i8* null, +// CHECK-64: i8* getelementptr inbounds ([{{[0-9]+}} x i8]* [[STRING_SWIFTGIZMO]], i64 0, i64 0), +// CHECK-64: i8* null, +// CHECK-64: i8* null, +// CHECK-64: i8* null, +// CHECK-64: i8* null, +// CHECK-64: i8* null +// CHECK-64: }, section "__DATA, __objc_const", align 8 + +// CHECK-32: @_INSTANCE_METHODS__TtC13objc_subclass10SwiftGizmo = private constant { {{.*}}] } { +// CHECK-32: i32 12, +// CHECK-32: i32 11, +// CHECK-32: [11 x { i8*, i8*, i8* }] [{ i8*, i8*, i8* } { +// CHECK-32: i8* getelementptr inbounds ([2 x i8]* @"\01L_selector_data(x)", i32 0, i32 0), +// CHECK-32: i8* getelementptr inbounds ([7 x i8]* [[METHOD_TYPE_ENCODING1]], i32 0, i32 0), +// CHECK-32: i8* bitcast (i32 (%0*, i8*)* @_TToFC13objc_subclass10SwiftGizmog1xSi to i8*) +// CHECK-32: }, { i8*, i8*, i8* } { +// CHECK-32: i8* getelementptr inbounds ([6 x i8]* @"\01L_selector_data(setX:)", i32 0, i32 0), +// CHECK-32: i8* getelementptr inbounds ([10 x i8]* [[METHOD_TYPE_ENCODING2]], i32 0, i32 0), +// CHECK-32: i8* bitcast (void (%0*, i8*, i32)* @_TToFC13objc_subclass10SwiftGizmos1xSi to i8*) +// CHECK-32: }, { i8*, i8*, i8* } { +// CHECK-32: i8* getelementptr inbounds ([5 x i8]* @"\01L_selector_data(getX)", i32 0, i32 0), +// CHECK-32: i8* getelementptr inbounds ([7 x i8]* [[METHOD_TYPE_ENCODING1]], i32 0, i32 0), +// CHECK-32: i8* bitcast (i32 (%0*, i8*)* @_TToFC13objc_subclass10SwiftGizmo4getXfS0_FT_Si to i8*) +// CHECK-32: }, { i8*, i8*, i8* } { +// CHECK-32: i8* getelementptr inbounds ([10 x i8]* @"\01L_selector_data(duplicate)", i32 0, i32 0), +// CHECK-32: i8* getelementptr inbounds ([7 x i8]* [[GETTER_ENCODING]], i32 0, i32 0), +// CHECK-32: i8* bitcast (%1* (%0*, i8*)* @_TToFC13objc_subclass10SwiftGizmo9duplicatefS0_FT_CSo5Gizmo to i8*) +// CHECK-32: }, { i8*, i8*, i8* } { +// CHECK-32: i8* getelementptr inbounds ([5 x i8]* @"\01L_selector_data(init)", i32 0, i32 0), +// CHECK-32: i8* getelementptr inbounds ([7 x i8]* [[GETTER_ENCODING]], i32 0, i32 0), +// CHECK-32: i8* bitcast (%0* (%0*, i8*)* @_TToFC13objc_subclass10SwiftGizmocfMS0_FT_S0_ to i8*) +// CHECK-32: }, { i8*, i8*, i8* } { +// CHECK-32: i8* getelementptr inbounds ([20 x i8]* @"\01L_selector_data(initWithInt:string:)", i32 0, i32 0), +// CHECK-32: i8* getelementptr inbounds ([13 x i8]* [[INIT_ENCODING]], i32 0, i32 0), +// CHECK-32: i8* bitcast (%0* (%0*, i8*, i32, %2*)* @_TToFC13objc_subclass10SwiftGizmocfMS0_FT3intSi6stringSS_S0_ to i8*) +// CHECK-32: }, { i8*, i8*, i8* } { +// CHECK-32: i8* getelementptr inbounds ([8 x i8]* @"\01L_selector_data(dealloc)", i32 0, i32 0), +// CHECK-32: i8* getelementptr inbounds ([10 x i8]* {{@[0-9]+}}, i32 0, i32 0), +// CHECK-32: i8* bitcast (void (%0*, i8*)* @_TToFC13objc_subclass10SwiftGizmoD to i8*) +// CHECK-32: }, { i8*, i8*, i8* } { +// CHECK-32: i8* getelementptr inbounds ([10 x i8]* @"\01L_selector_data(isEnabled)", i32 0, i32 0), +// CHECK-32: i8* getelementptr inbounds ([7 x i8]* {{@[0-9]+}}, i32 0, i32 0), +// CHECK-32: i8* bitcast (i8 (%0*, i8*)* @_TToFC13objc_subclass10SwiftGizmog7enabledSb to i8*) +// CHECK-32: }, { i8*, i8*, i8* } { +// CHECK-32: i8* getelementptr inbounds ([14 x i8]* @"\01L_selector_data(setIsEnabled:)", i32 0, i32 0), +// CHECK-32: i8* getelementptr inbounds ([10 x i8]* {{@[0-9]+}}, i32 0, i32 0), +// CHECK-32: i8* bitcast (void (%0*, i8*, i8)* @_TToFC13objc_subclass10SwiftGizmos7enabledSb to i8*) +// CHECK-32: }, { i8*, i8*, i8* } { +// CHECK-32: i8* getelementptr inbounds ([17 x i8]* @"\01L_selector_data(initWithBellsOn:)", i32 0, i32 0), +// CHECK-32: i8* getelementptr inbounds ([10 x i8]* {{@[0-9]+}}, i32 0, i32 0), +// CHECK-32: i8* bitcast (%0* (%0*, i8*, i32)* @_TToFC13objc_subclass10SwiftGizmocfMS0_FT7bellsOnSi_GSQS0__ to i8*) +// CHECK-32: }, { i8*, i8*, i8* } { +// CHECK-32: i8* getelementptr inbounds ([15 x i8]* @"\01L_selector_data(.cxx_construct)", i32 0, i32 0), +// CHECK-32: i8* getelementptr inbounds ([3 x i8]* {{@[0-9]+}}, i32 0, i32 0), +// CHECK-32: i8* bitcast (%0* (%0*, i8*)* @_TToFC13objc_subclass10SwiftGizmoe to i8*) +// CHECK-32: }] +// CHECK-32: }, section "__DATA, __objc_const", align 4 + +// CHECK-64: @_INSTANCE_METHODS__TtC13objc_subclass10SwiftGizmo = private constant { {{.*}}] } { +// CHECK-64: i32 24, +// CHECK-64: i32 11, +// CHECK-64: [11 x { i8*, i8*, i8* }] [{ +// CHECK-64: i8* getelementptr inbounds ([2 x i8]* @"\01L_selector_data(x)", i64 0, i64 0), +// CHECK-64: i8* getelementptr inbounds ([8 x i8]* [[METHOD_TYPE_ENCODING1]], i64 0, i64 0) +// CHECK-64: i8* bitcast (i64 ([[OPAQUE2:%.*]]*, i8*)* @_TToFC13objc_subclass10SwiftGizmog1xSi to i8*) +// CHECK-64: }, { +// CHECK-64: i8* getelementptr inbounds ([6 x i8]* @"\01L_selector_data(setX:)", i64 0, i64 0), +// CHECK-64: i8* getelementptr inbounds ([11 x i8]* [[METHOD_TYPE_ENCODING2]], i64 0, i64 0) +// CHECK-64: i8* bitcast (void ([[OPAQUE3:%.*]]*, i8*, i64)* @_TToFC13objc_subclass10SwiftGizmos1xSi to i8*) +// CHECK-64: }, { +// CHECK-64: i8* getelementptr inbounds ([5 x i8]* @"\01L_selector_data(getX)", i64 0, i64 0), +// CHECK-64: i8* getelementptr inbounds ([8 x i8]* [[METHOD_TYPE_ENCODING1]], i64 0, i64 0) +// CHECK-64: i8* bitcast (i64 ([[OPAQUE2]]*, i8*)* @_TToFC13objc_subclass10SwiftGizmo4getXfS0_FT_Si to i8*) +// CHECK-64: }, { +// CHECK-64: i8* getelementptr inbounds ([10 x i8]* @"\01L_selector_data(duplicate)", i64 0, i64 0), +// CHECK-64: i8* getelementptr inbounds ([8 x i8]* [[GETTER_ENCODING]], i64 0, i64 0), +// CHECK-64: i8* bitcast ([[OPAQUE1:.*]]* ([[OPAQUE0:%.*]]*, i8*)* @_TToFC13objc_subclass10SwiftGizmo9duplicatefS0_FT_CSo5Gizmo to i8*) +// CHECK-64: }, { +// CHECK-64: i8* getelementptr inbounds ([5 x i8]* @"\01L_selector_data(init)", i64 0, i64 0), +// CHECK-64: i8* getelementptr inbounds ([8 x i8]* [[GETTER_ENCODING]], i64 0, i64 0), +// CHECK-64: i8* bitcast ([[OPAQUE5:.*]]* ([[OPAQUE6:.*]]*, i8*)* @_TToFC13objc_subclass10SwiftGizmocfMS0_FT_S0_ to i8*) +// CHECK-64: }, { +// CHECK-64: i8* getelementptr inbounds ([20 x i8]* @"\01L_selector_data(initWithInt:string:)", i64 0, i64 0), +// CHECK-64: i8* getelementptr inbounds ([14 x i8]* [[INIT_ENCODING]], i64 0, i64 0), +// CHECK-64: i8* bitcast ([[OPAQUE7:%.*]]* ([[OPAQUE8:%.*]]*, i8*, i64, [[OPAQUEONE:.*]]*)* @_TToFC13objc_subclass10SwiftGizmocfMS0_FT3intSi6stringSS_S0_ to i8*) +// CHECK-64: }, { +// CHECK-64: i8* getelementptr inbounds ([8 x i8]* @"\01L_selector_data(dealloc)", i64 0, i64 0), +// CHECK-64: i8* getelementptr inbounds ([11 x i8]* {{@[0-9]+}}, i64 0, i64 0), +// CHECK-64: i8* bitcast (void ([[OPAQUE10:%.*]]*, i8*)* @_TToFC13objc_subclass10SwiftGizmoD to i8*) +// CHECK-64: }, { +// CHECK-64: i8* getelementptr inbounds ([10 x i8]* @"\01L_selector_data(isEnabled)", i64 0, i64 0), +// CHECK-64: i8* getelementptr inbounds ([8 x i8]* {{@[0-9]+}}, i64 0, i64 0), +// CHECK-64: i8* bitcast ({{(i8|i1)}} ([[OPAQUE11:%.*]]*, i8*)* @_TToFC13objc_subclass10SwiftGizmog7enabledSb to i8*) +// CHECK-64: }, { +// CHECK-64: i8* getelementptr inbounds ([14 x i8]* @"\01L_selector_data(setIsEnabled:)", i64 0, i64 0), +// CHECK-64: i8* getelementptr inbounds ([11 x i8]* {{@[0-9]+}}, i64 0, i64 0), +// CHECK-64: i8* bitcast (void ([[OPAQUE12:%.*]]*, i8*, {{(i8|i1)}})* @_TToFC13objc_subclass10SwiftGizmos7enabledSb to i8*) +// CHECK-64: }, { +// CHECK-64: i8* getelementptr inbounds ([17 x i8]* @"\01L_selector_data(initWithBellsOn:)", i64 0, i64 0), +// CHECK-64: i8* getelementptr inbounds ([11 x i8]* {{@[0-9]+}}, i64 0, i64 0), +// CHECK-64: i8* bitcast ([[OPAQUE11:%.*]]* ([[OPAQUE12:%.*]]*, i8*, i64)* @_TToFC13objc_subclass10SwiftGizmocfMS0_FT7bellsOnSi_GSQS0__ to i8*) +// CHECK-64: }, { +// CHECK-64: i8* getelementptr inbounds ([15 x i8]* @"\01L_selector_data(.cxx_construct)", i64 0, i64 0), +// CHECK-64: i8* getelementptr inbounds ([3 x i8]* {{@[0-9]+}}, i64 0, i64 0), +// CHECK-64: i8* bitcast ([[OPAQUE5]]* ([[OPAQUE6]]*, i8*)* @_TToFC13objc_subclass10SwiftGizmoe to i8*) +// CHECK-64: }] +// CHECK-64: }, section "__DATA, __objc_const", align 8 + +// CHECK-32: @_IVARS__TtC13objc_subclass10SwiftGizmo = private constant { {{.*}}] } { +// CHECK-32: i32 20, +// CHECK-32: i32 1, +// CHECK-32: [1 x { i32*, i8*, i8*, i32, i32 }] [{ i32*, i8*, i8*, i32, i32 } { +// CHECK-32: i32* @_TWvdvC13objc_subclass10SwiftGizmo1xSi, +// CHECK-32: i8* getelementptr inbounds ([2 x i8]* [[STRING_X]], i32 0, i32 0), +// CHECK-32: i8* getelementptr inbounds ([1 x i8]* [[STRING_EMPTY]], i32 0, i32 0), +// CHECK-32: i32 2, +// CHECK-32: i32 4 }] +// CHECK-32: }, section "__DATA, __objc_const", align 4 + +// CHECK-64: @_IVARS__TtC13objc_subclass10SwiftGizmo = private constant { {{.*}}] } { +// CHECK-64: i32 32, +// CHECK-64: i32 1, +// CHECK-64: [1 x { i64*, i8*, i8*, i32, i32 }] [{ i64*, i8*, i8*, i32, i32 } { +// CHECK-64: i64* @_TWvdvC13objc_subclass10SwiftGizmo1xSi, +// CHECK-64: i8* getelementptr inbounds ([2 x i8]* [[STRING_X]], i64 0, i64 0), +// CHECK-64: i8* getelementptr inbounds ([1 x i8]* [[STRING_EMPTY]], i64 0, i64 0), +// CHECK-64: i32 3, +// CHECK-64: i32 8 }] +// CHECK-64: }, section "__DATA, __objc_const", align 8 + +// CHECK-32: @_DATA__TtC13objc_subclass10SwiftGizmo = private constant { {{.*}}* } { +// CHECK-32: i32 132, +// CHECK-32: i32 12, +// CHECK-32: i32 16, +// CHECK-32: i8* null, +// CHECK-32: i8* getelementptr inbounds ([{{[0-9]+}} x i8]* [[STRING_SWIFTGIZMO]], i32 0, i32 0), +// CHECK-32: @_INSTANCE_METHODS__TtC13objc_subclass10SwiftGizmo, +// CHECK-32: i8* null, +// CHECK-32: @_IVARS__TtC13objc_subclass10SwiftGizmo, +// CHECK-32: i8* null, +// CHECK-32: @_PROPERTIES__TtC13objc_subclass10SwiftGizmo +// CHECK-32: }, section "__DATA, __objc_const", align 4 + +// CHECK-64: @_DATA__TtC13objc_subclass10SwiftGizmo = private constant { {{.*}}* } { +// CHECK-64: i32 132, +// CHECK-64: i32 16, +// CHECK-64: i32 24, +// CHECK-64: i32 0, +// CHECK-64: i8* null, +// CHECK-64: i8* getelementptr inbounds ([{{[0-9]+}} x i8]* [[STRING_SWIFTGIZMO]], i64 0, i64 0), +// CHECK-64: @_INSTANCE_METHODS__TtC13objc_subclass10SwiftGizmo, +// CHECK-64: i8* null, +// CHECK-64: @_IVARS__TtC13objc_subclass10SwiftGizmo, +// CHECK-64: i8* null, +// CHECK-64: @_PROPERTIES__TtC13objc_subclass10SwiftGizmo +// CHECK-64: }, section "__DATA, __objc_const", align 8 + // CHECK-NOT: @_TMdCSo13SwiftGizmo = {{.*NSObject}} // CHECK: @_INSTANCE_METHODS__TtC13objc_subclass12GenericGizmo -// CHECK: @_INSTANCE_METHODS__TtC13objc_subclass11SwiftGizmo2 = private constant { i32, {{.*}}] } { -// CHECK: i32 24, -// CHECK: i32 5, -// CHECK: [5 x { i8*, i8*, i8* }] [ -// CHECK: { -// CHECK: i8* getelementptr inbounds ([3 x i8]* @"\01L_selector_data(sg)", i64 0, i64 0), -// CHECK: i8* getelementptr inbounds ([8 x i8]* [[GETTER_ENCODING]], i64 0, i64 0), -// CHECK: i8* bitcast ([[OPAQUE13:%.*]]* ([[OPAQUE14:%.*]]*, i8*)* @_TToFC13objc_subclass11SwiftGizmo2g2sgCS_10SwiftGizmo to i8*) -// CHECK: }, { -// CHECK: i8* getelementptr inbounds ([7 x i8]* @"\01L_selector_data(setSg:)", i64 0, i64 0), -// CHECK: i8* getelementptr inbounds ([11 x i8]* [[DEALLOC_ENCODING]], i64 0, i64 0), -// CHECK: i8* bitcast (void ([[OPAQUE15:%.*]]*, i8*, [[OPAQUE16:%.*]]*)* @_TToFC13objc_subclass11SwiftGizmo2s2sgCS_10SwiftGizmo to i8*) -// CHECK: }, { -// CHECK: i8* getelementptr inbounds ([5 x i8]* @"\01L_selector_data(init)", i64 0, i64 0), -// CHECK: i8* getelementptr inbounds ([8 x i8]* [[GETTER_ENCODING]], i64 0, i64 0), -// CHECK: i8* bitcast ([[OPAQUE18:%.*]]* ([[OPAQUE19:%.*]]*, i8*)* @_TToFC13objc_subclass11SwiftGizmo2cfMS0_FT_S0_ to i8*) -// CHECK: }, { -// CHECK: i8* getelementptr inbounds ([17 x i8]* @"\01L_selector_data(initWithBellsOn:)", i64 0, i64 0), -// CHECK: i8* getelementptr inbounds ([11 x i8]* {{@[0-9]+}}, i64 0, i64 0), -// CHECK: i8* bitcast ([[OPAQUE21:%.*]]* ([[OPAQUE22:%.*]]*, i8*, i64)* @_TToFC13objc_subclass11SwiftGizmo2cfMS0_FT7bellsOnSi_GSQS0__ to i8*) -// CHECK: }, { -// CHECK: i8* getelementptr inbounds ([14 x i8]* @"\01L_selector_data(.cxx_destruct)", i64 0, i64 0), -// CHECK: i8* getelementptr inbounds ([3 x i8]* {{@[0-9]+}}, i64 0, i64 0) -// CHECK: i8* bitcast (void ([[OPAQUE20:%.*]]*, i8*)* @_TToFC13objc_subclass11SwiftGizmo2E to i8*) -// CHECK: } -// CHECK: ] } - -// CHECK: @objc_classes = internal global [2 x i8*] [i8* bitcast (%swift.type* getelementptr inbounds (%swift.full_heapmetadata* bitcast ({{.*}}* @_TMdC13objc_subclass10SwiftGizmo to %swift.full_heapmetadata*), i32 0, i32 2) to i8*), i8* bitcast (%swift.type* getelementptr inbounds (%swift.full_heapmetadata* bitcast ({{.*}}* @_TMdC13objc_subclass11SwiftGizmo2 to %swift.full_heapmetadata*), i32 0, i32 2) to i8*)], section "__DATA, __objc_classlist, regular, no_dead_strip", align 8 - -// CHECK: @objc_non_lazy_classes = internal global [1 x i8*] [i8* bitcast (%swift.type* getelementptr inbounds (%swift.full_heapmetadata* bitcast ({{.*}}* @_TMdC13objc_subclass11SwiftGizmo2 to %swift.full_heapmetadata*), i32 0, i32 2) to i8*)], section "__DATA, __objc_nlclslist, regular, no_dead_strip", align 8 +// CHECK-32: @_INSTANCE_METHODS__TtC13objc_subclass11SwiftGizmo2 = private constant { i32, i32, [5 x { i8*, i8*, i8* }] } { +// CHECK-32: i32 12, +// CHECK-32: i32 5, +// CHECK-32: [5 x { i8*, i8*, i8* }] [ +// CHECK-32: { +// CHECK-32: i8* getelementptr inbounds ([3 x i8]* @"\01L_selector_data(sg)", i32 0, i32 0), +// CHECK-32: i8* getelementptr inbounds ([7 x i8]* [[GETTER_ENCODING]], i32 0, i32 0), +// CHECK-32: i8* bitcast (%0* (%3*, i8*)* @_TToFC13objc_subclass11SwiftGizmo2g2sgCS_10SwiftGizmo to i8*) +// CHECK-32: }, { +// CHECK-32: i8* getelementptr inbounds ([7 x i8]* @"\01L_selector_data(setSg:)", i32 0, i32 0), +// CHECK-32: i8* getelementptr inbounds ([10 x i8]* [[DEALLOC_ENCODING]], i32 0, i32 0), +// CHECK-32: i8* bitcast (void (%3*, i8*, %0*)* @_TToFC13objc_subclass11SwiftGizmo2s2sgCS_10SwiftGizmo to i8*) +// CHECK-32: }, { +// CHECK-32: i8* getelementptr inbounds ([5 x i8]* @"\01L_selector_data(init)", i32 0, i32 0), +// CHECK-32: i8* getelementptr inbounds ([7 x i8]* [[GETTER_ENCODING]], i32 0, i32 0), +// CHECK-32: i8* bitcast (%3* (%3*, i8*)* @_TToFC13objc_subclass11SwiftGizmo2cfMS0_FT_S0_ to i8*) +// CHECK-32: }, { +// CHECK-32: i8* getelementptr inbounds ([17 x i8]* @"\01L_selector_data(initWithBellsOn:)", i32 0, i32 0), +// CHECK-32: i8* getelementptr inbounds ([10 x i8]* {{@[0-9]+}}, i32 0, i32 0), +// CHECK-32: i8* bitcast (%3* (%3*, i8*, i32)* @_TToFC13objc_subclass11SwiftGizmo2cfMS0_FT7bellsOnSi_GSQS0__ to i8*) +// CHECK-32: }, { +// CHECK-32: i8* getelementptr inbounds ([14 x i8]* @"\01L_selector_data(.cxx_destruct)", i32 0, i32 0), +// CHECK-32: i8* getelementptr inbounds ([3 x i8]* {{@[0-9]+}}, i32 0, i32 0), +// CHECK-32: i8* bitcast (void (%3*, i8*)* @_TToFC13objc_subclass11SwiftGizmo2E to i8*) +// CHECK-32: } +// CHECK-32: ] +// CHECK-32: }, section "__DATA, __objc_const", align 4 + +// CHECK-64: @_INSTANCE_METHODS__TtC13objc_subclass11SwiftGizmo2 = private constant { i32, {{.*}}] } { +// CHECK-64: i32 24, +// CHECK-64: i32 5, +// CHECK-64: [5 x { i8*, i8*, i8* }] [ +// CHECK-64: { +// CHECK-64: i8* getelementptr inbounds ([3 x i8]* @"\01L_selector_data(sg)", i64 0, i64 0), +// CHECK-64: i8* getelementptr inbounds ([8 x i8]* [[GETTER_ENCODING]], i64 0, i64 0), +// CHECK-64: i8* bitcast ([[OPAQUE13:%.*]]* ([[OPAQUE14:%.*]]*, i8*)* @_TToFC13objc_subclass11SwiftGizmo2g2sgCS_10SwiftGizmo to i8*) +// CHECK-64: }, { +// CHECK-64: i8* getelementptr inbounds ([7 x i8]* @"\01L_selector_data(setSg:)", i64 0, i64 0), +// CHECK-64: i8* getelementptr inbounds ([11 x i8]* [[DEALLOC_ENCODING]], i64 0, i64 0), +// CHECK-64: i8* bitcast (void ([[OPAQUE15:%.*]]*, i8*, [[OPAQUE16:%.*]]*)* @_TToFC13objc_subclass11SwiftGizmo2s2sgCS_10SwiftGizmo to i8*) +// CHECK-64: }, { +// CHECK-64: i8* getelementptr inbounds ([5 x i8]* @"\01L_selector_data(init)", i64 0, i64 0), +// CHECK-64: i8* getelementptr inbounds ([8 x i8]* [[GETTER_ENCODING]], i64 0, i64 0), +// CHECK-64: i8* bitcast ([[OPAQUE18:%.*]]* ([[OPAQUE19:%.*]]*, i8*)* @_TToFC13objc_subclass11SwiftGizmo2cfMS0_FT_S0_ to i8*) +// CHECK-64: }, { +// CHECK-64: i8* getelementptr inbounds ([17 x i8]* @"\01L_selector_data(initWithBellsOn:)", i64 0, i64 0), +// CHECK-64: i8* getelementptr inbounds ([11 x i8]* {{@[0-9]+}}, i64 0, i64 0), +// CHECK-64: i8* bitcast ([[OPAQUE21:%.*]]* ([[OPAQUE22:%.*]]*, i8*, i64)* @_TToFC13objc_subclass11SwiftGizmo2cfMS0_FT7bellsOnSi_GSQS0__ to i8*) +// CHECK-64: }, { +// CHECK-64: i8* getelementptr inbounds ([14 x i8]* @"\01L_selector_data(.cxx_destruct)", i64 0, i64 0), +// CHECK-64: i8* getelementptr inbounds ([3 x i8]* {{@[0-9]+}}, i64 0, i64 0) +// CHECK-64: i8* bitcast (void ([[OPAQUE20:%.*]]*, i8*)* @_TToFC13objc_subclass11SwiftGizmo2E to i8*) +// CHECK-64: } +// CHECK-64: ] } + + +// CHECK: @objc_classes = internal global [2 x i8*] [i8* bitcast (%swift.type* getelementptr inbounds (%swift.full_heapmetadata* bitcast ({{.*}}* @_TMdC13objc_subclass10SwiftGizmo to %swift.full_heapmetadata*), i32 0, i32 2) to i8*), i8* bitcast (%swift.type* getelementptr inbounds (%swift.full_heapmetadata* bitcast ({{.*}}* @_TMdC13objc_subclass11SwiftGizmo2 to %swift.full_heapmetadata*), i32 0, i32 2) to i8*)], section "__DATA, __objc_classlist, regular, no_dead_strip", align [[WORD_SIZE_IN_BYTES]] +// CHECK: @objc_non_lazy_classes = internal global [1 x i8*] [i8* bitcast (%swift.type* getelementptr inbounds (%swift.full_heapmetadata* bitcast ({{.*}}* @_TMdC13objc_subclass11SwiftGizmo2 to %swift.full_heapmetadata*), i32 0, i32 2) to i8*)], section "__DATA, __objc_nlclslist, regular, no_dead_strip", align [[WORD_SIZE_IN_BYTES]] + +import Foundation import gizmo @requires_stored_property_inits @@ -171,7 +300,7 @@ class SwiftGizmo : Gizmo { } @objc(setIsEnabled:) set { - } + } } } @@ -184,7 +313,7 @@ class GenericGizmo : Gizmo { var array : [T] = [] } -// CHECK: define hidden i64 @_TFC13objc_subclass12GenericGizmog1xSi( +// CHECK: define hidden [[LLVM_PTRSIZE_INT]] @_TFC13objc_subclass12GenericGizmog1xSi( var sg = SwiftGizmo() sg.duplicate() @@ -193,7 +322,7 @@ sg.duplicate() class SwiftGizmo2 : Gizmo { var sg : SwiftGizmo - override init() { + override init() { sg = SwiftGizmo() super.init() } diff --git a/test/IRGen/objc_subscripts.swift b/test/IRGen/objc_subscripts.swift index 4d6ccc21989b9..6b186d0b28195 100644 --- a/test/IRGen/objc_subscripts.swift +++ b/test/IRGen/objc_subscripts.swift @@ -1,5 +1,6 @@ -// RUN: rm -rf %t/clang-module-cache -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | FileCheck %s + +// REQUIRES: CPU=x86_64 // CHECK: @_INSTANCE_METHODS__TtC15objc_subscripts10SomeObject = // CHECK: private constant { i32, i32, [5 x { i8*, i8*, i8* }] } diff --git a/test/IRGen/objc_super.swift b/test/IRGen/objc_super.swift index 6c9cb379ee7e9..9ab3dc238cf43 100644 --- a/test/IRGen/objc_super.swift +++ b/test/IRGen/objc_super.swift @@ -1,6 +1,9 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 + import gizmo // CHECK: [[CLASS:%objc_class]] = type diff --git a/test/IRGen/objc_type_encoding.swift b/test/IRGen/objc_type_encoding.swift index a0aa726cc7c3d..de620078dc8e4 100644 --- a/test/IRGen/objc_type_encoding.swift +++ b/test/IRGen/objc_type_encoding.swift @@ -1,8 +1,12 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 +// REQUIRES: objc_interop import ObjectiveC +import Foundation import gizmo @objc protocol P1 {} diff --git a/test/IRGen/ordering.sil b/test/IRGen/ordering.sil index f33e2b6b2d7b1..256ac51ea3d7b 100644 --- a/test/IRGen/ordering.sil +++ b/test/IRGen/ordering.sil @@ -1,4 +1,9 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %swift -target x86_64-apple-macosx10.9 -module-name main %s -emit-ir -o - | FileCheck %s +// RUN: %swift -target i386-apple-ios7.1 %s -module-name main -emit-ir -o - | FileCheck %s +// RUN: %swift -target x86_64-apple-ios7.1 %s -module-name main -emit-ir -o - | FileCheck %s +// RUN: %swift -target armv7-apple-ios7.1 %s -module-name main -emit-ir -o - | FileCheck %s +// RUN: %swift -target arm64-apple-ios7.1 %s -module-name main -emit-ir -o - | FileCheck %s +// RUN: %swift -target x86_64-unknown-linux-gnu -disable-objc-interop %s -module-name main -emit-ir -o - | FileCheck %s sil_stage canonical diff --git a/test/IRGen/partial_apply.sil b/test/IRGen/partial_apply.sil index c9b250e2d0736..285f737a8d14a 100644 --- a/test/IRGen/partial_apply.sil +++ b/test/IRGen/partial_apply.sil @@ -1,6 +1,9 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 +// REQUIRES: objc_interop import Builtin import Swift diff --git a/test/IRGen/partial_apply_generic.swift b/test/IRGen/partial_apply_generic.swift index 7a02181ea546a..45c86f5ee30a8 100644 --- a/test/IRGen/partial_apply_generic.swift +++ b/test/IRGen/partial_apply_generic.swift @@ -1,4 +1,7 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 + // Broken due to lack of NonFixedOffsets and NecessaryBindings on HeapLayouts // -JoeG // XFAIL: * diff --git a/test/IRGen/pic.swift b/test/IRGen/pic.swift index 733b08ad278de..0327ba0c3f86c 100644 --- a/test/IRGen/pic.swift +++ b/test/IRGen/pic.swift @@ -1,11 +1,11 @@ // Check that we always use PIC relocations on all // platforms. -// RUN: %target-build-swift %s -S -o - | FileCheck -check-prefix=%target-cpu %s +// RUN: %target-swift-frontend %s -module-name main -S -o - | FileCheck -check-prefix=%target-cpu %s var global: Int = 0 -func use_global() -> Int { +public func use_global() -> Int { return global } diff --git a/test/IRGen/playground.swift b/test/IRGen/playground.swift index d6db51bd4ee02..b21c371628773 100644 --- a/test/IRGen/playground.swift +++ b/test/IRGen/playground.swift @@ -1,5 +1,8 @@ // RUN: rm -rf %t -// RUN: %swift -use-jit -playground -parse-stdlib -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -use-jit -playground -parse-stdlib %s -emit-ir -disable-objc-attr-requires-foundation-module | FileCheck %s + +// REQUIRES: OS=macosx +// REQUIRES: CPU=x86_64 import Swift diff --git a/test/IRGen/protocol_conformance_records.swift b/test/IRGen/protocol_conformance_records.swift index 0b73c061b31a3..5a6a4ec604d32 100644 --- a/test/IRGen/protocol_conformance_records.swift +++ b/test/IRGen/protocol_conformance_records.swift @@ -1,7 +1,8 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -emit-module -o %t %S/Inputs/objc_protocols_Bas.swift -// RUN: %swift -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/objc_protocols_Bas.swift +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck %s + import gizmo diff --git a/test/IRGen/protocol_metadata.swift b/test/IRGen/protocol_metadata.swift index 53f9f159c923a..08d0ed5531334 100644 --- a/test/IRGen/protocol_metadata.swift +++ b/test/IRGen/protocol_metadata.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | FileCheck %s + +// REQUIRES: CPU=x86_64 protocol A { func a() } protocol B { func b() } diff --git a/test/IRGen/rdar15304329.swift b/test/IRGen/rdar15304329.swift index 1b8f9fc6e1ec5..74b169990a7f9 100644 --- a/test/IRGen/rdar15304329.swift +++ b/test/IRGen/rdar15304329.swift @@ -1,6 +1,6 @@ // RUN: rm -rf %t && mkdir %t // RUN: %build-irgen-test-overlays -// RUN: %swift -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | FileCheck %s // CHECK-NOT: @_TWvi{{.*}} // CHECK: _TWvdvC12rdar153043293Bar3fooGVS_3FooSi_ diff --git a/test/IRGen/select_enum.sil b/test/IRGen/select_enum.sil index ab6c04509e8b4..38e3c7440f40a 100644 --- a/test/IRGen/select_enum.sil +++ b/test/IRGen/select_enum.sil @@ -1,4 +1,4 @@ -// RUN: %swift -gnone -emit-ir %s | FileCheck %s +// RUN: %target-swift-frontend -gnone -emit-ir %s | FileCheck %s import Builtin @@ -11,32 +11,32 @@ enum SinglePayloadSingleEmpty { sil @select_enum_SinglePayloadSingleEmpty : $@thin (@in SinglePayloadSingleEmpty) -> () { bb0(%0 : $*SinglePayloadSingleEmpty): %1 = load %0 : $*SinglePayloadSingleEmpty - // CHECK: [[PAYLOAD1:%[0-9]+]] = load i64* + // CHECK: [[PAYLOAD1:%[0-9]+]] = load [[WORD_TY:(i32|i64)]]* // CHECK: [[TAG1:%[0-9]+]] = load i1* %2 = integer_literal $Builtin.Int32, 2 %3 = integer_literal $Builtin.Int32, 3 - // CHECK: [[V1:%[0-9]+]] = icmp eq i64 [[PAYLOAD1]], 0 + // CHECK: [[V1:%[0-9]+]] = icmp eq [[WORD_TY]] [[PAYLOAD1]], 0 // CHECK-NEXT: [[V2:%[0-9]+]] = and i1 [[TAG1]], [[V1]] // CHECK-NEXT: select i1 [[V2]], i32 2, i32 3 %4 = select_enum %1 : $SinglePayloadSingleEmpty, case #SinglePayloadSingleEmpty.EmptyCase!enumelt: %2, case #SinglePayloadSingleEmpty.DataCase!enumelt.1: %3 : $Builtin.Int32 - // CHECK: [[V1:%[0-9]+]] = icmp eq i64 [[PAYLOAD1]], 0 + // CHECK: [[V1:%[0-9]+]] = icmp eq [[WORD_TY]] [[PAYLOAD1]], 0 // CHECK-NEXT: [[V2:%[0-9]+]] = and i1 [[TAG1]], [[V1]] // CHECK-NEXT: [[V3:%[0-9]+]] = xor i1 [[V2]], true // CHECK-NEXT: select i1 [[V3]], i32 3, i32 2 %5 = select_enum %1 : $SinglePayloadSingleEmpty, case #SinglePayloadSingleEmpty.DataCase!enumelt.1: %3, case #SinglePayloadSingleEmpty.EmptyCase!enumelt: %2 : $Builtin.Int32 - // CHECK: [[PAYLOAD0:%[0-9]+]] = load i64* + // CHECK: [[PAYLOAD0:%[0-9]+]] = load [[WORD_TY]]* // CHECK: [[TAG0:%[0-9]+]] = load i1* - // CHECK: [[V1:%[0-9]+]] = icmp eq i64 [[PAYLOAD0]], 0 + // CHECK: [[V1:%[0-9]+]] = icmp eq [[WORD_TY]] [[PAYLOAD0]], 0 // CHECK-NEXT: [[V2:%[0-9]+]] = and i1 [[TAG0]], [[V1]] // CHECK-NEXT: select i1 [[V2]], i32 2, i32 3 %6 = select_enum_addr %0 : $*SinglePayloadSingleEmpty, case #SinglePayloadSingleEmpty.EmptyCase!enumelt: %2, case #SinglePayloadSingleEmpty.DataCase!enumelt.1: %3 : $Builtin.Int32 - // CHECK: [[V1:%[0-9]+]] = icmp eq i64 [[PAYLOAD1]], 0 + // CHECK: [[V1:%[0-9]+]] = icmp eq [[WORD_TY]] [[PAYLOAD1]], 0 // CHECK-NEXT: [[V2:%[0-9]+]] = and i1 [[TAG1]], [[V1]] // CHECK-NEXT: select i1 [[V2]], i32 2, i32 3 %7 = select_enum %1 : $SinglePayloadSingleEmpty, case #SinglePayloadSingleEmpty.EmptyCase!enumelt: %2, default %3 : $Builtin.Int32 diff --git a/test/IRGen/select_enum_optimized.swift b/test/IRGen/select_enum_optimized.swift index e31e4073e7caa..c2dbdebbc5a08 100644 --- a/test/IRGen/select_enum_optimized.swift +++ b/test/IRGen/select_enum_optimized.swift @@ -1,4 +1,4 @@ -// RUN: %swift -primary-file %s -O -disable-llvm-optzns -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -O -disable-llvm-optzns -emit-ir | FileCheck %s enum NoPayload { case E0 diff --git a/test/IRGen/sil_generic_witness_methods.swift b/test/IRGen/sil_generic_witness_methods.swift index eec96d548b8ad..503d8a4a93c06 100644 --- a/test/IRGen/sil_generic_witness_methods.swift +++ b/test/IRGen/sil_generic_witness_methods.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | FileCheck %s + +// REQUIRES: CPU=x86_64 // FIXME: These should be SIL tests, but we can't parse generic types in SIL // yet. diff --git a/test/IRGen/sil_irgen_library.swift b/test/IRGen/sil_irgen_library.swift index 39cacfd64bb72..1fff9f985fae0 100644 --- a/test/IRGen/sil_irgen_library.swift +++ b/test/IRGen/sil_irgen_library.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -parse-as-library +// RUN: %target-swift-frontend %s -emit-ir -parse-as-library // Smoke test that SIL-IRGen can compile a library module offline. func f() {} diff --git a/test/IRGen/sil_irgen_standalone.swift b/test/IRGen/sil_irgen_standalone.swift index 6cc32d3898c85..a92617f1589c0 100644 --- a/test/IRGen/sil_irgen_standalone.swift +++ b/test/IRGen/sil_irgen_standalone.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir +// RUN: %target-swift-frontend %s -emit-ir // Smoke test that SIL-IRGen can compile a standalone program offline. func f() {} diff --git a/test/IRGen/sil_linkage.sil b/test/IRGen/sil_linkage.sil index f8f464fdb76fd..87c63c12c6a2c 100644 --- a/test/IRGen/sil_linkage.sil +++ b/test/IRGen/sil_linkage.sil @@ -1,4 +1,4 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s sil_stage canonical diff --git a/test/IRGen/sil_witness_methods.sil b/test/IRGen/sil_witness_methods.sil index 16d4bf4fe7ddb..7d1b88305e8d6 100644 --- a/test/IRGen/sil_witness_methods.sil +++ b/test/IRGen/sil_witness_methods.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 sil_stage canonical diff --git a/test/IRGen/sil_witness_tables.swift b/test/IRGen/sil_witness_tables.swift index 1060a110cd7b0..99312a568a1d3 100644 --- a/test/IRGen/sil_witness_tables.swift +++ b/test/IRGen/sil_witness_tables.swift @@ -1,6 +1,8 @@ // RUN: rm -rf %t && mkdir %t -// RUN: %swift -emit-module -o %t %S/sil_witness_tables_external_conformance.swift -// RUN: %swift -I %t -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -emit-module -o %t %S/sil_witness_tables_external_conformance.swift +// RUN: %target-swift-frontend -I %t -primary-file %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 import sil_witness_tables_external_conformance diff --git a/test/IRGen/sil_witness_tables_external_conformance.swift b/test/IRGen/sil_witness_tables_external_conformance.swift index 91da630ec155b..e56a886dd3fb2 100644 --- a/test/IRGen/sil_witness_tables_external_conformance.swift +++ b/test/IRGen/sil_witness_tables_external_conformance.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift // This module is used by the sil_witness_tables.swift test to exercise // referencing an external witness table for a conformance. diff --git a/test/IRGen/sil_witness_tables_external_witnesstable.swift b/test/IRGen/sil_witness_tables_external_witnesstable.swift index 340c102a00b5f..1b9a9cc090b4a 100644 --- a/test/IRGen/sil_witness_tables_external_witnesstable.swift +++ b/test/IRGen/sil_witness_tables_external_witnesstable.swift @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module %S/Inputs/sil_witness_tables_external_input.swift -o %t/Swift.swiftmodule -parse-stdlib -parse-as-library -module-name Swift -sil-serialize-all -module-link-name swiftCore -// RUN: %swift -I=%t -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -emit-module %S/Inputs/sil_witness_tables_external_input.swift -o %t/Swift.swiftmodule -parse-stdlib -parse-as-library -module-name Swift -sil-serialize-all -module-link-name swiftCore +// RUN: %target-swift-frontend -I %t -primary-file %s -emit-ir | FileCheck %s import Swift diff --git a/test/IRGen/static_initializer.sil b/test/IRGen/static_initializer.sil index b057a4b262f64..47a811be715a3 100644 --- a/test/IRGen/static_initializer.sil +++ b/test/IRGen/static_initializer.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 // Generated from // var x : Int = 2 diff --git a/test/IRGen/subclass.swift b/test/IRGen/subclass.swift index f028c2cf765d2..69ebe8a7a0d7b 100644 --- a/test/IRGen/subclass.swift +++ b/test/IRGen/subclass.swift @@ -1,4 +1,7 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 +// REQUIRES: objc_interop // CHECK: [[TYPE:%swift.type]] = type // CHECK: [[OBJC_CLASS:%objc_class]] = type { @@ -16,7 +19,7 @@ // CHECK: i64 ptrtoint ([[OBJC_CLASS]]* @_TMmC8subclass1A to i64), // CHECK: [[OBJC_CLASS]]* @"OBJC_CLASS_$_SwiftObject", // CHECK: [[OPAQUE]]* @_objc_empty_cache, -// CHECK: [[OPAQUE]]* @_objc_empty_vtable, +// CHECK: [[OPAQUE]]* {{(@_objc_empty_vtable|null)}}, // CHECK: i64 add (i64 ptrtoint ({ {{.*}} }* @_DATA__TtC8subclass1A to i64), i64 1), // CHECK: i64 ([[A]]*)* @_TFC8subclass1A1ffS0_FT_Si, // CHECK: [[A]]* ([[TYPE]]*)* @_TFC8subclass1A1gfMS0_FT_S0_ @@ -28,7 +31,7 @@ // CHECK: i64 ptrtoint ([[OBJC_CLASS]]* @_TMmC8subclass1B to i64), // CHECK: [[TYPE]]* getelementptr inbounds ([[FULL_HEAPMETADATA]]* bitcast ([[A_METADATA]]* @_TMdC8subclass1A to [[FULL_HEAPMETADATA]]*), i32 0, i32 2), // CHECK: [[OPAQUE]]* @_objc_empty_cache, -// CHECK: [[OPAQUE]]* @_objc_empty_vtable, +// CHECK: [[OPAQUE]]* {{(@_objc_empty_vtable|null)}}, // CHECK: i64 add (i64 ptrtoint ({ {{.*}} }* @_DATA__TtC8subclass1B to i64), i64 1), // CHECK: i64 ([[B]]*)* @_TFC8subclass1B1ffS0_FT_Si, // CHECK: [[A]]* ([[TYPE]]*)* @_TFC8subclass1A1gfMS0_FT_S0_ diff --git a/test/IRGen/typemetadata.sil b/test/IRGen/typemetadata.sil index 9566bbb821dcf..a65536d2fde2d 100644 --- a/test/IRGen/typemetadata.sil +++ b/test/IRGen/typemetadata.sil @@ -1,4 +1,6 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=x86_64 sil_stage canonical diff --git a/test/IRGen/unconditional_checked_cast.sil b/test/IRGen/unconditional_checked_cast.sil index 399d382a5a86a..3ddaaa566501b 100644 --- a/test/IRGen/unconditional_checked_cast.sil +++ b/test/IRGen/unconditional_checked_cast.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 // Make sure that we are able to lower unconditional_checked_cast // addresses for the super_to_archetype case and the downcast case. diff --git a/test/IRGen/undef.sil b/test/IRGen/undef.sil index 2fe22436743c0..70306465ed5b4 100644 --- a/test/IRGen/undef.sil +++ b/test/IRGen/undef.sil @@ -1,4 +1,6 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=x86_64 import Builtin diff --git a/test/IRGen/unimplemented_enums.sil b/test/IRGen/unimplemented_enums.sil index 189a19cc0ce32..ed43865578ab1 100644 --- a/test/IRGen/unimplemented_enums.sil +++ b/test/IRGen/unimplemented_enums.sil @@ -1,4 +1,4 @@ -// RUN: %swift -emit-ir %s -verify +// RUN: %target-swift-frontend -emit-ir %s -verify enum Either { // expected-error{{unimplemented}} case Left(T) diff --git a/test/IRGen/unimplemented_objc_generic_class.swift b/test/IRGen/unimplemented_objc_generic_class.swift index 30e4897a07783..231bfaaf95571 100644 --- a/test/IRGen/unimplemented_objc_generic_class.swift +++ b/test/IRGen/unimplemented_objc_generic_class.swift @@ -1,5 +1,4 @@ -// RUN: rm -rf %t/clang-module-cache -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir -verify +// RUN: %target-swift-frontend %s -emit-ir -verify -disable-objc-attr-requires-foundation-module @objc class ObjCBox { var x: T // expected-error{{unimplemented}} diff --git a/test/IRGen/unowned.sil b/test/IRGen/unowned.sil index 756c13c5270c9..4833ca1763cae 100644 --- a/test/IRGen/unowned.sil +++ b/test/IRGen/unowned.sil @@ -1,4 +1,6 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=x86_64 // CHECK: [[OPAQUE:%swift.opaque]] = type opaque // CHECK: [[TYPE:%swift.type]] = type diff --git a/test/IRGen/unused.sil b/test/IRGen/unused.sil index 01d55c64cdc59..3d50884a75b92 100644 --- a/test/IRGen/unused.sil +++ b/test/IRGen/unused.sil @@ -1,7 +1,9 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s > %t +// RUN: %target-swift-frontend -emit-ir %s > %t // RUN: FileCheck %s < %t // RUN: FileCheck -check-prefix=NEGATIVE %s < %t +// REQUIRES: CPU=x86_64 + sil_stage canonical sil private @foo : $@thin () -> () { diff --git a/test/IRGen/upcast.sil b/test/IRGen/upcast.sil index bb0477e67180c..94fb4f29d4f53 100644 --- a/test/IRGen/upcast.sil +++ b/test/IRGen/upcast.sil @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s // Make sure that we are able to lower upcast addresses. diff --git a/test/IRGen/value_buffers.sil b/test/IRGen/value_buffers.sil index 4127c41b729d2..1b9ea743f688c 100644 --- a/test/IRGen/value_buffers.sil +++ b/test/IRGen/value_buffers.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 sil_stage canonical diff --git a/test/IRGen/vector_reduction.swift b/test/IRGen/vector_reduction.swift index fc168f1814190..a456ee1b9768c 100644 --- a/test/IRGen/vector_reduction.swift +++ b/test/IRGen/vector_reduction.swift @@ -1,6 +1,8 @@ +// RUN: %target-swift-frontend -Ounchecked %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 + // We were missing target transform info and not vectorizing the loop below. -// RUN: %swift -target x86_64-apple-macosx10.9 -Ounchecked %s -emit-ir | FileCheck %s -// REQUIRES: X86 // CHECK: xor <2 x i64> diff --git a/test/IRGen/vtable.sil b/test/IRGen/vtable.sil index ac74fab81d39b..2cb5f4df75965 100644 --- a/test/IRGen/vtable.sil +++ b/test/IRGen/vtable.sil @@ -1,4 +1,7 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=x86_64 + sil_stage canonical import Builtin @@ -21,7 +24,7 @@ sil @_TFC6vtable1CD : $@cc(method) @thin (@owned C) -> () // CHECK: i64 ptrtoint (%objc_class* @_TMmC6vtable1C to i64), // CHECK: %objc_class* @"OBJC_CLASS_$_SwiftObject", // CHECK: %swift.opaque* @_objc_empty_cache, -// CHECK: %swift.opaque* @_objc_empty_vtable, +// CHECK: %swift.opaque* {{(@_objc_empty_vtable|null)}}, // CHECK: i64 add (i64 ptrtoint ({ i32, i32, i32, i32, i8*, i8*, i8*, i8*, i8*, i8*, i8* }* @_DATA__TtC6vtable1C to i64), i64 1), // CHECK: i32 3, i32 0, i32 16, i16 7, i16 0, // CHECK: i32 104, i32 16, diff --git a/test/IRGen/vtable_multi_file.swift b/test/IRGen/vtable_multi_file.swift index 024ab19c6bd6d..c85ca8d495872 100644 --- a/test/IRGen/vtable_multi_file.swift +++ b/test/IRGen/vtable_multi_file.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -primary-file %s %S/Inputs/vtable_multi_file_helper.swift -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s %S/Inputs/vtable_multi_file_helper.swift -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 // CHECK-LABEL: define hidden void @_TF17vtable_multi_file36baseClassVtablesIncludeImplicitInitsFT_T_() { func baseClassVtablesIncludeImplicitInits() { diff --git a/test/IRGen/weak.sil b/test/IRGen/weak.sil index 579ec4aa12ccc..1343c37d41768 100644 --- a/test/IRGen/weak.sil +++ b/test/IRGen/weak.sil @@ -1,4 +1,6 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=x86_64 // CHECK: [[OPAQUE:%swift.opaque]] = type opaque // CHECK: [[TYPE:%swift.type]] = type diff --git a/test/IRGen/weak_class_protocol.sil b/test/IRGen/weak_class_protocol.sil index fc77aee9a5061..ad4f6df509e67 100644 --- a/test/IRGen/weak_class_protocol.sil +++ b/test/IRGen/weak_class_protocol.sil @@ -1,4 +1,6 @@ -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s + +// REQUIRES: CPU=x86_64 import Swift diff --git a/test/IRGen/weak_import.swift b/test/IRGen/weak_import.swift index 0b26289594700..f01f686408da6 100644 --- a/test/IRGen/weak_import.swift +++ b/test/IRGen/weak_import.swift @@ -1,8 +1,13 @@ // RUN: rm -rf %t && mkdir %t -// RUN: %swift -target x86_64-apple-macosx10.9 -emit-module -o %t -sdk %S/Inputs %S/Inputs/ObjectiveC.swift -// RUN: %swift -target x86_64-apple-macosx10.9 -emit-module -o %t -sdk %S/Inputs %S/Inputs/Foundation.swift -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck -check-prefix=CHECK-10_9 %s -// RUN: %swift -target x86_64-apple-macosx10.10 -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck -check-prefix=CHECK-10_10 %s +// RUN: %build-irgen-test-overlays +// +// Specify explicit target triples for the deployment target to test weak +// linking for a symbol introduced in OS X 10.10. +// +// RUN: %target-swift-frontend -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck -check-prefix=CHECK-10_9 %s +// RUN: %target-swift-frontend -target x86_64-apple-macosx10.10 -sdk %S/Inputs -I %t -primary-file %s -emit-ir | FileCheck -check-prefix=CHECK-10_10 %s + +// REQUIRES: OS=macosx // FIXME: This test in written in Swift because the SIL parser fails // when referencing weak_variable. diff --git a/test/IRGen/weak_value_witnesses.sil b/test/IRGen/weak_value_witnesses.sil index a8655381f834c..019aae0602963 100644 --- a/test/IRGen/weak_value_witnesses.sil +++ b/test/IRGen/weak_value_witnesses.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck %s + +// REQUIRES: CPU=x86_64 import Swift diff --git a/test/IRGen/witness_method.sil b/test/IRGen/witness_method.sil index 6358e47087a93..ec6b3b768d4a7 100644 --- a/test/IRGen/witness_method.sil +++ b/test/IRGen/witness_method.sil @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend %s -emit-ir | FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s + +// REQUIRES: CPU=i386_or_x86_64 sil_stage canonical @@ -11,7 +13,8 @@ protocol DefCon { sil @defcon : $@thin (@out T, @thick T.Type) -> () { entry(%0: $*T, %1: $@thick T.Type): - // CHECK: [[WITNESS:%.*]] = load i8** %T.DefCon, align 8 + // CHECK-i386: [[WITNESS:%.*]] = load i8** %T.DefCon, align 4 + // CHECK-x86_64: [[WITNESS:%.*]] = load i8** %T.DefCon, align 8 // CHECK: [[METHOD:%.*]] = bitcast i8* [[WITNESS]] to void (%swift.opaque*, %swift.type*, %swift.type*)* // CHECK: call void [[METHOD]] %m = witness_method $T, #DefCon.init!allocator.1 : $@thin @cc(witness_method) (@out U, @thick U.Type) -> () diff --git a/test/Inputs/clang-importer-sdk/usr/include/Foundation.h b/test/Inputs/clang-importer-sdk/usr/include/Foundation.h index d9cce54f857a9..6966f04b1d28e 100644 --- a/test/Inputs/clang-importer-sdk/usr/include/Foundation.h +++ b/test/Inputs/clang-importer-sdk/usr/include/Foundation.h @@ -16,7 +16,9 @@ void *allocate(NSZone *zone); typedef double NSTimeInterval; extern NSUInteger NSRealMemoryAvailable(void) __attribute__((availability(macosx,introduced=10.0 ,deprecated=10.8,message="" ))) __attribute__((availability(ios,introduced=2.0 ,deprecated=6.0,message="" ))); -extern NSUInteger SomeCrazyAppExtensionForbiddenAPI(void) __attribute__((availability(macosx_app_extension,unavailable,message="Not available in App Extensions"))); +extern NSUInteger SomeCrazyAppExtensionForbiddenAPI(void) + __attribute__((availability(macosx_app_extension,unavailable,message="Not available in App Extensions"))) + __attribute__((availability(ios_app_extension,unavailable,message="Not available in App Extensions"))); #define NS_SWIFT_UNAVAILABLE __attribute__((annotate("swift1_unavailable"))) diff --git a/test/Interpreter/SDK/autorelease.swift b/test/Interpreter/SDK/autorelease.swift index b99586124c6ce..65119ac23f2e2 100644 --- a/test/Interpreter/SDK/autorelease.swift +++ b/test/Interpreter/SDK/autorelease.swift @@ -21,7 +21,7 @@ func useTemp() { } // objc_retainAutoreleasedReturnValue will fail to reclaim the first -// object autoreleased from each shared object on x86-64, so prime it. +// object autoreleased from each shared object on x86_64, so prime it. autoreleasepool { useTemp() } autoreleasepool { println("autorelease test begin") diff --git a/test/Interpreter/complex.swift b/test/Interpreter/complex.swift index af1463b65ca5d..783915ce2191c 100644 --- a/test/Interpreter/complex.swift +++ b/test/Interpreter/complex.swift @@ -1,4 +1,4 @@ -// RUN: %swift -verify -parse %s +// RUN: %target-parse-verify-swift public struct Complex { public var real = 0.0, imag = 0.0 diff --git a/test/Interpreter/import.swift b/test/Interpreter/import.swift index 98a3801d723f5..fb753ba22896d 100644 --- a/test/Interpreter/import.swift +++ b/test/Interpreter/import.swift @@ -1,4 +1,4 @@ -// RUN: %swift -interpret -I=%S/Inputs -enable-source-import %s | FileCheck %s +// RUN: %swift -interpret -I %S/Inputs -enable-source-import %s | FileCheck %s // REQUIRES: swift_interpreter // FIXME: This test uses IRGen with -enable-source-import; it may fail with -g. diff --git a/test/Interpreter/interpret_load_framework.swift b/test/Interpreter/interpret_load_framework.swift index 17c0f364d579a..2a625506f1f40 100644 --- a/test/Interpreter/interpret_load_framework.swift +++ b/test/Interpreter/interpret_load_framework.swift @@ -3,6 +3,8 @@ // RUN: %clang -dynamiclib %S/Inputs/VerySmallObjCFramework.m -fmodules -F %t -o %t/VerySmallObjCFramework.framework/VerySmallObjCFramework // RUN: %swift_driver -F %t %s | FileCheck %s +// REQUIRES: swift_interpreter + import VerySmallObjCFramework // CHECK: 42 diff --git a/test/Interpreter/process_arguments.swift b/test/Interpreter/process_arguments.swift index 4fe6f19b21166..8ce58c7cc43df 100644 --- a/test/Interpreter/process_arguments.swift +++ b/test/Interpreter/process_arguments.swift @@ -3,6 +3,8 @@ // RUN: %swift -interpret %s -Onone -g -- | FileCheck %s -check-prefix=CHECK-NONE // RUN: %swift -interpret %s -Onone -g -- a b c | FileCheck %s -check-prefix=CHECK-THREE +// REQUIRES: swift_interpreter + println("Begin") for arg in Process.arguments { println(arg) } println("End") diff --git a/test/Interpreter/protocol_lookup.swift b/test/Interpreter/protocol_lookup.swift index cbf34b9c2bfff..f4dd66c90da42 100644 --- a/test/Interpreter/protocol_lookup.swift +++ b/test/Interpreter/protocol_lookup.swift @@ -1,6 +1,6 @@ -// Check both AOT and JIT modes // RUN: %target-run-simple-swift | FileCheck %s -// RUN: %swift -interpret %s | FileCheck %s + +// Note: JIT mode is checked in Interpreter/protocol_lookup_jit.swift. protocol Fooable { func foo() diff --git a/test/Interpreter/protocol_lookup_jit.swift b/test/Interpreter/protocol_lookup_jit.swift index 3a2cc376e5e86..341130275f554 100644 --- a/test/Interpreter/protocol_lookup_jit.swift +++ b/test/Interpreter/protocol_lookup_jit.swift @@ -1,4 +1,5 @@ // Test protocol_lookup.swift in JIT mode. // RUN: %swift -interpret %S/protocol_lookup.swift | FileCheck %S/protocol_lookup.swift + // REQUIRES: swift_interpreter diff --git a/test/Interpreter/shebang.swift b/test/Interpreter/shebang.swift index a7c7c9637a100..807a2e6680037 100644 --- a/test/Interpreter/shebang.swift +++ b/test/Interpreter/shebang.swift @@ -5,6 +5,8 @@ // RUN: %t.shebang.swift | FileCheck -check-prefix=NONE %s // RUN: %t.shebang.swift a b c | FileCheck -check-prefix=THREE-ARGS %s +// REQUIRES: swift_interpreter + println("Begin") for arg in Process.arguments { println(arg) diff --git a/test/Misc/expression_too_complex.swift b/test/Misc/expression_too_complex.swift index 0fe8494fe8b5a..1738c3493e46e 100644 --- a/test/Misc/expression_too_complex.swift +++ b/test/Misc/expression_too_complex.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify -solver-memory-threshold 5000 +// RUN: %target-parse-verify-swift -solver-memory-threshold 5000 var x = [1, 2, 3, 4.5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 ,19] // expected-error{{expression was too complex to be solved in reasonable time; consider breaking up the expression into distinct sub-expressions}} diff --git a/test/Misc/fatal_error.swift b/test/Misc/fatal_error.swift index 4e7bc2d1119bf..26a7528c9c4a9 100644 --- a/test/Misc/fatal_error.swift +++ b/test/Misc/fatal_error.swift @@ -1,5 +1,5 @@ -// RUN: not %swift -parse %s -sdk "" 2>&1 | FileCheck -check-prefix=CHECK -check-prefix=NO-MODULE %s -// RUN: not %swift -parse %s -resource-dir / 2>&1 | FileCheck -check-prefix=CHECK -check-prefix=NO-STDLIB %s +// RUN: not %target-swift-frontend -parse %s -sdk "" 2>&1 | FileCheck -check-prefix=CHECK -check-prefix=NO-MODULE %s +// RUN: not %target-swift-frontend -parse %s -resource-dir / 2>&1 | FileCheck -check-prefix=CHECK -check-prefix=NO-STDLIB %s // NO-MODULE: error: no such module 'NonExistent' // NO-MODULE: note: did you forget to set an SDK using -sdk or SDKROOT? diff --git a/test/Misc/misc_diagnostics.swift b/test/Misc/misc_diagnostics.swift index 736ab26fc86e6..1238c1eaecf95 100644 --- a/test/Misc/misc_diagnostics.swift +++ b/test/Misc/misc_diagnostics.swift @@ -1,4 +1,5 @@ -// RUN: %target-swift-frontend %s -parse -verify +// RUN: %target-parse-verify-swift + import Foundation import CoreGraphics diff --git a/test/Misc/opt-debug-forbid-typecheck-prefix.swift b/test/Misc/opt-debug-forbid-typecheck-prefix.swift index a556e435afccb..0afc2b975defc 100644 --- a/test/Misc/opt-debug-forbid-typecheck-prefix.swift +++ b/test/Misc/opt-debug-forbid-typecheck-prefix.swift @@ -1,20 +1,20 @@ // This makes sure -debug-forbid-typecheck-prefix works as expected. -// RUN: not %swift -parse %s -D TRY1 -debug-forbid-typecheck-prefix FORBID_ 2> %t.txt +// RUN: not %target-swift-frontend -parse %s -D TRY1 -debug-forbid-typecheck-prefix FORBID_ 2> %t.txt // RUN: FileCheck -check-prefix=CHECK1 -input-file %t.txt %s #if TRY1 // CHECK1: LLVM ERROR: forbidden typecheck occurred: FORBID_global var FORBID_global = 0 #endif -// RUN: not %swift -parse %s -D TRY2 -debug-forbid-typecheck-prefix FORBID_ 2> %t.txt +// RUN: not %target-swift-frontend -parse %s -D TRY2 -debug-forbid-typecheck-prefix FORBID_ 2> %t.txt // RUN: FileCheck -check-prefix=CHECK2 -input-file %t.txt %s #if TRY2 // CHECK2: LLVM ERROR: forbidden typecheck occurred: FORBID_class class FORBID_class {} #endif -// RUN: not %swift -parse %s -D TRY3 -debug-forbid-typecheck-prefix FORBID_ 2> %t.txt +// RUN: not %target-swift-frontend -parse %s -D TRY3 -debug-forbid-typecheck-prefix FORBID_ 2> %t.txt // RUN: FileCheck -check-prefix=CHECK3 -input-file %t.txt %s #if TRY3 class C { @@ -23,7 +23,7 @@ class C { } #endif -// RUN: not %swift -parse %s -D TRY4 -debug-forbid-typecheck-prefix FORBID_ 2> %t.txt +// RUN: not %target-swift-frontend -parse %s -D TRY4 -debug-forbid-typecheck-prefix FORBID_ 2> %t.txt // RUN: FileCheck -check-prefix=CHECK4 -input-file %t.txt %s #if TRY4 class C { @@ -32,14 +32,14 @@ class C { } #endif -// RUN: not %swift -parse %s -D TRY5 -debug-forbid-typecheck-prefix FORBID_ 2> %t.txt +// RUN: not %target-swift-frontend -parse %s -D TRY5 -debug-forbid-typecheck-prefix FORBID_ 2> %t.txt // RUN: FileCheck -check-prefix=CHECK5 -input-file %t.txt %s #if TRY5 // CHECK5: LLVM ERROR: forbidden typecheck occurred: FORBID_func func FORBID_func() {} #endif -// RUN: not %swift -parse %s -D TRY6 -debug-forbid-typecheck-prefix FORBID_ 2> %t.txt +// RUN: not %target-swift-frontend -parse %s -D TRY6 -debug-forbid-typecheck-prefix FORBID_ 2> %t.txt // RUN: FileCheck -check-prefix=CHECK6 -input-file %t.txt %s #if TRY6 // CHECK6: LLVM ERROR: forbidden typecheck occurred: FORBID_local @@ -48,14 +48,14 @@ func globalFunc() { } #endif -// RUN: not %swift -parse %s -D TRY7 -debug-forbid-typecheck-prefix FORBID_ 2> %t.txt +// RUN: not %target-swift-frontend -parse %s -D TRY7 -debug-forbid-typecheck-prefix FORBID_ 2> %t.txt // RUN: FileCheck -check-prefix=CHECK7 -input-file %t.txt %s #if TRY7 // CHECK7: LLVM ERROR: forbidden typecheck occurred: FORBID_ref var global = FORBID_ref #endif -// RUN: not %swift -parse %s -D TRY8 -debug-forbid-typecheck-prefix FORBID_ 2> %t.txt +// RUN: not %target-swift-frontend -parse %s -D TRY8 -debug-forbid-typecheck-prefix FORBID_ 2> %t.txt // RUN: FileCheck -check-prefix=CHECK8 -input-file %t.txt %s #if TRY8 class C { diff --git a/test/Misc/serialized-diagnostics.swift b/test/Misc/serialized-diagnostics.swift index 7fa4df9f5d127..b831f53ddf9ca 100644 --- a/test/Misc/serialized-diagnostics.swift +++ b/test/Misc/serialized-diagnostics.swift @@ -1,12 +1,12 @@ // RUN: rm -f %t.* // Test swift executable -// RUN: %swift -parse -serialize-diagnostics-path %t.dia %s -verify +// RUN: %target-swift-frontend -parse -serialize-diagnostics-path %t.dia %s -verify // RUN: c-index-test -read-diagnostics %t.dia > %t.deserialized_diagnostics.txt 2>&1 // RUN: FileCheck --input-file=%t.deserialized_diagnostics.txt %s // Test swift_driver integrated frontend -// RUN: %swift -parse -serialize-diagnostics -serialize-diagnostics-path %t.integrated_frontend.dia %s -verify +// RUN: %target-swift-frontend -parse -serialize-diagnostics -serialize-diagnostics-path %t.integrated_frontend.dia %s -verify // RUN: c-index-test -read-diagnostics %t.integrated_frontend.dia > %t.integrated_frontend.deserialized_diagnostics.txt 2>&1 // RUN: FileCheck --input-file=%t.integrated_frontend.deserialized_diagnostics.txt %s diff --git a/test/NameBinding/MutualDependency.swift b/test/NameBinding/MutualDependency.swift index b8b26e8154655..bb8b8b2dd7ca7 100644 --- a/test/NameBinding/MutualDependency.swift +++ b/test/NameBinding/MutualDependency.swift @@ -1,9 +1,9 @@ -// RUN: %swift -parse %s -enable-source-import -I=%S/Inputs -parse-as-library -// RUN: %swift -parse %s -enable-source-import -I=%S/Inputs -// RUN: %swift -parse %S/Inputs/MutualDependencyHelper.swift -enable-source-import -I=%S +// RUN: %target-swift-frontend -parse %s -enable-source-import -I %S/Inputs -parse-as-library +// RUN: %target-swift-frontend -parse %s -enable-source-import -I %S/Inputs +// RUN: %target-swift-frontend -parse %S/Inputs/MutualDependencyHelper.swift -enable-source-import -I %S // FIXME: We should be able to handle this even in -i mode. -// RUN: %swift -interpret -I=%S/Inputs -enable-source-import %s -verify +// RUN: %target-swift-frontend -interpret -I %S/Inputs -enable-source-import %s -verify import MutualDependencyHelper diff --git a/test/NameBinding/accessibility.swift b/test/NameBinding/accessibility.swift index a312d2b07e270..dd952912749cd 100644 --- a/test/NameBinding/accessibility.swift +++ b/test/NameBinding/accessibility.swift @@ -1,12 +1,12 @@ // RUN: rm -rf %t && mkdir -p %t // RUN: cp %s %t/main.swift -// RUN: %swift -parse -primary-file %t/main.swift %S/Inputs/accessibility_other.swift -module-name accessibility -enable-private-discriminators -enable-source-import -I=%S/Inputs -sdk "" -enable-access-control -verify -// RUN: %swift -parse -primary-file %t/main.swift %S/Inputs/accessibility_other.swift -module-name accessibility -enable-private-discriminators -enable-source-import -I=%S/Inputs -sdk "" -disable-access-control -D DEFINE_VAR_FOR_SCOPED_IMPORT -D ACCESS_DISABLED +// RUN: %target-swift-frontend -parse -primary-file %t/main.swift %S/Inputs/accessibility_other.swift -module-name accessibility -enable-private-discriminators -enable-source-import -I %S/Inputs -sdk "" -enable-access-control -verify +// RUN: %target-swift-frontend -parse -primary-file %t/main.swift %S/Inputs/accessibility_other.swift -module-name accessibility -enable-private-discriminators -enable-source-import -I %S/Inputs -sdk "" -disable-access-control -D DEFINE_VAR_FOR_SCOPED_IMPORT -D ACCESS_DISABLED -// RUN: %swift -emit-module -o %t %S/Inputs/has_accessibility.swift -D DEFINE_VAR_FOR_SCOPED_IMPORT -// RUN: %swift -parse -primary-file %t/main.swift %S/Inputs/accessibility_other.swift -module-name accessibility -enable-private-discriminators -I=%t -sdk "" -enable-access-control -verify -// RUN: %swift -parse -primary-file %t/main.swift %S/Inputs/accessibility_other.swift -module-name accessibility -enable-private-discriminators -I=%t -sdk "" -disable-access-control -D ACCESS_DISABLED +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/has_accessibility.swift -D DEFINE_VAR_FOR_SCOPED_IMPORT +// RUN: %target-swift-frontend -parse -primary-file %t/main.swift %S/Inputs/accessibility_other.swift -module-name accessibility -enable-private-discriminators -I %t -sdk "" -enable-access-control -verify +// RUN: %target-swift-frontend -parse -primary-file %t/main.swift %S/Inputs/accessibility_other.swift -module-name accessibility -enable-private-discriminators -I %t -sdk "" -disable-access-control -D ACCESS_DISABLED import has_accessibility diff --git a/test/NameBinding/debug-client-discriminator.swift b/test/NameBinding/debug-client-discriminator.swift index 7597ed9bec859..681cd222b7e87 100644 --- a/test/NameBinding/debug-client-discriminator.swift +++ b/test/NameBinding/debug-client-discriminator.swift @@ -1,9 +1,9 @@ // RUN: rm -rf %t && mkdir -p %t -// RUN: %swift -emit-module -o %t -module-name HasPrivateAccess %S/Inputs/HasPrivateAccess1.swift %S/Inputs/HasPrivateAccess2.swift -// RUN: %swift-ide-test -print-ast-typechecked -source-filename %s -I %t -sdk "" -disable-access-control 2>&1 | FileCheck -check-prefix=CHECK-ERROR %s -// RUN: %swift-ide-test -print-ast-typechecked -source-filename %s -I %t -sdk "" -disable-access-control -explode-pattern-binding-decls -debug-client-discriminator _5AB3F657DD2A7E5E793501C5FA480C3D | FileCheck -check-prefix=CHECK-INT %s -// RUN: %swift-ide-test -print-ast-typechecked -source-filename %s -I %t -sdk "" -disable-access-control -explode-pattern-binding-decls -debug-client-discriminator _0D6EC78101B0986747C7103C2739A767 | FileCheck -check-prefix=CHECK-STRING %s +// RUN: %target-swift-frontend -emit-module -o %t -module-name HasPrivateAccess %S/Inputs/HasPrivateAccess1.swift %S/Inputs/HasPrivateAccess2.swift +// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -I %t -sdk "" -disable-access-control 2>&1 | FileCheck -check-prefix=CHECK-ERROR %s +// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -I %t -sdk "" -disable-access-control -explode-pattern-binding-decls -debug-client-discriminator _5AB3F657DD2A7E5E793501C5FA480C3D | FileCheck -check-prefix=CHECK-INT %s +// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -I %t -sdk "" -disable-access-control -explode-pattern-binding-decls -debug-client-discriminator _0D6EC78101B0986747C7103C2739A767 | FileCheck -check-prefix=CHECK-STRING %s import HasPrivateAccess diff --git a/test/NameBinding/import-resolution-2.swift b/test/NameBinding/import-resolution-2.swift index 08615de7c285a..887de1d39ff0a 100644 --- a/test/NameBinding/import-resolution-2.swift +++ b/test/NameBinding/import-resolution-2.swift @@ -1,10 +1,10 @@ // RUN: rm -rf %t // RUN: mkdir -p %t -// RUN: %swift -emit-module -o %t %S/Inputs/abcde.swift -// RUN: %swift -emit-module -o %t %S/Inputs/aeiou.swift -// RUN: %swift -emit-module -o %t %S/Inputs/asdf.swift -// RUN: %swift -emit-module -o %t -I=%t %S/Inputs/letters.swift -// RUN: %swift -parse %s -I=%t -sdk "" -verify +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/abcde.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/aeiou.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/asdf.swift +// RUN: %target-swift-frontend -emit-module -o %t -I %t %S/Inputs/letters.swift +// RUN: %target-swift-frontend -parse %s -I %t -sdk "" -verify import letters import aeiou diff --git a/test/NameBinding/import-resolution-overload.swift b/test/NameBinding/import-resolution-overload.swift index 4b9efd3ca5601..15cd83143ec5b 100644 --- a/test/NameBinding/import-resolution-overload.swift +++ b/test/NameBinding/import-resolution-overload.swift @@ -1,9 +1,9 @@ // RUN: rm -rf %t // RUN: mkdir -p %t -// RUN: %swift -emit-module -o %t %S/Inputs/overload_intFunctions.swift -// RUN: %swift -emit-module -o %t %S/Inputs/overload_boolFunctions.swift -// RUN: %swift -emit-module -o %t %S/Inputs/overload_vars.swift -// RUN: %swift -parse %s -I=%t -sdk "" -verify +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/overload_intFunctions.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/overload_boolFunctions.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/overload_vars.swift +// RUN: %target-swift-frontend -parse %s -I %t -sdk "" -verify import overload_intFunctions import overload_boolFunctions diff --git a/test/NameBinding/import-resolution.swift b/test/NameBinding/import-resolution.swift index e2fcfdd5194ad..aff9ee92a4642 100644 --- a/test/NameBinding/import-resolution.swift +++ b/test/NameBinding/import-resolution.swift @@ -1,16 +1,16 @@ // RUN: rm -rf %t // RUN: mkdir -p %t -// RUN: %swift -parse %s -enable-source-import -I=%S/Inputs -sdk "" -verify -show-diagnostics-after-fatal -// RUN: not %swift -parse %s -I=%S/Inputs -sdk "" -show-diagnostics-after-fatal 2>&1 | FileCheck %s -check-prefix=CHECK-NO-SOURCE-IMPORT +// RUN: %target-swift-frontend -parse %s -enable-source-import -I %S/Inputs -sdk "" -verify -show-diagnostics-after-fatal +// RUN: not %target-swift-frontend -parse %s -I %S/Inputs -sdk "" -show-diagnostics-after-fatal 2>&1 | FileCheck %s -check-prefix=CHECK-NO-SOURCE-IMPORT -// RUN: %swift -emit-module -o %t %S/Inputs/abcde.swift -// RUN: %swift -emit-module -o %t %S/Inputs/aeiou.swift -// RUN: %swift -emit-module -o %t %S/Inputs/asdf.swift -// RUN: %swift -emit-module -o %t -I=%t %S/Inputs/letters.swift -// RUN: %swift -parse %s -I=%t -sdk "" -verify -show-diagnostics-after-fatal +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/abcde.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/aeiou.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/asdf.swift +// RUN: %target-swift-frontend -emit-module -o %t -I %t %S/Inputs/letters.swift +// RUN: %target-swift-frontend -parse %s -I %t -sdk "" -verify -show-diagnostics-after-fatal -// RUN: %swift-ide-test -source-filename %s -print-module-imports -module-to-print=letters -I %t | FileCheck %s -check-prefix=CHECK-IMPORTS +// RUN: %target-swift-ide-test -source-filename %s -print-module-imports -module-to-print=letters -I %t | FileCheck %s -check-prefix=CHECK-IMPORTS // CHECK-NO-SOURCE-IMPORT: no such module 'letters' // CHECK-NO-SOURCE-IMPORT: no such module 'abcde' diff --git a/test/NameBinding/import-specific-decl.swift b/test/NameBinding/import-specific-decl.swift index cba0a82b25014..6911919b58e64 100644 --- a/test/NameBinding/import-specific-decl.swift +++ b/test/NameBinding/import-specific-decl.swift @@ -1,10 +1,10 @@ // RUN: rm -rf %t // RUN: mkdir -p %t -// RUN: %swift -emit-module -o %t %S/Inputs/asdf.swift -// RUN: %swift -emit-module -o %t %S/Inputs/abcde.swift -// RUN: %swift -emit-module -o %t %S/Inputs/aeiou.swift -// RUN: %swift -parse %s -I=%t -sdk "" -verify -// RUN: not %swift -parse %s -I=%t -sdk "" 2>&1 | FileCheck %s +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/asdf.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/abcde.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/aeiou.swift +// RUN: %target-swift-frontend -parse %s -I %t -sdk "" -verify +// RUN: not %target-swift-frontend -parse %s -I %t -sdk "" 2>&1 | FileCheck %s import struct aeiou.U import struct aeiou.E diff --git a/test/NameBinding/import-specific-fixits.swift b/test/NameBinding/import-specific-fixits.swift index 75c41f03c4c28..c1f93d06bf534 100644 --- a/test/NameBinding/import-specific-fixits.swift +++ b/test/NameBinding/import-specific-fixits.swift @@ -1,12 +1,12 @@ // RUN: rm -f %t.* // RUN: rm -rf %t // RUN: mkdir -p %t -// RUN: %swift -emit-module -o %t %S/Inputs/ambiguous_left.swift -// RUN: %swift -emit-module -o %t %S/Inputs/ambiguous_right.swift -// RUN: %swift -emit-module -o %t -I %t %S/Inputs/ambiguous.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/ambiguous_left.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/ambiguous_right.swift +// RUN: %target-swift-frontend -emit-module -o %t -I %t %S/Inputs/ambiguous.swift -// RUN: echo "public var x = Int()" | %swift -target x86_64-apple-macosx10.9 -module-name FooBar -emit-module -o %t - -// RUN: %swift -parse -I=%t -serialize-diagnostics-path %t.dia %s -verify +// RUN: echo "public var x = Int()" | %target-swift-frontend -module-name FooBar -emit-module -o %t - +// RUN: %target-swift-frontend -parse -I %t -serialize-diagnostics-path %t.dia %s -verify // RUN: c-index-test -read-diagnostics %t.dia > %t.deserialized_diagnostics.txt 2>&1 // RUN: FileCheck --input-file=%t.deserialized_diagnostics.txt %s diff --git a/test/NameBinding/library.swift b/test/NameBinding/library.swift index 9a35406484332..4b4b4645ce5e0 100644 --- a/test/NameBinding/library.swift +++ b/test/NameBinding/library.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -I=%S/Inputs -enable-source-import -parse-as-library -verify +// RUN: %target-swift-frontend -parse %s -I %S/Inputs -enable-source-import -parse-as-library -verify // Name lookup is global in a library. var x : x_ty = 4 diff --git a/test/NameBinding/multi-file-with-main.swift b/test/NameBinding/multi-file-with-main.swift index 0bf9790586ba0..dece2e3aa474a 100644 --- a/test/NameBinding/multi-file-with-main.swift +++ b/test/NameBinding/multi-file-with-main.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -enable-source-import -primary-file %s %S/Inputs/multi-file-with-main/main.swift -module-name=MultiFile -sdk "" -verify +// RUN: %target-swift-frontend -parse -enable-source-import -primary-file %s %S/Inputs/multi-file-with-main/main.swift -module-name=MultiFile -sdk "" -verify func testOperator() { // FIXME: Lousy error message. diff --git a/test/NameBinding/multi-file.swift b/test/NameBinding/multi-file.swift index 20b3c39c1ea9d..51b2016485c0c 100644 --- a/test/NameBinding/multi-file.swift +++ b/test/NameBinding/multi-file.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -parse-as-library -enable-source-import %s %S/Inputs/multi-file-2.swift %S/Inputs/multi-file-3.swift -module-name=MultiFile -I=%S/Inputs -sdk "" -verify +// RUN: %target-swift-frontend -parse -parse-as-library -enable-source-import %s %S/Inputs/multi-file-2.swift %S/Inputs/multi-file-3.swift -module-name MultiFile -I %S/Inputs -sdk "" -verify import ambiguous_left import tilde_tilde_low_precedence diff --git a/test/NameBinding/name-binding.swift b/test/NameBinding/name-binding.swift index 4ad86cec22939..8bd6a5e0b8288 100644 --- a/test/NameBinding/name-binding.swift +++ b/test/NameBinding/name-binding.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -module-name themodule -enable-source-import -I=%S/../decl -sdk "" -verify -show-diagnostics-after-fatal +// RUN: %target-swift-frontend -parse %s -module-name themodule -enable-source-import -I %S/../decl -sdk "" -verify -show-diagnostics-after-fatal import Swift import nonexistentimport // expected-error {{no such module 'nonexistentimport'}} diff --git a/test/NameBinding/name_lookup.swift b/test/NameBinding/name_lookup.swift index 2682d70de26da..7db7e49ff78ef 100644 --- a/test/NameBinding/name_lookup.swift +++ b/test/NameBinding/name_lookup.swift @@ -1,4 +1,4 @@ -// RUN: %swift -verify -parse %s +// RUN: %target-parse-verify-swift class ThisBase1 { init() { } diff --git a/test/NameBinding/reference-dependencies-dynamic-lookup.swift b/test/NameBinding/reference-dependencies-dynamic-lookup.swift index 3a2dc09bda134..f384b6abf2b93 100644 --- a/test/NameBinding/reference-dependencies-dynamic-lookup.swift +++ b/test/NameBinding/reference-dependencies-dynamic-lookup.swift @@ -1,6 +1,6 @@ // RUN: rm -rf %t && mkdir %t // RUN: cp %s %t/main.swift -// RUN: %swift %clang-importer-sdk -parse -primary-file %t/main.swift -emit-reference-dependencies-path - > %t.swiftdeps +// RUN: %target-swift-frontend %clang-importer-sdk -parse -primary-file %t/main.swift -emit-reference-dependencies-path - > %t.swiftdeps // RUN: FileCheck %s < %t.swiftdeps // RUN: FileCheck -check-prefix=NEGATIVE %s < %t.swiftdeps diff --git a/test/NameBinding/reference-dependencies.swift b/test/NameBinding/reference-dependencies.swift index 8333f7de06f94..9cc240a38557b 100644 --- a/test/NameBinding/reference-dependencies.swift +++ b/test/NameBinding/reference-dependencies.swift @@ -1,6 +1,6 @@ // RUN: rm -rf %t && mkdir %t // RUN: cp %s %t/main.swift -// RUN: %swift -parse -primary-file %t/main.swift %S/Inputs/reference-dependencies-helper.swift -emit-reference-dependencies-path - > %t.swiftdeps +// RUN: %target-swift-frontend -parse -primary-file %t/main.swift %S/Inputs/reference-dependencies-helper.swift -emit-reference-dependencies-path - > %t.swiftdeps // RUN: FileCheck %s < %t.swiftdeps // RUN: FileCheck -check-prefix=NEGATIVE %s < %t.swiftdeps diff --git a/test/NameBinding/stdlib-case-sensitive.swift b/test/NameBinding/stdlib-case-sensitive.swift index 89b0556322011..7453744ee5392 100644 --- a/test/NameBinding/stdlib-case-sensitive.swift +++ b/test/NameBinding/stdlib-case-sensitive.swift @@ -1,5 +1,5 @@ -// RUN: not %swift %s -parse -// RUN: not %swift -parse-stdlib %s -parse +// RUN: not %target-swift-frontend %s -parse +// RUN: not %target-swift-frontend -parse-stdlib %s -parse // Just don't crash when accidentally importing "SWIFT" instead of "Swift". diff --git a/test/NameBinding/stdlib.swift b/test/NameBinding/stdlib.swift index ac4d1558b3e91..03fa721373701 100644 --- a/test/NameBinding/stdlib.swift +++ b/test/NameBinding/stdlib.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-stdlib -module-name=Swift %s -parse -verify +// RUN: %target-parse-verify-swift -parse-stdlib -module-name Swift // struct X { diff --git a/test/Parse/BOM.swift b/test/Parse/BOM.swift index fbe1609213b4a..49298d79b7160 100644 --- a/test/Parse/BOM.swift +++ b/test/Parse/BOM.swift @@ -1,3 +1,3 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift ÿþ // expected-error{{input files must be encoded as UTF-8 instead of UTF-16}} asdfadf() // no error, the BOM marker causes us to skip to the end diff --git a/test/Parse/EOF/block-comment-missing-newline.swift b/test/Parse/EOF/block-comment-missing-newline.swift index 536a7c778faa9..271c3e392cbcb 100644 --- a/test/Parse/EOF/block-comment-missing-newline.swift +++ b/test/Parse/EOF/block-comment-missing-newline.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -verify -parse +// RUN: %target-parse-verify-swift // This file does not end in a trailing newline; this is deliberate! /* unterminated block comment expected-note{{comment started here}} expected-error{{unterminated '/*' comment}}{{127-127=*/}} \ No newline at end of file diff --git a/test/Parse/EOF/block-comment-nested.swift b/test/Parse/EOF/block-comment-nested.swift index 37038237564bd..c2a0f315db7b5 100644 --- a/test/Parse/EOF/block-comment-nested.swift +++ b/test/Parse/EOF/block-comment-nested.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -verify -parse +// RUN: %target-parse-verify-swift /* outer block comment starts here expected-note{{comment started here}} /* inner block comment starts and ends here */ diff --git a/test/Parse/EOF/block-comment.swift b/test/Parse/EOF/block-comment.swift index f65ce9326d7db..6dc98fa31605c 100644 --- a/test/Parse/EOF/block-comment.swift +++ b/test/Parse/EOF/block-comment.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -verify -parse +// RUN: %target-parse-verify-swift /* unterminated block comment expected-note{{comment started here}} expected-error{{unterminated '/*' comment}} {{60-60=*/}} diff --git a/test/Parse/EOF/interpolated-string-literal.swift b/test/Parse/EOF/interpolated-string-literal.swift index 0e535468cbfc2..e654acd847edc 100644 --- a/test/Parse/EOF/interpolated-string-literal.swift +++ b/test/Parse/EOF/interpolated-string-literal.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -verify -parse +// RUN: %target-parse-verify-swift // Parser used to crash while parsing a file where the last token was an // interpolated string literal. diff --git a/test/Parse/EOF/unfinished-for-at-eof.swift b/test/Parse/EOF/unfinished-for-at-eof.swift index f73ec67c66a1a..d11b0a835eee5 100644 --- a/test/Parse/EOF/unfinished-for-at-eof.swift +++ b/test/Parse/EOF/unfinished-for-at-eof.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -verify -parse +// RUN: %target-parse-verify-swift func fuzz() { for var H // expected-note@-1 {{to match this opening '{'}} diff --git a/test/Parse/EOF/unterminated-character-literal-1.swift b/test/Parse/EOF/unterminated-character-literal-1.swift index eca5acb376a90..4c9fa0625c356 100644 --- a/test/Parse/EOF/unterminated-character-literal-1.swift +++ b/test/Parse/EOF/unterminated-character-literal-1.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -verify -parse -enable-character-literals +// RUN: %target-parse-verify-swift -enable-character-literals // Check that we correctly process an unterminated character literal right near // EOF. diff --git a/test/Parse/EOF/unterminated-character-literal-2.swift b/test/Parse/EOF/unterminated-character-literal-2.swift index f9408948158dd..2d60266784bb7 100644 --- a/test/Parse/EOF/unterminated-character-literal-2.swift +++ b/test/Parse/EOF/unterminated-character-literal-2.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -verify -parse -enable-character-literals +// RUN: %target-parse-verify-swift -enable-character-literals // Check that we correctly process an unterminated character literal right near // EOF. diff --git a/test/Parse/EOF/unterminated-character-literal-missing-newline.swift b/test/Parse/EOF/unterminated-character-literal-missing-newline.swift index 9507181a6044b..aa223609a7a21 100644 --- a/test/Parse/EOF/unterminated-character-literal-missing-newline.swift +++ b/test/Parse/EOF/unterminated-character-literal-missing-newline.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -verify -parse -enable-character-literals +// RUN: %target-parse-verify-swift -enable-character-literals // Check that we correctly process an unterminated character literal right near // EOF. diff --git a/test/Parse/EOF/unterminated-string-literal-missing-newline.swift b/test/Parse/EOF/unterminated-string-literal-missing-newline.swift index 41f35d9d0cf15..ffcdce95dec5f 100644 --- a/test/Parse/EOF/unterminated-string-literal-missing-newline.swift +++ b/test/Parse/EOF/unterminated-string-literal-missing-newline.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -verify -parse +// RUN: %target-parse-verify-swift -enable-character-literals // Check that we correctly process an unterminated string literal right near EOF. diff --git a/test/Parse/availability_query.swift b/test/Parse/availability_query.swift index c11c1b7d293fa..ee64eb1205fbb 100644 --- a/test/Parse/availability_query.swift +++ b/test/Parse/availability_query.swift @@ -1,4 +1,6 @@ -// RUN: %swift -parse -enable-experimental-availability-checking -target x86_64-apple-macosx10.9 -verify %s +// RUN: %target-parse-verify-swift -enable-experimental-availability-checking + +// REQUIRES: OS=macosx if #os(OSX >= 10.10) { } diff --git a/test/Parse/brace_recovery_eof.swift b/test/Parse/brace_recovery_eof.swift index a7d210e69a704..332340ba6f99f 100644 --- a/test/Parse/brace_recovery_eof.swift +++ b/test/Parse/brace_recovery_eof.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift // Make sure source ranges satisfy the verifier. for foo in [1, 2] { // expected-note {{to match this opening '{'}} diff --git a/test/Parse/builtin_bridge_object.swift b/test/Parse/builtin_bridge_object.swift index 74b7925f4391b..d1dea22a3feab 100644 --- a/test/Parse/builtin_bridge_object.swift +++ b/test/Parse/builtin_bridge_object.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-stdlib -parse -verify %s +// RUN: %target-parse-verify-swift -parse-stdlib var word: Builtin.Word diff --git a/test/Parse/builtin_word.swift b/test/Parse/builtin_word.swift index 302060b8d0cc1..cc8694e9000e0 100644 --- a/test/Parse/builtin_word.swift +++ b/test/Parse/builtin_word.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-stdlib -parse -verify %s +// RUN: %target-parse-verify-swift -parse-stdlib var word: Builtin.Word var i16: Builtin.Int16 diff --git a/test/Parse/consecutive_statements.swift b/test/Parse/consecutive_statements.swift index 11a22bdb4aa06..1f1d2a3851c71 100644 --- a/test/Parse/consecutive_statements.swift +++ b/test/Parse/consecutive_statements.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift func statement_starts() { var f = { (x : Int) -> () in } diff --git a/test/Parse/debugger.swift b/test/Parse/debugger.swift index 225de273380a5..6c81459067148 100644 --- a/test/Parse/debugger.swift +++ b/test/Parse/debugger.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify -debugger-support +// RUN: %target-parse-verify-swift -debugger-support import Nonexistent_Module // expected-error {{no such module}} diff --git a/test/Parse/debugger_parse_only.swift b/test/Parse/debugger_parse_only.swift index 569768b64e056..785532845afce 100644 --- a/test/Parse/debugger_parse_only.swift +++ b/test/Parse/debugger_parse_only.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -verify -debugger-support -parse +// RUN: %target-parse-verify-swift -debugger-support // // This test is to make sure the parser allows imports in other than // top-level code when debugger support is on. The test only runs diff --git a/test/Parse/diagnostic_points_to_first_bad_token.swift b/test/Parse/diagnostic_points_to_first_bad_token.swift index 36cbd61d64eeb..3d478c1d5060e 100644 --- a/test/Parse/diagnostic_points_to_first_bad_token.swift +++ b/test/Parse/diagnostic_points_to_first_bad_token.swift @@ -1,4 +1,4 @@ -// RUN: not %swift -parse %s 2>&1 | FileCheck -strict-whitespace %s +// RUN: not %target-swift-frontend -parse %s 2>&1 | FileCheck -strict-whitespace %s // Test the diagnostic option 'PointsToFirstBadToken'. diff --git a/test/Parse/enum.swift b/test/Parse/enum.swift index 3adcfb734ac7d..47b694d7d23b2 100644 --- a/test/Parse/enum.swift +++ b/test/Parse/enum.swift @@ -1,4 +1,9 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift + +// FIXME: this test only passes on platforms which have Float80. +// Floating point enum raw values are not portable + +// REQUIRES: CPU=i386_or_x86_64 enum Empty {} diff --git a/test/Parse/escaped_identifiers.swift b/test/Parse/escaped_identifiers.swift index 8810ce908eaf0..25a4a5c4c77c5 100644 --- a/test/Parse/escaped_identifiers.swift +++ b/test/Parse/escaped_identifiers.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift func `protocol`() {} diff --git a/test/Parse/foreach.swift b/test/Parse/foreach.swift index eead2d491b306..7f44fb132f40a 100644 --- a/test/Parse/foreach.swift +++ b/test/Parse/foreach.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift struct IntRange : SequenceType, GeneratorType { typealias Element = (Int, Int) diff --git a/test/Parse/form_feed_char.swift b/test/Parse/form_feed_char.swift index 06ed8d1d9aa72..5a89f5a531bdb 100644 --- a/test/Parse/form_feed_char.swift +++ b/test/Parse/form_feed_char.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift class C { diff --git a/test/Parse/generic_disambiguation.swift b/test/Parse/generic_disambiguation.swift index 024dc2a705c33..fa666c680a331 100644 --- a/test/Parse/generic_disambiguation.swift +++ b/test/Parse/generic_disambiguation.swift @@ -1,4 +1,5 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift + struct A { // expected-note{{generic type 'A' declared here}} init(x:Int) {} static func c() {} diff --git a/test/Parse/hashbang_library.swift b/test/Parse/hashbang_library.swift index c96bc75bae35a..708de5317c0d4 100644 --- a/test/Parse/hashbang_library.swift +++ b/test/Parse/hashbang_library.swift @@ -2,5 +2,5 @@ class Foo {} // Check that we diagnose and skip the hashbang at the beginning of the file // when compiling in library mode. -// RUN: %swift -parse -parse-as-library %s -verify +// RUN: %target-parse-verify-swift -parse-as-library diff --git a/test/Parse/hashbang_main.swift b/test/Parse/hashbang_main.swift index 79713647f9183..c10086cd0b109 100644 --- a/test/Parse/hashbang_main.swift +++ b/test/Parse/hashbang_main.swift @@ -1,5 +1,5 @@ #!/usr/bin/swift println(42) // Check that we skip the hashbang at the beginning of the file. -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift diff --git a/test/Parse/identifiers.swift b/test/Parse/identifiers.swift index 22dacfeb7cc63..ebfc9abf67e77 100644 --- a/test/Parse/identifiers.swift +++ b/test/Parse/identifiers.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift class 你好 { class ×©×œ×•× { diff --git a/test/Parse/if_expr.swift b/test/Parse/if_expr.swift index 075b548a0ee08..bd40ea5a84435 100644 --- a/test/Parse/if_expr.swift +++ b/test/Parse/if_expr.swift @@ -1,4 +1,4 @@ -// RUN: %swift -dump-ast %s 2>&1 | FileCheck %s +// RUN: %target-swift-frontend -dump-ast %s 2>&1 | FileCheck %s // CHECK: (func_decl "r13756261(_:_:)" func r13756261(x: Bool, y: Int) -> Int { diff --git a/test/Parse/implicit_getter_incomplete.swift b/test/Parse/implicit_getter_incomplete.swift index de51b15bf62db..e722706630829 100644 --- a/test/Parse/implicit_getter_incomplete.swift +++ b/test/Parse/implicit_getter_incomplete.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift func test1() { var a : Int { diff --git a/test/Parse/init_deinit.swift b/test/Parse/init_deinit.swift index dcb76322b356f..2d8f0f97914f2 100644 --- a/test/Parse/init_deinit.swift +++ b/test/Parse/init_deinit.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift struct FooStructConstructorA { init // expected-error {{expected '('}} diff --git a/test/Parse/invalid-utf8.swift b/test/Parse/invalid-utf8.swift index 21b8ace54f994..eda5acecba234 100644 --- a/test/Parse/invalid-utf8.swift +++ b/test/Parse/invalid-utf8.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift var x = "" // expected-error{{invalid UTF-8 found in source file}} expected-error{{expected pattern}} diff --git a/test/Parse/invalid.swift b/test/Parse/invalid.swift index 8b773971f5c1d..a938bb5fe8c22 100644 --- a/test/Parse/invalid.swift +++ b/test/Parse/invalid.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift func foo(a: Int) { foo(<#a#>) // expected-error 2 {{expected ',' separator}} \ diff --git a/test/Parse/invalid_if_expr.swift b/test/Parse/invalid_if_expr.swift index 9fd60512da5cf..742a377a292c4 100644 --- a/test/Parse/invalid_if_expr.swift +++ b/test/Parse/invalid_if_expr.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift func unbalanced_question(a: Bool, b: Bool, c: Bool, d: Bool) { (a ? b) // expected-error{{expected ':' after '? ...' in ternary}} diff --git a/test/Parse/invalid_nested_types.swift b/test/Parse/invalid_nested_types.swift index 37ea7451f3543..6d3e3611ddcd2 100644 --- a/test/Parse/invalid_nested_types.swift +++ b/test/Parse/invalid_nested_types.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol P { class GC {} // expected-error{{type not allowed here}} diff --git a/test/Parse/keyword_in_pattern_recovery.swift b/test/Parse/keyword_in_pattern_recovery.swift index 07f615d424560..444d3d72ccc78 100644 --- a/test/Parse/keyword_in_pattern_recovery.swift +++ b/test/Parse/keyword_in_pattern_recovery.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -verify +// RUN: %target-parse-verify-swift // // Parse/keyword_in_pattern_recovery.swift is XFAIL'ed and it regressed // XFAIL: * diff --git a/test/Parse/line-directive.swift b/test/Parse/line-directive.swift index e89998729c027..b43415afeee0b 100644 --- a/test/Parse/line-directive.swift +++ b/test/Parse/line-directive.swift @@ -1,4 +1,5 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift + let x = 0 // We need this because of the #line-ends-with-a-newline requirement. #line diff --git a/test/Parse/matching_patterns.swift b/test/Parse/matching_patterns.swift index 2e190c63f185f..d3f3e6e4cc343 100644 --- a/test/Parse/matching_patterns.swift +++ b/test/Parse/matching_patterns.swift @@ -1,4 +1,4 @@ -// RUN: %swift -enable-experimental-patterns -I %S/Inputs -enable-source-import -parse -verify %s +// RUN: %target-parse-verify-swift -enable-experimental-patterns -I %S/Inputs -enable-source-import import imported_enums diff --git a/test/Parse/metatype_object_conversion.swift b/test/Parse/metatype_object_conversion.swift index 8833015a26034..05c4b6bc6b40f 100644 --- a/test/Parse/metatype_object_conversion.swift +++ b/test/Parse/metatype_object_conversion.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift class C {} struct S {} diff --git a/test/Parse/objc_enum.swift b/test/Parse/objc_enum.swift index fe6b9acf45696..4d99b22727c7e 100644 --- a/test/Parse/objc_enum.swift +++ b/test/Parse/objc_enum.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift @objc enum Foo: Int { case Zim, Zang, Zung diff --git a/test/Parse/operator_decl.swift b/test/Parse/operator_decl.swift index 3b7d939f35cb9..a7a39bccbe7b6 100644 --- a/test/Parse/operator_decl.swift +++ b/test/Parse/operator_decl.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift prefix operator +++ {} postfix operator +++ {} diff --git a/test/Parse/operators.swift b/test/Parse/operators.swift index 0afff52ea105f..38c241a417170 100644 --- a/test/Parse/operators.swift +++ b/test/Parse/operators.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -parse-stdlib -verify %s +// RUN: %target-parse-verify-swift -parse-stdlib // This disables importing the stdlib intentionally. diff --git a/test/Parse/optional.swift b/test/Parse/optional.swift index e46f116cb3362..2691a71b12c54 100644 --- a/test/Parse/optional.swift +++ b/test/Parse/optional.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift struct A { func foo() {} diff --git a/test/Parse/optional_chain_lvalues.swift b/test/Parse/optional_chain_lvalues.swift index 55d0a7e8ca238..18422c6b3b92b 100644 --- a/test/Parse/optional_chain_lvalues.swift +++ b/test/Parse/optional_chain_lvalues.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift struct S { var x: Int = 0 diff --git a/test/Parse/optional_lvalues.swift b/test/Parse/optional_lvalues.swift index 1ed18843c80b8..b67c3a1b843a0 100644 --- a/test/Parse/optional_lvalues.swift +++ b/test/Parse/optional_lvalues.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift struct S { var x: Int = 0 diff --git a/test/Parse/pattern_without_variables.swift b/test/Parse/pattern_without_variables.swift index 0621530293bfd..5aca7fc07b5e9 100644 --- a/test/Parse/pattern_without_variables.swift +++ b/test/Parse/pattern_without_variables.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify -parse-as-library %s +// RUN: %target-parse-verify-swift -parse-as-library var _ = 1 // expected-error{{global variable declaration does not bind any variables}} diff --git a/test/Parse/pattern_without_variables_script.swift b/test/Parse/pattern_without_variables_script.swift index 9578dba08e9f1..ba1e43fb49555 100644 --- a/test/Parse/pattern_without_variables_script.swift +++ b/test/Parse/pattern_without_variables_script.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift var _ = 1 diff --git a/test/Parse/playground_lvalues.swift b/test/Parse/playground_lvalues.swift index bcedc60869d39..749dc86fa4088 100644 --- a/test/Parse/playground_lvalues.swift +++ b/test/Parse/playground_lvalues.swift @@ -1,4 +1,4 @@ -// RUN: %swift -playground -parse -verify %s +// RUN: %target-parse-verify-swift -playground var a = 1, b = 2 let z = 3 diff --git a/test/Parse/pointer_conversion.swift b/test/Parse/pointer_conversion.swift index 9212cef896cba..84c58afd7f131 100644 --- a/test/Parse/pointer_conversion.swift +++ b/test/Parse/pointer_conversion.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift class C {} class D {} diff --git a/test/Parse/recovery.swift b/test/Parse/recovery.swift index 610cf28217a49..9bfa64413edd7 100644 --- a/test/Parse/recovery.swift +++ b/test/Parse/recovery.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift //===--- Helper types used in this file. diff --git a/test/Parse/recovery_library.swift b/test/Parse/recovery_library.swift index 20e70e9a77772..c81bc76d92c81 100644 --- a/test/Parse/recovery_library.swift +++ b/test/Parse/recovery_library.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -parse-as-library -verify +// RUN: %target-parse-verify-swift -parse-as-library //===--- Recovery for extra braces at top level. //===--- Keep this test the first one in the file. diff --git a/test/Parse/self_keyword_recovery.swift b/test/Parse/self_keyword_recovery.swift index 2a7892dc1054f..ae467971bdbc1 100644 --- a/test/Parse/self_keyword_recovery.swift +++ b/test/Parse/self_keyword_recovery.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -verify +// RUN: %target-parse-verify-swift // // test/Parse/self_keyword_recovery.swift is XFAIL'ed and it regressed // XFAIL: * diff --git a/test/Parse/strange-characters.swift b/test/Parse/strange-characters.swift index ac476001e8f55c74dc4cd4a0a0ff3e619304e433..513cd67afb2f2228ff245c200de9db6f0becd30e 100644 GIT binary patch delta 42 xcmeBYn#iQ2udfgk>Sv{(T9R0lo?4Sv{(T3nu)Rsy6HbPE!Tic=MI%TkLn(<&z_y$1m4a196m diff --git a/test/Parse/subscripting.swift b/test/Parse/subscripting.swift index ef22c98df4177..4fd4f85eeccbe 100644 --- a/test/Parse/subscripting.swift +++ b/test/Parse/subscripting.swift @@ -1,4 +1,5 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift + struct X { } // Simple examples diff --git a/test/Parse/super.swift b/test/Parse/super.swift index 0bcc3d2eb0872..7a9b6e0768e14 100644 --- a/test/Parse/super.swift +++ b/test/Parse/super.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift class B { var foo: Int diff --git a/test/Parse/switch.swift b/test/Parse/switch.swift index 5a142f2ccccd7..e358a91a5d394 100644 --- a/test/Parse/switch.swift +++ b/test/Parse/switch.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift // TODO: Implement tuple equality in the library. // BLOCKED: diff --git a/test/Parse/switch_incomplete.swift b/test/Parse/switch_incomplete.swift index 293e572eccfdb..9880d08e4ef03 100644 --- a/test/Parse/switch_incomplete.swift +++ b/test/Parse/switch_incomplete.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift // Incomplete switch was parsing to an AST that // triggered an assertion failure. diff --git a/test/Parse/toplevel_library.swift b/test/Parse/toplevel_library.swift index f6db58c2b2de8..fb391583d6536 100644 --- a/test/Parse/toplevel_library.swift +++ b/test/Parse/toplevel_library.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify -parse-as-library %s +// RUN: %target-parse-verify-swift -parse-as-library // make sure trailing semicolons are valid syntax in toplevel library code. var x = 4; diff --git a/test/Parse/toplevel_library_invalid.swift b/test/Parse/toplevel_library_invalid.swift index a5a46aac90502..d7e53753ab9f3 100644 --- a/test/Parse/toplevel_library_invalid.swift +++ b/test/Parse/toplevel_library_invalid.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify -parse-as-library %s +// RUN: %target-parse-verify-swift -parse-as-library println("a"); // expected-error {{expressions are not allowed at the top level}} println("a"); // expected-error {{expressions are not allowed at the top level}} diff --git a/test/Parse/trailing-semi.swift b/test/Parse/trailing-semi.swift index 149f40a7faece..e0ac86cdbb4d8 100644 --- a/test/Parse/trailing-semi.swift +++ b/test/Parse/trailing-semi.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift struct S { var a : Int ; diff --git a/test/Parse/type_expr.swift b/test/Parse/type_expr.swift index 9e61433fe0139..344849565b4da 100644 --- a/test/Parse/type_expr.swift +++ b/test/Parse/type_expr.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift // Types in expression contexts must be followed by a member access or // constructor call. diff --git a/test/Parse/typealias.swift b/test/Parse/typealias.swift index 348d571292f54..0422c45eeb16c 100644 --- a/test/Parse/typealias.swift +++ b/test/Parse/typealias.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift //===--- Simple positive tests. diff --git a/test/Parse/unsupported_nested_generics.swift b/test/Parse/unsupported_nested_generics.swift index 39cdbd35be405..20d4367dfcc02 100644 --- a/test/Parse/unsupported_nested_generics.swift +++ b/test/Parse/unsupported_nested_generics.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift struct OuterNonGeneric { // ok struct MidNonGeneric { // ok diff --git a/test/Parse/unsupported_recursive_local_functions.swift b/test/Parse/unsupported_recursive_local_functions.swift index ea05dcc70f6bb..a3fbfdccb4182 100644 --- a/test/Parse/unsupported_recursive_local_functions.swift +++ b/test/Parse/unsupported_recursive_local_functions.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift func foo() { var i = 0 diff --git a/test/PlaygroundTransform/array.swift b/test/PlaygroundTransform/array.swift index a8debc697cdac..06619f58853f7 100644 --- a/test/PlaygroundTransform/array.swift +++ b/test/PlaygroundTransform/array.swift @@ -3,6 +3,7 @@ // RUN: cp %s %t/main.swift // RUN: %target-build-swift -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PlaygroundsRuntime.swift %t/main.swift // RUN: %target-run %t/main | FileCheck %s + var foo = [true, false] foo.append(true) // CHECK: [{{.*}}] $builtin_log[foo='[true, false]'] diff --git a/test/PlaygroundTransform/control-flow.swift b/test/PlaygroundTransform/control-flow.swift index ba88d25060c45..b68be4e3cddbf 100644 --- a/test/PlaygroundTransform/control-flow.swift +++ b/test/PlaygroundTransform/control-flow.swift @@ -3,6 +3,7 @@ // RUN: cp %s %t/main.swift // RUN: %target-build-swift -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PlaygroundsRuntime.swift %t/main.swift // RUN: %target-run %t/main | FileCheck %s + var a = true if (a) { 5 diff --git a/test/PlaygroundTransform/declarations.swift b/test/PlaygroundTransform/declarations.swift index f8ffa4f433255..9938e2b042334 100644 --- a/test/PlaygroundTransform/declarations.swift +++ b/test/PlaygroundTransform/declarations.swift @@ -3,6 +3,7 @@ // RUN: cp %s %t/main.swift // RUN: %target-build-swift -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PlaygroundsRuntime.swift %t/main.swift // RUN: %target-run %t/main | FileCheck %s + var a = 2 var b = 3 a + b diff --git a/test/PlaygroundTransform/declarations_error.swift b/test/PlaygroundTransform/declarations_error.swift index 307a2a7c96acf..ef91418064f43 100644 --- a/test/PlaygroundTransform/declarations_error.swift +++ b/test/PlaygroundTransform/declarations_error.swift @@ -1,6 +1,6 @@ // RUN: rm -rf %t && mkdir %t // RUN: cp %s %t/main.swift -// RUN: not %swift -parse -playground %t/main.swift 2>&1 | FileCheck %s +// RUN: not %target-swift-frontend -parse -playground %t/main.swift 2>&1 | FileCheck %s // CHECK: error: no such module import Nonexistent_Module diff --git a/test/PlaygroundTransform/disable_transform_only.swift b/test/PlaygroundTransform/disable_transform_only.swift index c49488ba91ad4..0f6345c024e65 100644 --- a/test/PlaygroundTransform/disable_transform_only.swift +++ b/test/PlaygroundTransform/disable_transform_only.swift @@ -3,6 +3,7 @@ // RUN: cp %s %t/main.swift // RUN: %target-build-swift -Xfrontend -playground -Xfrontend -disable-playground-transform -Xfrontend -debugger-support -o %t/main %S/Inputs/PlaygroundsRuntime.swift %t/main.swift // RUN: %target-run %t/main | FileCheck %s -allow-empty + var a = 2 var b = 3 a + b diff --git a/test/PlaygroundTransform/import_error.swift b/test/PlaygroundTransform/import_error.swift index de52ef6e61db5..576459f3f169b 100644 --- a/test/PlaygroundTransform/import_error.swift +++ b/test/PlaygroundTransform/import_error.swift @@ -1,4 +1,5 @@ // RUN: rm -rf %t && mkdir %t // RUN: cp %s %t/main.swift -// RUN: %swift -parse -playground %t/main.swift -verify +// RUN: %target-swift-frontend -parse -playground %t/main.swift -verify + var $a = 2 // expected-error {{expected numeric value following '$'}} diff --git a/test/PlaygroundTransform/init.swift b/test/PlaygroundTransform/init.swift index b95792d2872db..53762d602a05e 100644 --- a/test/PlaygroundTransform/init.swift +++ b/test/PlaygroundTransform/init.swift @@ -3,6 +3,7 @@ // RUN: cp %s %t/main.swift // RUN: %target-build-swift -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PlaygroundsRuntime.swift %t/main.swift // RUN: %target-run %t/main | FileCheck %s + class B { init() { } diff --git a/test/PlaygroundTransform/mutation.swift b/test/PlaygroundTransform/mutation.swift index a5bbb87acda3f..d695c25cc74a8 100644 --- a/test/PlaygroundTransform/mutation.swift +++ b/test/PlaygroundTransform/mutation.swift @@ -3,6 +3,7 @@ // RUN: cp %s %t/main.swift // RUN: %target-build-swift -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PlaygroundsRuntime.swift %t/main.swift // RUN: %target-run %t/main | FileCheck %s + class A { func access() -> Void { } diff --git a/test/PrintAsObjC/accessibility.swift b/test/PrintAsObjC/accessibility.swift index 5c0000ab568d6..8fbdcc3bf68be 100644 --- a/test/PrintAsObjC/accessibility.swift +++ b/test/PrintAsObjC/accessibility.swift @@ -1,9 +1,9 @@ // RUN: rm -rf %t && mkdir %t -// RUN: %swift %s -parse -emit-objc-header-path %t/accessibility.h +// RUN: %target-swift-frontend %s -parse -emit-objc-header-path %t/accessibility.h -disable-objc-attr-requires-foundation-module // RUN: FileCheck -check-prefix=CHECK -check-prefix=CHECK-PUBLIC %s < %t/accessibility.h // RUN: %check-in-clang %t/accessibility.h -// RUN: %swift %clang-importer-sdk %s -parse -import-objc-header %S/../Inputs/empty.h -emit-objc-header-path %t/accessibility-internal.h +// RUN: %target-swift-frontend %clang-importer-sdk %s -parse -import-objc-header %S/../Inputs/empty.h -emit-objc-header-path %t/accessibility-internal.h -disable-objc-attr-requires-foundation-module // RUN: FileCheck -check-prefix=CHECK -check-prefix=CHECK-INTERNAL %s < %t/accessibility-internal.h // RUN: %check-in-clang %t/accessibility-internal.h diff --git a/test/PrintAsObjC/blocks.swift b/test/PrintAsObjC/blocks.swift index 7870caa897a15..cb3e8e8bb8204 100644 --- a/test/PrintAsObjC/blocks.swift +++ b/test/PrintAsObjC/blocks.swift @@ -2,8 +2,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift %clang-importer-sdk -emit-module -o %t %s -// RUN: %swift %clang-importer-sdk -parse-as-library %t/blocks.swiftmodule -parse -emit-objc-header-path %t/blocks.h -import-objc-header %S/../Inputs/empty.h +// RUN: %target-swift-frontend %clang-importer-sdk -emit-module -o %t %s -disable-objc-attr-requires-foundation-module +// RUN: %target-swift-frontend %clang-importer-sdk -parse-as-library %t/blocks.swiftmodule -parse -emit-objc-header-path %t/blocks.h -import-objc-header %S/../Inputs/empty.h -disable-objc-attr-requires-foundation-module // RUN: FileCheck %s < %t/blocks.h // RUN: %check-in-clang %t/blocks.h diff --git a/test/PrintAsObjC/classes.swift b/test/PrintAsObjC/classes.swift index b8b19a77fe326..b5e0732bb1206 100644 --- a/test/PrintAsObjC/classes.swift +++ b/test/PrintAsObjC/classes.swift @@ -3,8 +3,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift %clang-importer-sdk -enable-source-import -emit-module -o %t %s -// RUN: %swift %clang-importer-sdk -parse-as-library %t/classes.swiftmodule -parse -emit-objc-header-path %t/classes.h -import-objc-header %S/../Inputs/empty.h +// RUN: %target-swift-frontend %clang-importer-sdk -enable-source-import -emit-module -o %t %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse-as-library %t/classes.swiftmodule -parse -emit-objc-header-path %t/classes.h -import-objc-header %S/../Inputs/empty.h // RUN: FileCheck %s < %t/classes.h // RUN: FileCheck --check-prefix=NEGATIVE %s < %t/classes.h // RUN: %check-in-clang %t/classes.h diff --git a/test/PrintAsObjC/classes_objc_generics.swift b/test/PrintAsObjC/classes_objc_generics.swift index 01ecc29381fbc..1cf71e28ead72 100644 --- a/test/PrintAsObjC/classes_objc_generics.swift +++ b/test/PrintAsObjC/classes_objc_generics.swift @@ -4,8 +4,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -sdk %S/../Inputs/objc-generics-sdk -I %S/../Inputs/objc-generics-sdk/swift-modules -enable-source-import -emit-module -o %t %s -// RUN: %swift -sdk %S/../Inputs/objc-generics-sdk -I %S/../Inputs/objc-generics-sdk/swift-modules -enable-source-import -parse-as-library %t/classes_objc_generics.swiftmodule -parse -emit-objc-header-path %t/classes.h -import-objc-header %S/../Inputs/empty.h +// RUN: %target-swift-frontend -sdk %S/../Inputs/objc-generics-sdk -I %S/../Inputs/objc-generics-sdk/swift-modules -enable-source-import -emit-module -o %t %s +// RUN: %target-swift-frontend -sdk %S/../Inputs/objc-generics-sdk -I %S/../Inputs/objc-generics-sdk/swift-modules -enable-source-import -parse-as-library %t/classes_objc_generics.swiftmodule -parse -emit-objc-header-path %t/classes.h -import-objc-header %S/../Inputs/empty.h // RUN: FileCheck %s < %t/classes.h // RUN: FileCheck --check-prefix=NEGATIVE %s < %t/classes.h // RUN: %check-in-clang-objc-generics %t/classes.h diff --git a/test/PrintAsObjC/comments.swift b/test/PrintAsObjC/comments.swift index 7d001d77e7666..b3a1e4e72cf87 100644 --- a/test/PrintAsObjC/comments.swift +++ b/test/PrintAsObjC/comments.swift @@ -2,8 +2,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift %clang-importer-sdk -enable-source-import -emit-module -emit-module-path %t/comments.swiftmodule -emit-module-doc -emit-module-doc-path %t/comments.swiftdoc -module-name comments %S/../Inputs/comment_to_something_conversion.swift -// RUN: %swift %clang-importer-sdk -parse-as-library %t/comments.swiftmodule -parse -emit-objc-header-path %t/comments.h -import-objc-header %S/../Inputs/empty.h +// RUN: %target-swift-frontend %clang-importer-sdk -enable-source-import -emit-module -emit-module-path %t/comments.swiftmodule -emit-module-doc -emit-module-doc-path %t/comments.swiftdoc -module-name comments %S/../Inputs/comment_to_something_conversion.swift -disable-objc-attr-requires-foundation-module +// RUN: %target-swift-frontend %clang-importer-sdk -parse-as-library %t/comments.swiftmodule -parse -emit-objc-header-path %t/comments.h -import-objc-header %S/../Inputs/empty.h -disable-objc-attr-requires-foundation-module // RUN: sed -n -e '/A000/,$ p' %t/comments.h > %t/comments.h-cleaned // RUN: diff %t/comments.h-cleaned %S/Inputs/comments-expected-output.h // RUN: %check-in-clang -Wno-documentation %t/comments.h diff --git a/test/PrintAsObjC/empty.swift b/test/PrintAsObjC/empty.swift index af4fe83e952c8..674dbe400971b 100644 --- a/test/PrintAsObjC/empty.swift +++ b/test/PrintAsObjC/empty.swift @@ -1,6 +1,6 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift %clang-importer-sdk %s -parse -emit-objc-header-path %t/empty.h +// RUN: %target-swift-frontend %clang-importer-sdk %s -parse -emit-objc-header-path %t/empty.h // RUN: FileCheck %s < %t/empty.h // RUN: %check-in-clang %t/empty.h // RUN: %check-in-clang -fno-modules %t/empty.h diff --git a/test/PrintAsObjC/enums.swift b/test/PrintAsObjC/enums.swift index b307d1e6d6756..22b4479120594 100644 --- a/test/PrintAsObjC/enums.swift +++ b/test/PrintAsObjC/enums.swift @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift %clang-importer-sdk -enable-source-import -emit-module -emit-module-doc -o %t %s -// RUN: %swift %clang-importer-sdk -parse-as-library %t/enums.swiftmodule -parse -emit-objc-header-path %t/enums.h -import-objc-header %S/../Inputs/empty.h +// RUN: %target-swift-frontend %clang-importer-sdk -enable-source-import -emit-module -emit-module-doc -o %t %s -disable-objc-attr-requires-foundation-module +// RUN: %target-swift-frontend %clang-importer-sdk -parse-as-library %t/enums.swiftmodule -parse -emit-objc-header-path %t/enums.h -import-objc-header %S/../Inputs/empty.h -disable-objc-attr-requires-foundation-module // RUN: FileCheck %s < %t/enums.h // RUN: %check-in-clang %t/enums.h // RUN: %check-in-clang -fno-modules %t/enums.h -include Foundation.h -include ctypes.h -include CoreFoundation.h diff --git a/test/PrintAsObjC/extensions.swift b/test/PrintAsObjC/extensions.swift index 0f6da4f82f6ed..b6bd807cae76c 100644 --- a/test/PrintAsObjC/extensions.swift +++ b/test/PrintAsObjC/extensions.swift @@ -2,8 +2,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift %clang-importer-sdk -emit-module -o %t %s -// RUN: %swift %clang-importer-sdk -parse-as-library %t/extensions.swiftmodule -parse -emit-objc-header-path %t/extensions.h -import-objc-header %S/../Inputs/empty.h +// RUN: %target-swift-frontend %clang-importer-sdk -emit-module -o %t %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse-as-library %t/extensions.swiftmodule -parse -emit-objc-header-path %t/extensions.h -import-objc-header %S/../Inputs/empty.h // RUN: FileCheck %s < %t/extensions.h // RUN: FileCheck --check-prefix=NEGATIVE %s < %t/extensions.h // RUN: %check-in-clang %t/extensions.h diff --git a/test/PrintAsObjC/imports.swift b/test/PrintAsObjC/imports.swift index 15d511adc3b49..d7507d47de1fe 100644 --- a/test/PrintAsObjC/imports.swift +++ b/test/PrintAsObjC/imports.swift @@ -2,8 +2,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift %clang-importer-sdk -I %S/Inputs/custom-modules/ -emit-module -o %t %s -// RUN: %swift %clang-importer-sdk -I %S/Inputs/custom-modules/ -parse-as-library %t/imports.swiftmodule -parse -emit-objc-header-path %t/imports.h -import-objc-header %S/../Inputs/empty.h +// RUN: %target-swift-frontend %clang-importer-sdk -I %S/Inputs/custom-modules/ -emit-module -o %t %s +// RUN: %target-swift-frontend %clang-importer-sdk -I %S/Inputs/custom-modules/ -parse-as-library %t/imports.swiftmodule -parse -emit-objc-header-path %t/imports.h -import-objc-header %S/../Inputs/empty.h // RUN: FileCheck %s < %t/imports.h // RUN: FileCheck -check-prefix=NEGATIVE %s < %t/imports.h // RUN: %check-in-clang %t/imports.h -I %S/Inputs/custom-modules/ diff --git a/test/PrintAsObjC/local-types.swift b/test/PrintAsObjC/local-types.swift index e6b8c0a659a02..686a4df5105fa 100644 --- a/test/PrintAsObjC/local-types.swift +++ b/test/PrintAsObjC/local-types.swift @@ -2,8 +2,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift %clang-importer-sdk -emit-module -o %t %s -module-name local -// RUN: %swift %clang-importer-sdk -parse-as-library %t/local.swiftmodule -parse -emit-objc-header-path %t/local.h -import-objc-header %S/../Inputs/empty.h +// RUN: %target-swift-frontend %clang-importer-sdk -emit-module -o %t %s -module-name local -disable-objc-attr-requires-foundation-module +// RUN: %target-swift-frontend %clang-importer-sdk -parse-as-library %t/local.swiftmodule -parse -emit-objc-header-path %t/local.h -import-objc-header %S/../Inputs/empty.h -disable-objc-attr-requires-foundation-module // RUN: FileCheck %s < %t/local.h // RUN: %check-in-clang %t/local.h diff --git a/test/PrintAsObjC/mixed-framework-fwd.swift b/test/PrintAsObjC/mixed-framework-fwd.swift index 47f9a21ba6f9b..013a532d5c2aa 100644 --- a/test/PrintAsObjC/mixed-framework-fwd.swift +++ b/test/PrintAsObjC/mixed-framework-fwd.swift @@ -1,17 +1,17 @@ // RUN: rm -rf %t && mkdir %t -// RUN: %swift %clang-importer-sdk -F %S/Inputs/ -module-name Mixed -import-underlying-module %s -parse -emit-objc-header-path %t/mixed.h +// RUN: %target-swift-frontend %clang-importer-sdk -F %S/Inputs/ -module-name Mixed -import-underlying-module %s -parse -emit-objc-header-path %t/mixed.h // RUN: FileCheck -check-prefix=CHECK -check-prefix=NO-IMPORT %s < %t/mixed.h // RUN: %check-in-clang -F %S/Inputs/ %t/mixed.h -// RUN: %swift %clang-importer-sdk -module-name Mixed -import-objc-header %S/Inputs/Mixed.framework/Headers/Mixed.h %s -parse -emit-objc-header-path %t/mixed-header.h +// RUN: %target-swift-frontend %clang-importer-sdk -module-name Mixed -import-objc-header %S/Inputs/Mixed.framework/Headers/Mixed.h %s -parse -emit-objc-header-path %t/mixed-header.h // RUN: FileCheck -check-prefix=CHECK -check-prefix=NO-IMPORT %s < %t/mixed-header.h // RUN: %check-in-clang -include %S/Inputs/Mixed.framework/Headers/Mixed.h %t/mixed-header.h -// RUN: %swift %clang-importer-sdk -F %S/Inputs/ -module-name Mixed -import-underlying-module %s -parse -emit-objc-header-path %t/mixed-proto.h -DREQUIRE +// RUN: %target-swift-frontend %clang-importer-sdk -F %S/Inputs/ -module-name Mixed -import-underlying-module %s -parse -emit-objc-header-path %t/mixed-proto.h -DREQUIRE // RUN: FileCheck -check-prefix=CHECK -check-prefix=FRAMEWORK %s < %t/mixed-proto.h // RUN: %check-in-clang -F %S/Inputs/ %t/mixed-proto.h -// RUN: %swift %clang-importer-sdk -module-name Mixed -import-objc-header %S/Inputs/Mixed.framework/Headers/Mixed.h %s -parse -emit-objc-header-path %t/mixed-header-proto.h -DREQUIRE +// RUN: %target-swift-frontend %clang-importer-sdk -module-name Mixed -import-objc-header %S/Inputs/Mixed.framework/Headers/Mixed.h %s -parse -emit-objc-header-path %t/mixed-header-proto.h -DREQUIRE // RUN: FileCheck -check-prefix=CHECK -check-prefix=HEADER %s < %t/mixed-header-proto.h // RUN: %check-in-clang -include %S/Inputs/Mixed.framework/Headers/Mixed.h %t/mixed-header-proto.h diff --git a/test/PrintAsObjC/mixed-framework.swift b/test/PrintAsObjC/mixed-framework.swift index 11ae6fd68b8e8..7595fda895a22 100644 --- a/test/PrintAsObjC/mixed-framework.swift +++ b/test/PrintAsObjC/mixed-framework.swift @@ -1,10 +1,10 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift %clang-importer-sdk -F %S/Inputs/ -module-name Mixed -import-underlying-module %s -parse -emit-objc-header-path %t/mixed.h +// RUN: %target-swift-frontend %clang-importer-sdk -F %S/Inputs/ -module-name Mixed -import-underlying-module %s -parse -emit-objc-header-path %t/mixed.h // RUN: FileCheck -check-prefix=CHECK -check-prefix=FRAMEWORK %s < %t/mixed.h // RUN: %check-in-clang -F %S/Inputs/ %t/mixed.h -// RUN: %swift %clang-importer-sdk -module-name Mixed -import-objc-header %S/Inputs/Mixed.framework/Headers/Mixed.h %s -parse -emit-objc-header-path %t/mixed-header.h +// RUN: %target-swift-frontend %clang-importer-sdk -module-name Mixed -import-objc-header %S/Inputs/Mixed.framework/Headers/Mixed.h %s -parse -emit-objc-header-path %t/mixed-header.h // RUN: FileCheck -check-prefix=CHECK -check-prefix=HEADER %s < %t/mixed-header.h // RUN: %check-in-clang -include %S/Inputs/Mixed.framework/Headers/Mixed.h %t/mixed-header.h diff --git a/test/PrintAsObjC/pragma-clang.swift b/test/PrintAsObjC/pragma-clang.swift index 8e3ae1dc9c642..748b71b7a49e8 100644 --- a/test/PrintAsObjC/pragma-clang.swift +++ b/test/PrintAsObjC/pragma-clang.swift @@ -1,6 +1,6 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift %s -import-objc-header %S/Inputs/bridging-header.h %clang-importer-sdk -parse -emit-objc-header-path %t/pragma-clang.h +// RUN: %target-swift-frontend %s -import-objc-header %S/Inputs/bridging-header.h %clang-importer-sdk -parse -emit-objc-header-path %t/pragma-clang.h // RUN: %check-in-clang -fsyntax-only -Werror %t/pragma-clang.h // RUN: FileCheck %s < %t/pragma-clang.h diff --git a/test/PrintAsObjC/protocols.swift b/test/PrintAsObjC/protocols.swift index 3a3a970d895e5..b73923dd886d5 100644 --- a/test/PrintAsObjC/protocols.swift +++ b/test/PrintAsObjC/protocols.swift @@ -2,8 +2,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift %clang-importer-sdk -emit-module -o %t %s -// RUN: %swift %clang-importer-sdk -parse-as-library %t/protocols.swiftmodule -parse -emit-objc-header-path %t/protocols.h -import-objc-header %S/../Inputs/empty.h +// RUN: %target-swift-frontend %clang-importer-sdk -emit-module -o %t %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse-as-library %t/protocols.swiftmodule -parse -emit-objc-header-path %t/protocols.h -import-objc-header %S/../Inputs/empty.h // RUN: FileCheck %s < %t/protocols.h // RUN: FileCheck --check-prefix=NEGATIVE %s < %t/protocols.h // RUN: %check-in-clang %t/protocols.h diff --git a/test/SIL/Parser/apply_with_conformance.sil b/test/SIL/Parser/apply_with_conformance.sil index adf4bdb6e3997..fdf100624968b 100644 --- a/test/SIL/Parser/apply_with_conformance.sil +++ b/test/SIL/Parser/apply_with_conformance.sil @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -emit-ir %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir %s | FileCheck %s // radar://16375832 sil_stage raw diff --git a/test/SIL/Parser/apply_with_substitution.sil b/test/SIL/Parser/apply_with_substitution.sil index c470869304ddf..6ac7ed091d918 100644 --- a/test/SIL/Parser/apply_with_substitution.sil +++ b/test/SIL/Parser/apply_with_substitution.sil @@ -1,4 +1,4 @@ -// RUN: %swift %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend %s -emit-silgen | FileCheck %s // rdar://14443287 sil_stage raw diff --git a/test/SIL/Parser/available.sil b/test/SIL/Parser/available.sil index 9621aebcbbc04..cc1f3e2fae2f0 100644 --- a/test/SIL/Parser/available.sil +++ b/test/SIL/Parser/available.sil @@ -1,4 +1,5 @@ // RUN: %target-sil-opt %s -verify | FileCheck %s + @availability(*,unavailable,message="it has been renamed") public struct mmConstUnsafePointer { } diff --git a/test/SIL/Parser/basic.sil b/test/SIL/Parser/basic.sil index 2fc584f550c06..ff9912f2abded 100644 --- a/test/SIL/Parser/basic.sil +++ b/test/SIL/Parser/basic.sil @@ -1,4 +1,4 @@ -// RUN: %swift %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend %s -emit-silgen | FileCheck %s sil_stage raw // CHECK: sil_stage raw diff --git a/test/SIL/Parser/basic_objc.sil b/test/SIL/Parser/basic_objc.sil index fb6270c230180..3ba4ff86838e0 100644 --- a/test/SIL/Parser/basic_objc.sil +++ b/test/SIL/Parser/basic_objc.sil @@ -1,4 +1,6 @@ -// RUN: %swift %clang-importer-sdk %s -emit-silgen -target x86_64-apple-macosx10.9 | FileCheck %s +// RUN: %target-swift-frontend %clang-importer-sdk %s -emit-silgen | FileCheck %s + +// REQUIRES: objc_interop sil_stage raw // CHECK: sil_stage raw diff --git a/test/SIL/Parser/bound_generic.sil b/test/SIL/Parser/bound_generic.sil index 8b0a1586f0d88..eb7858e5544b2 100644 --- a/test/SIL/Parser/bound_generic.sil +++ b/test/SIL/Parser/bound_generic.sil @@ -1,4 +1,4 @@ -// RUN: %swift %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend %s -emit-silgen | FileCheck %s // rdar://14443287 sil_stage raw diff --git a/test/SIL/Parser/enum_in_class.sil b/test/SIL/Parser/enum_in_class.sil index 035324664f624..f6070fe83c5a0 100644 --- a/test/SIL/Parser/enum_in_class.sil +++ b/test/SIL/Parser/enum_in_class.sil @@ -1,4 +1,4 @@ -// RUN: %swift %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend %s -emit-silgen | FileCheck %s // rdar://16764223 diff --git a/test/SIL/Parser/errors.sil b/test/SIL/Parser/errors.sil index a252d9e56db54..36f30d3967809 100644 --- a/test/SIL/Parser/errors.sil +++ b/test/SIL/Parser/errors.sil @@ -1,4 +1,4 @@ -// RUN: %swift %s -emit-sil -verify +// RUN: %target-swift-frontend %s -emit-sil -verify sil_stage canonical sil_stage raw // expected-error {{sil_stage declared multiple times}} diff --git a/test/SIL/Parser/generics.sil b/test/SIL/Parser/generics.sil index cedb70b87d647..28bc4cdeed9fa 100644 --- a/test/SIL/Parser/generics.sil +++ b/test/SIL/Parser/generics.sil @@ -1,4 +1,4 @@ -// RUN: %swift %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend %s -emit-silgen | FileCheck %s sil_stage raw import Builtin diff --git a/test/SIL/Parser/global_init_attribute.sil b/test/SIL/Parser/global_init_attribute.sil index cfc8ec3bf2ab2..a06003dc8af26 100644 --- a/test/SIL/Parser/global_init_attribute.sil +++ b/test/SIL/Parser/global_init_attribute.sil @@ -1,4 +1,4 @@ -// RUN: %swift %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend %s -emit-silgen | FileCheck %s sil_stage canonical diff --git a/test/SIL/Parser/overloaded_member.sil b/test/SIL/Parser/overloaded_member.sil index 5d5078b14e176..22031708d8885 100644 --- a/test/SIL/Parser/overloaded_member.sil +++ b/test/SIL/Parser/overloaded_member.sil @@ -1,4 +1,5 @@ -// RUN: %swift %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend %s -emit-silgen | FileCheck %s + // rdar://15763213 // Make sure that we can parse SILDeclRef to an overloaded member. diff --git a/test/SIL/Parser/polymorphic_function.sil b/test/SIL/Parser/polymorphic_function.sil index ab7c738859623..43193494a9185 100644 --- a/test/SIL/Parser/polymorphic_function.sil +++ b/test/SIL/Parser/polymorphic_function.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -verify | FileCheck %s +// RUN: %target-sil-opt %s -verify | FileCheck %s + import Swift public protocol mmOutputStreamType { diff --git a/test/SIL/Parser/projection_lowered_type_parse.sil b/test/SIL/Parser/projection_lowered_type_parse.sil index a0851b6932d2a..63fd2ffdac570 100644 --- a/test/SIL/Parser/projection_lowered_type_parse.sil +++ b/test/SIL/Parser/projection_lowered_type_parse.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -verify +// RUN: %target-sil-opt %s -verify import Builtin diff --git a/test/SIL/Parser/protocol_getter.sil b/test/SIL/Parser/protocol_getter.sil index ff78f5dbfbcbf..a584a4128bceb 100644 --- a/test/SIL/Parser/protocol_getter.sil +++ b/test/SIL/Parser/protocol_getter.sil @@ -1,4 +1,4 @@ -// RUN: %swift %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend %s -emit-silgen | FileCheck %s // Verify that SILParser correctly handles witness_method on a getter. import Swift diff --git a/test/SIL/Parser/self_substitution.sil b/test/SIL/Parser/self_substitution.sil index d2709f76c0e41..914e8347a7142 100644 --- a/test/SIL/Parser/self_substitution.sil +++ b/test/SIL/Parser/self_substitution.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -verify | FileCheck %s +// RUN: %target-sil-opt %s -verify | FileCheck %s import Builtin import Swift diff --git a/test/SIL/Parser/static_initializer.sil b/test/SIL/Parser/static_initializer.sil index 100f03c4c0028..4c7fcab2e1925 100644 --- a/test/SIL/Parser/static_initializer.sil +++ b/test/SIL/Parser/static_initializer.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -verify | FileCheck %s +// RUN: %target-sil-opt %s -verify | FileCheck %s // Generated from // var x : Int = 2 diff --git a/test/SIL/Parser/stored_property.sil b/test/SIL/Parser/stored_property.sil index 493aed8989647..2bbadc18c5384 100644 --- a/test/SIL/Parser/stored_property.sil +++ b/test/SIL/Parser/stored_property.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -verify | FileCheck %s +// RUN: %target-sil-opt %s -verify | FileCheck %s import Swift diff --git a/test/SIL/Parser/string_literal.sil b/test/SIL/Parser/string_literal.sil index 6529d1282b512..2e5ecf8b377af 100644 --- a/test/SIL/Parser/string_literal.sil +++ b/test/SIL/Parser/string_literal.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -verify +// RUN: %target-sil-opt %s -verify sil @test : $@thin () -> () { bb0: diff --git a/test/SIL/Parser/unmanaged.sil b/test/SIL/Parser/unmanaged.sil index bc7c1028e371b..cdee7d297746a 100644 --- a/test/SIL/Parser/unmanaged.sil +++ b/test/SIL/Parser/unmanaged.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -verify +// RUN: %target-sil-opt %s -verify import Swift sil @test : $@thin (@inout Optional) -> () { diff --git a/test/SIL/Parser/where_clause.sil b/test/SIL/Parser/where_clause.sil index 40bfcaefdc933..92e6307b0dbf9 100644 --- a/test/SIL/Parser/where_clause.sil +++ b/test/SIL/Parser/where_clause.sil @@ -1,4 +1,4 @@ -// RUN: %swift %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend %s -emit-silgen | FileCheck %s // rdar://16238241 // Make sure we can parse where clause with conformance & same-type requirements. diff --git a/test/SIL/Parser/witness_bug.sil b/test/SIL/Parser/witness_bug.sil index 6b36c35983ca7..cf7847d5571e4 100644 --- a/test/SIL/Parser/witness_bug.sil +++ b/test/SIL/Parser/witness_bug.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -verify +// RUN: %target-sil-opt %s -verify + import Builtin import Swift diff --git a/test/SIL/Parser/witness_protocol_from_import.sil b/test/SIL/Parser/witness_protocol_from_import.sil index 14a6bfa38f391..0d29b16aa8f62 100644 --- a/test/SIL/Parser/witness_protocol_from_import.sil +++ b/test/SIL/Parser/witness_protocol_from_import.sil @@ -1,4 +1,4 @@ -// RUN: %swift %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend %s -emit-silgen | FileCheck %s sil_stage raw diff --git a/test/SIL/Parser/witness_specialize.sil b/test/SIL/Parser/witness_specialize.sil index b1f9e2fa7fec5..4ca20d47b8f65 100644 --- a/test/SIL/Parser/witness_specialize.sil +++ b/test/SIL/Parser/witness_specialize.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -module-name=witness_specialize -verify | %sil-opt -verify -module-name=witness_specialize | FileCheck %s +// RUN: %target-sil-opt %s -module-name=witness_specialize -verify | %target-sil-opt -verify -module-name=witness_specialize | FileCheck %s sil_stage raw diff --git a/test/SIL/Parser/witness_tables.sil b/test/SIL/Parser/witness_tables.sil index 71c6d781487ee..203943762ef72 100644 --- a/test/SIL/Parser/witness_tables.sil +++ b/test/SIL/Parser/witness_tables.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -module-name=witness_tables -verify | %sil-opt -verify -module-name=witness_tables | FileCheck %s +// RUN: %target-sil-opt %s -module-name=witness_tables -verify | %target-sil-opt -verify -module-name=witness_tables | FileCheck %s protocol AssocReqt { func requiredMethod() diff --git a/test/SIL/Parser/witness_with_inherited_gp.sil b/test/SIL/Parser/witness_with_inherited_gp.sil index 4450d63ff6095..101a067d38a1e 100644 --- a/test/SIL/Parser/witness_with_inherited_gp.sil +++ b/test/SIL/Parser/witness_with_inherited_gp.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -verify -module-name WitnessTableWithGP | FileCheck %s +// RUN: %target-sil-opt %s -verify -module-name WitnessTableWithGP | FileCheck %s + import Swift public struct mmEnumerateGenerator< diff --git a/test/SIL/Serialization/deserialize_appkit.sil b/test/SIL/Serialization/deserialize_appkit.sil index 3db18cddcaff4..f731bcdb2d00a 100644 --- a/test/SIL/Serialization/deserialize_appkit.sil +++ b/test/SIL/Serialization/deserialize_appkit.sil @@ -1,6 +1,7 @@ // Make sure that we can deserialize AppKit. // RUN: %target-sil-opt -verify %platform-module-dir/AppKit.swiftmodule > /dev/null // RUN: llvm-bcanalyzer %platform-module-dir/AppKit.swiftmodule | FileCheck %s + // REQUIRES: sdk // REQUIRES: OS=macosx diff --git a/test/SIL/Serialization/deserialize_coregraphics.swift b/test/SIL/Serialization/deserialize_coregraphics.swift index 02425d73effa2..7f24b32661eb8 100644 --- a/test/SIL/Serialization/deserialize_coregraphics.swift +++ b/test/SIL/Serialization/deserialize_coregraphics.swift @@ -1,6 +1,7 @@ // Make sure that we can deserialize CoreGraphics. // RUN: %target-sil-opt -verify %platform-module-dir/CoreGraphics.swiftmodule > /dev/null // RUN: llvm-bcanalyzer %platform-module-dir/CoreGraphics.swiftmodule | FileCheck %s + // REQUIRES: sdk // CHECK-NOT: Unknown diff --git a/test/SIL/Serialization/deserialize_darwin.sil b/test/SIL/Serialization/deserialize_darwin.sil index 584336f6f1a4f..80803598aaa8b 100644 --- a/test/SIL/Serialization/deserialize_darwin.sil +++ b/test/SIL/Serialization/deserialize_darwin.sil @@ -1,6 +1,7 @@ // Make sure that we can deserialize darwin. // RUN: %target-sil-opt -verify %platform-module-dir/Darwin.swiftmodule > /dev/null // RUN: llvm-bcanalyzer %platform-module-dir/Darwin.swiftmodule | FileCheck %s + // REQUIRES: sdk // CHECK-NOT: Unknown diff --git a/test/SIL/Serialization/deserialize_foundation.sil b/test/SIL/Serialization/deserialize_foundation.sil index 0b82e8e41f02c..689d55542ba96 100644 --- a/test/SIL/Serialization/deserialize_foundation.sil +++ b/test/SIL/Serialization/deserialize_foundation.sil @@ -1,6 +1,7 @@ // Make sure that we can deserialize foundation. // RUN: %target-sil-opt -verify %platform-module-dir/Foundation.swiftmodule > /dev/null // RUN: llvm-bcanalyzer %platform-module-dir/Foundation.swiftmodule | FileCheck %s + // REQUIRES: sdk // CHECK-NOT: Unknown diff --git a/test/SIL/Serialization/deserialize_generic.sil b/test/SIL/Serialization/deserialize_generic.sil index 039e28ff63949..88310bf530f90 100644 --- a/test/SIL/Serialization/deserialize_generic.sil +++ b/test/SIL/Serialization/deserialize_generic.sil @@ -5,6 +5,7 @@ // Make sure that SILFunctionType with GenericSignature can match up with // SILFunctionType deserialized from module. + sil_stage raw import def_generic diff --git a/test/SIL/Serialization/deserialize_objectivec.sil b/test/SIL/Serialization/deserialize_objectivec.sil index d132ae275156d..2a451805756e7 100644 --- a/test/SIL/Serialization/deserialize_objectivec.sil +++ b/test/SIL/Serialization/deserialize_objectivec.sil @@ -1,6 +1,7 @@ // Make sure that we can deserialize objective c. // RUN: %target-sil-opt -verify %platform-module-dir/ObjectiveC.swiftmodule > /dev/null // RUN: llvm-bcanalyzer %platform-module-dir/ObjectiveC.swiftmodule | FileCheck %s + // REQUIRES: sdk // CHECK-NOT: Unknown diff --git a/test/SIL/Serialization/effectsattr.sil b/test/SIL/Serialization/effectsattr.sil index 2186b6c4995ad..f4b8353b7ed25 100644 --- a/test/SIL/Serialization/effectsattr.sil +++ b/test/SIL/Serialization/effectsattr.sil @@ -1,4 +1,5 @@ // RUN: %target-sil-opt -verify %s -o - | FileCheck %s + sil_stage canonical import Builtin diff --git a/test/SIL/Serialization/lit.local.cfg b/test/SIL/Serialization/lit.local.cfg deleted file mode 100644 index 38c267490e33c..0000000000000 --- a/test/SIL/Serialization/lit.local.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Make a local copy of the substitutions. -config.substitutions = list(config.substitutions) - -module_dir = '%resource-dir/%target-sdk-name' -if 'PTRSIZE=32' in config.available_features: - module_dir += '/32' -config.substitutions.insert(0, ('%platform-module-dir', module_dir) ) diff --git a/test/SIL/Serialization/projection_lowered_type_parse.sil b/test/SIL/Serialization/projection_lowered_type_parse.sil index 0889d7ccf641f..f3dfd544aef21 100644 --- a/test/SIL/Serialization/projection_lowered_type_parse.sil +++ b/test/SIL/Serialization/projection_lowered_type_parse.sil @@ -1,4 +1,4 @@ -// RUN: %swift -emit-module %s -target x86_64-apple-macosx10.9 -module-name Swift -sil-serialize-all -module-link-name swiftCore -parse-as-library -parse-sil -parse-stdlib -o - | %sil-opt -verify -module-name=Swift +// RUN: %target-swift-frontend -emit-module %s -module-name Swift -sil-serialize-all -module-link-name swiftCore -parse-as-library -parse-sil -parse-stdlib -o - | %target-sil-opt -verify -module-name=Swift struct A { var f : () -> () diff --git a/test/SIL/Serialization/public_external.sil b/test/SIL/Serialization/public_external.sil index 74af9102b8410..5bd489600780c 100644 --- a/test/SIL/Serialization/public_external.sil +++ b/test/SIL/Serialization/public_external.sil @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse-sil -emit-module -module-name Swift -module-link-name swiftCore -parse-stdlib -parse-as-library -sil-serialize-all -o - | %sil-opt -module-name Swift -verify | FileCheck %s +// RUN: %target-swift-frontend %s -parse-sil -emit-module -module-name Swift -module-link-name swiftCore -parse-stdlib -parse-as-library -sil-serialize-all -o - | %target-sil-opt -module-name Swift -verify | FileCheck %s // CHECK-NOT: sil public_external @pe : $@thin () -> () { // CHECK-NOT: sil hidden_external @he : $@thin () -> () { diff --git a/test/SIL/Serialization/shared_function_serialization.sil b/test/SIL/Serialization/shared_function_serialization.sil index 4f913682a0418..871e6ead2d188 100644 --- a/test/SIL/Serialization/shared_function_serialization.sil +++ b/test/SIL/Serialization/shared_function_serialization.sil @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: mkdir -p %t -// RUN: %swift -disable-func-sig-opts -sil-inline-threshold 0 %S/Inputs/shared_function_serialization_input.swift -o %t/Swift.swiftmodule -emit-module -parse-as-library -parse-stdlib -module-link-name swiftCore -module-name Swift -sil-serialize-all -O -// RUN: %sil-opt -I %t -linker -verify %s -o - | FileCheck %s +// RUN: %target-swift-frontend -disable-func-sig-opts -sil-inline-threshold 0 %S/Inputs/shared_function_serialization_input.swift -o %t/Swift.swiftmodule -emit-module -parse-as-library -parse-stdlib -module-link-name swiftCore -module-name Swift -sil-serialize-all -O +// RUN: %target-sil-opt -I %t -linker -verify %s -o - | FileCheck %s // CHECK: sil private @top_level_code : $@thin () -> () { // CHECK: sil public_external [fragile] @_TFVSs1XCfMS_FT_S_ : $@thin (@thin X.Type) -> X { diff --git a/test/SIL/Serialization/specializer_can_deserialize.swift b/test/SIL/Serialization/specializer_can_deserialize.swift index 6194c4c00d47a..a39936999b2a4 100644 --- a/test/SIL/Serialization/specializer_can_deserialize.swift +++ b/test/SIL/Serialization/specializer_can_deserialize.swift @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: mkdir -p %t -// RUN: %swift -emit-module %S/Inputs/specializer_input.swift -O -sil-serialize-all -parse-stdlib -parse-as-library -emit-module -o %t/Swift.swiftmodule -module-name=Swift -module-link-name swiftCore -sil-inline-threshold 0 -disable-func-sig-opts -// RUN: %swift %s -O -I=%t -emit-sil -o - -sil-inline-threshold 0 -disable-func-sig-opts | FileCheck %s +// RUN: %target-swift-frontend -emit-module %S/Inputs/specializer_input.swift -O -sil-serialize-all -parse-stdlib -parse-as-library -emit-module -o %t/Swift.swiftmodule -module-name=Swift -module-link-name swiftCore -sil-inline-threshold 0 -disable-func-sig-opts +// RUN: %target-swift-frontend %s -O -I %t -emit-sil -o - -sil-inline-threshold 0 -disable-func-sig-opts | FileCheck %s import Swift diff --git a/test/SIL/Serialization/visibility.sil b/test/SIL/Serialization/visibility.sil index 832f7a1dd0749..2aedf13eb00a2 100644 --- a/test/SIL/Serialization/visibility.sil +++ b/test/SIL/Serialization/visibility.sil @@ -1,5 +1,5 @@ -// RUN: %swift %s -parse-sil -sil-serialize-all -emit-module -o - -module-name Swift -module-link-name swiftCore -parse-as-library -parse-stdlib | %sil-opt -verify -module-name Swift | FileCheck %s -// RUN: %swift %s -parse-sil -sil-serialize-all -emit-module -o - -module-name Swift -module-link-name swiftCore -parse-as-library -parse-stdlib | %sil-opt -verify -module-name Swift | FileCheck --check-prefix=NEG-CHECK %s +// RUN: %target-swift-frontend %s -parse-sil -sil-serialize-all -emit-module -o - -module-name Swift -module-link-name swiftCore -parse-as-library -parse-stdlib | %target-sil-opt -verify -module-name Swift | FileCheck %s +// RUN: %target-swift-frontend %s -parse-sil -sil-serialize-all -emit-module -o - -module-name Swift -module-link-name swiftCore -parse-as-library -parse-stdlib | %target-sil-opt -verify -module-name Swift | FileCheck --check-prefix=NEG-CHECK %s import Builtin diff --git a/test/SIL/Serialization/vtable_deserialization.swift b/test/SIL/Serialization/vtable_deserialization.swift index ede6bdc59843b..f2de7470b1660 100644 --- a/test/SIL/Serialization/vtable_deserialization.swift +++ b/test/SIL/Serialization/vtable_deserialization.swift @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: mkdir -p %t -// RUN: %swift %S/Inputs/vtable_deserialization_input.swift -o %t/Swift.swiftmodule -emit-module -parse-as-library -parse-stdlib -module-link-name swiftCore -module-name Swift -sil-serialize-all -// RUN: %swift %s -emit-sil -O -I=%t -o - | FileCheck %s +// RUN: %target-swift-frontend %S/Inputs/vtable_deserialization_input.swift -o %t/Swift.swiftmodule -emit-module -parse-as-library -parse-stdlib -module-link-name swiftCore -module-name Swift -sil-serialize-all +// RUN: %target-swift-frontend %s -emit-sil -O -I %t -o - | FileCheck %s import Swift diff --git a/test/SIL/Serialization/witness_tables.sil b/test/SIL/Serialization/witness_tables.sil index fbec666e133d2..40d560e24548a 100644 --- a/test/SIL/Serialization/witness_tables.sil +++ b/test/SIL/Serialization/witness_tables.sil @@ -1,4 +1,4 @@ -// RUN: %swift -parse-as-library -sil-serialize-all -module-name witness_tables -emit-module -o - %s -verify | %sil-opt -module-name witness_tables -verify | FileCheck %s +// RUN: %target-swift-frontend -parse-as-library -sil-serialize-all -module-name witness_tables -emit-module -o - %s -verify | %target-sil-opt -module-name witness_tables -verify | FileCheck %s protocol AssocReqt { func requiredMethod() diff --git a/test/SIL/clone_select_switch_value.sil b/test/SIL/clone_select_switch_value.sil index 895c7803d98f8..57f3777238480 100644 --- a/test/SIL/clone_select_switch_value.sil +++ b/test/SIL/clone_select_switch_value.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt -inline -verify %s | FileCheck %s +// RUN: %target-sil-opt -inline -verify %s | FileCheck %s // Check if cloning of select_value and switch_value works correctly without // producing illegal SIL. diff --git a/test/SIL/parse_swift_decls_in_sil_mode.sil b/test/SIL/parse_swift_decls_in_sil_mode.sil index 8d34838a61477..c27973a1fe660 100644 --- a/test/SIL/parse_swift_decls_in_sil_mode.sil +++ b/test/SIL/parse_swift_decls_in_sil_mode.sil @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift typealias Int = () diff --git a/test/SIL/printer_include_decls.swift b/test/SIL/printer_include_decls.swift index 0771dfee3e757..0ee058364aad6 100644 --- a/test/SIL/printer_include_decls.swift +++ b/test/SIL/printer_include_decls.swift @@ -1,7 +1,7 @@ // RUN: rm -f %t.* -// RUN: %swift -emit-sil %s -o %t.sil +// RUN: %target-swift-frontend -emit-sil %s -o %t.sil // RUN: FileCheck --input-file=%t.sil %s -// RUN: %swift -emit-silgen %t.sil -module-name=printer_include_decl | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %t.sil -module-name=printer_include_decl | FileCheck %s var x: Int // CHECK: var x: Int diff --git a/test/SIL/unimplemented_initializer.swift b/test/SIL/unimplemented_initializer.swift index da24b1f500d2e..949f04f22c343 100644 --- a/test/SIL/unimplemented_initializer.swift +++ b/test/SIL/unimplemented_initializer.swift @@ -1,5 +1,5 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/../SILGen/Inputs -I %S/../SILGen/Inputs -enable-source-import -primary-file %s -emit-sil -emit-verbose-sil | FileCheck %s -check-prefix=CHECK-DEBUG -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/../SILGen/Inputs -I %S/../SILGen/Inputs -enable-source-import -primary-file %s -emit-sil -emit-verbose-sil -O | FileCheck %s -check-prefix=CHECK-RELEASE +// RUN: %target-swift-frontend -sdk %S/../SILGen/Inputs -I %S/../SILGen/Inputs -enable-source-import -primary-file %s -emit-sil -emit-verbose-sil | FileCheck %s -check-prefix=CHECK-DEBUG +// RUN: %target-swift-frontend -sdk %S/../SILGen/Inputs -I %S/../SILGen/Inputs -enable-source-import -primary-file %s -emit-sil -emit-verbose-sil -O | FileCheck %s -check-prefix=CHECK-RELEASE import gizmo diff --git a/test/SIL/verifier-fail-bb.sil b/test/SIL/verifier-fail-bb.sil index 4ddc45ef33a36..43af74652beb4 100644 --- a/test/SIL/verifier-fail-bb.sil +++ b/test/SIL/verifier-fail-bb.sil @@ -1,4 +1,4 @@ -// RUN: not --crash %sil-opt %s -verify +// RUN: not --crash %target-sil-opt %s -verify // REQUIRES: asserts sil @no_terminator : $@thin () -> () { diff --git a/test/SIL/verifier-fail-instruction.sil b/test/SIL/verifier-fail-instruction.sil index 353272021312f..151892c3a7f98 100644 --- a/test/SIL/verifier-fail-instruction.sil +++ b/test/SIL/verifier-fail-instruction.sil @@ -1,4 +1,4 @@ -// RUN: not --crash %sil-opt %s -verify +// RUN: not --crash %target-sil-opt %s -verify // REQUIRES: asserts class A { @@ -9,4 +9,4 @@ bb0(%0 : $*A): %1 = upcast %0 : $*A to $*A %2 = tuple() return %2 : $() -} \ No newline at end of file +} diff --git a/test/SIL/whole_module_optimization.swift b/test/SIL/whole_module_optimization.swift index ee391474a65e5..a92bee5160c95 100644 --- a/test/SIL/whole_module_optimization.swift +++ b/test/SIL/whole_module_optimization.swift @@ -1,9 +1,8 @@ - -// RUN: %swift -emit-sil -O %s %S/Inputs/whole_module_optimization_helper.swift -o %t.sil -module-name main +// RUN: %target-swift-frontend -emit-sil -O %s %S/Inputs/whole_module_optimization_helper.swift -o %t.sil -module-name main // RUN: FileCheck %s < %t.sil // RUN: FileCheck %s -check-prefix=NEGATIVE < %t.sil -// RUN: %swift -emit-sil -O -primary-file %s %S/Inputs/whole_module_optimization_helper.swift -o %t.unopt.sil -module-name main +// RUN: %target-swift-frontend -emit-sil -O -primary-file %s %S/Inputs/whole_module_optimization_helper.swift -o %t.unopt.sil -module-name main // RUN: FileCheck %s -check-prefix=CHECK-SINGLE-FILE < %t.unopt.sil private func privateFn() -> Int { diff --git a/test/SILAnalysis/DestructorAnalysis.swift b/test/SILAnalysis/DestructorAnalysis.swift index 84eb752dfa67e..9a5cc13095a23 100644 --- a/test/SILAnalysis/DestructorAnalysis.swift +++ b/test/SILAnalysis/DestructorAnalysis.swift @@ -1,4 +1,4 @@ -// RUN: %swift -O -emit-sil %s -Xllvm -debug-only=destructor-analysis 2>&1 | FileCheck %s +// RUN: %target-swift-frontend -O -emit-sil %s -Xllvm -debug-only=destructor-analysis 2>&1 | FileCheck %s // This test depends on asserts because we look at debug output. // REQUIRES: asserts diff --git a/test/SILAnalysis/alias-crash.sil b/test/SILAnalysis/alias-crash.sil index 8101bcf54de24..e02730b2aa219 100644 --- a/test/SILAnalysis/alias-crash.sil +++ b/test/SILAnalysis/alias-crash.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -global-load-store-opts | FileCheck %s +// RUN: %target-sil-opt %s -global-load-store-opts | FileCheck %s sil_stage canonical diff --git a/test/SILAnalysis/basic-aa.sil b/test/SILAnalysis/basic-aa.sil index ef18430477e23..d2e05cebbf4b1 100644 --- a/test/SILAnalysis/basic-aa.sil +++ b/test/SILAnalysis/basic-aa.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -aa=basic-aa -aa-dump -o /dev/null | FileCheck %s +// RUN: %target-sil-opt %s -aa=basic-aa -aa-dump -o /dev/null | FileCheck %s + // REQUIRES: asserts import Builtin diff --git a/test/SILAnalysis/typed-access-tb-aa.sil b/test/SILAnalysis/typed-access-tb-aa.sil index 48803bebee59e..56682aa338482 100644 --- a/test/SILAnalysis/typed-access-tb-aa.sil +++ b/test/SILAnalysis/typed-access-tb-aa.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -aa=typed-access-tb-aa -aa-dump -o /dev/null | FileCheck %s +// RUN: %target-sil-opt %s -aa=typed-access-tb-aa -aa-dump -o /dev/null | FileCheck %s + // REQUIRES: asserts import Builtin diff --git a/test/SILGen/Inputs/witness_tables_b.swift b/test/SILGen/Inputs/witness_tables_b.swift index e26b3a5e0def4..fca453de874d0 100644 --- a/test/SILGen/Inputs/witness_tables_b.swift +++ b/test/SILGen/Inputs/witness_tables_b.swift @@ -1,4 +1,5 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift + // This module is used by the witness_tables.swift test, to test protocol // conformance introduced by extensions across modules. diff --git a/test/SILGen/NSApplicationMain.swift b/test/SILGen/NSApplicationMain.swift index 801ad1091cd74..742153e90bd71 100644 --- a/test/SILGen/NSApplicationMain.swift +++ b/test/SILGen/NSApplicationMain.swift @@ -1,5 +1,7 @@ -// RUN: %swift -emit-silgen -parse-as-library -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s -// RUN: %swift -emit-ir -parse-as-library -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s -check-prefix=IR +// RUN: %target-swift-frontend -emit-silgen -parse-as-library -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir -parse-as-library -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s -check-prefix=IR + +// REQUIRES: OS=macosx import Foundation import AppKit diff --git a/test/SILGen/UIApplicationMain.swift b/test/SILGen/UIApplicationMain.swift index 9c4f648afac9b..6c5c83b9401e3 100644 --- a/test/SILGen/UIApplicationMain.swift +++ b/test/SILGen/UIApplicationMain.swift @@ -1,5 +1,7 @@ -// RUN: %swift -emit-silgen -parse-as-library -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s -// RUN: %swift -emit-ir -parse-as-library -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s -check-prefix=IR +// RUN: %target-swift-frontend -emit-silgen -parse-as-library -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s +// RUN: %target-swift-frontend -emit-ir -parse-as-library -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s -check-prefix=IR + +// REQUIRES: OS=ios import Foundation import UIKit diff --git a/test/SILGen/accessibility_vtables.swift b/test/SILGen/accessibility_vtables.swift index 788354eabd070..0bea56549bac9 100644 --- a/test/SILGen/accessibility_vtables.swift +++ b/test/SILGen/accessibility_vtables.swift @@ -1,6 +1,6 @@ // RUN: rm -rf %t && mkdir -p %t -// RUN: %swift -emit-module -o %t %S/Inputs/accessibility_vtables_helper.swift -// RUN: %swift -emit-silgen -primary-file %s %S/Inputs/accessibility_vtables_other.swift -I %t -module-name accessibility_vtables -enable-private-discriminators | FileCheck %s +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/accessibility_vtables_helper.swift +// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/accessibility_vtables_other.swift -I %t -module-name accessibility_vtables -enable-private-discriminators | FileCheck %s import accessibility_vtables_helper diff --git a/test/SILGen/accessors.swift b/test/SILGen/accessors.swift index 4d16c626cf82b..ca2b01858f203 100644 --- a/test/SILGen/accessors.swift +++ b/test/SILGen/accessors.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s // Hold a reference to do to magically become non-POD. class Reference {} diff --git a/test/SILGen/address_only_types.swift b/test/SILGen/address_only_types.swift index 3f40068160b71..97c7d75df0ddd 100644 --- a/test/SILGen/address_only_types.swift +++ b/test/SILGen/address_only_types.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-as-library -parse-stdlib -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-as-library -parse-stdlib -emit-silgen %s | FileCheck %s typealias Int = Builtin.Int64 diff --git a/test/SILGen/addressors.swift b/test/SILGen/addressors.swift index 75b212afc99ae..07b9f9b492f59 100644 --- a/test/SILGen/addressors.swift +++ b/test/SILGen/addressors.swift @@ -1,5 +1,5 @@ -// RUN: %swift -parse-stdlib -emit-sil %s | FileCheck %s -// RUN: %swift -parse-stdlib -emit-silgen %s | FileCheck %s -check-prefix=SILGEN +// RUN: %target-swift-frontend -parse-stdlib -emit-sil %s | FileCheck %s +// RUN: %target-swift-frontend -parse-stdlib -emit-silgen %s | FileCheck %s -check-prefix=SILGEN import Swift diff --git a/test/SILGen/apply_abstraction_nested.swift b/test/SILGen/apply_abstraction_nested.swift index 9fbddc6a327eb..8ae8d93f77f0e 100644 --- a/test/SILGen/apply_abstraction_nested.swift +++ b/test/SILGen/apply_abstraction_nested.swift @@ -1,4 +1,5 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s + infix operator ~> { precedence 255 associativity left } protocol P { } diff --git a/test/SILGen/arguments.swift b/test/SILGen/arguments.swift index f74af4289f4d0..28611c503c226 100644 --- a/test/SILGen/arguments.swift +++ b/test/SILGen/arguments.swift @@ -1,4 +1,4 @@ -// RUN: %swift -module-name=Swift -parse-stdlib -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -module-name Swift -parse-stdlib -emit-silgen %s | FileCheck %s struct Int {} struct Float {} diff --git a/test/SILGen/array_literal_abstraction.swift b/test/SILGen/array_literal_abstraction.swift index bf9e94d7476d9..0ae6745012291 100644 --- a/test/SILGen/array_literal_abstraction.swift +++ b/test/SILGen/array_literal_abstraction.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s // Verify that reabstraction happens when forming container literals. // diff --git a/test/SILGen/assignment.swift b/test/SILGen/assignment.swift index b4055bfd369c7..fe63b980f2272 100644 --- a/test/SILGen/assignment.swift +++ b/test/SILGen/assignment.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s class C {} diff --git a/test/SILGen/auto_closures.swift b/test/SILGen/auto_closures.swift index 147fb406be9f7..c30626b924367 100644 --- a/test/SILGen/auto_closures.swift +++ b/test/SILGen/auto_closures.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-stdlib -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-stdlib -emit-silgen %s | FileCheck %s struct Bool {} var false_ = Bool() diff --git a/test/SILGen/auto_generated_super_init_call.swift b/test/SILGen/auto_generated_super_init_call.swift index 7b6572ad2b68b..9dedf98bc32d2 100644 --- a/test/SILGen/auto_generated_super_init_call.swift +++ b/test/SILGen/auto_generated_super_init_call.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s // Test that we emit a call to super.init at the end of the initializer, when none has been previously added. diff --git a/test/SILGen/availability_optionals.swift b/test/SILGen/availability_optionals.swift index 6e32c3152e4f8..a8751a535d868 100644 --- a/test/SILGen/availability_optionals.swift +++ b/test/SILGen/availability_optionals.swift @@ -1,4 +1,6 @@ -// RUN: %swift -emit-silgen -target x86_64-apple-macosx10.9 -enable-experimental-availability-checking -enable-experimental-unavailable-as-optional %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -enable-experimental-availability-checking -enable-experimental-unavailable-as-optional %s | FileCheck %s + +// REQUIRES: OS=macosx @availability(OSX, introduced=10.9) var globalAvailableOn10_9: Int = 9 diff --git a/test/SILGen/availability_query.swift b/test/SILGen/availability_query.swift index a4125b0feb1c5..441dfc6f1d458 100644 --- a/test/SILGen/availability_query.swift +++ b/test/SILGen/availability_query.swift @@ -1,4 +1,6 @@ -// RUN: %swift -emit-silgen -target x86_64-apple-macosx10.9 -enable-experimental-availability-checking %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -enable-experimental-availability-checking %s | FileCheck %s + +// REQUIRES: OS=macosx // CHECK: [[MAJOR:%.*]] = integer_literal $Builtin.Word, 10 // CHECK: [[MINOR:%.*]] = integer_literal $Builtin.Word, 9 diff --git a/test/SILGen/break_continue.swift b/test/SILGen/break_continue.swift index 340cf019aadaa..9ee14513adba9 100644 --- a/test/SILGen/break_continue.swift +++ b/test/SILGen/break_continue.swift @@ -1,4 +1,4 @@ -// RUN: %swift -module-name=Swift -parse-stdlib -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -module-name Swift -parse-stdlib -emit-silgen %s | FileCheck %s protocol BooleanType { var boolValue: Bool { get } diff --git a/test/SILGen/builtins.swift b/test/SILGen/builtins.swift index f7d0e8c487b3d..d953c54b9e119 100644 --- a/test/SILGen/builtins.swift +++ b/test/SILGen/builtins.swift @@ -1,5 +1,5 @@ -// RUN: %swift -emit-silgen -parse-stdlib %s | FileCheck %s -// RUN: %swift -emit-sil -Onone -parse-stdlib %s | FileCheck -check-prefix=CANONICAL %s +// RUN: %target-swift-frontend -emit-silgen -parse-stdlib %s -disable-objc-attr-requires-foundation-module | FileCheck %s +// RUN: %target-swift-frontend -emit-sil -Onone -parse-stdlib %s -disable-objc-attr-requires-foundation-module | FileCheck -check-prefix=CANONICAL %s import Swift diff --git a/test/SILGen/call_chain_reabstraction.swift b/test/SILGen/call_chain_reabstraction.swift index 97dd85923f3cf..46a5f499d4e9a 100644 --- a/test/SILGen/call_chain_reabstraction.swift +++ b/test/SILGen/call_chain_reabstraction.swift @@ -1,4 +1,5 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s + struct A { func g(recur: (A, U) -> U) -> (A, U) -> U { return { _, x in return x } diff --git a/test/SILGen/capture_inout.swift b/test/SILGen/capture_inout.swift index 1800b067ed8d1..e9eda9669d1a2 100644 --- a/test/SILGen/capture_inout.swift +++ b/test/SILGen/capture_inout.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-stdlib -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-stdlib -emit-silgen %s | FileCheck %s typealias Int = Builtin.Int64 diff --git a/test/SILGen/capture_typealias.swift b/test/SILGen/capture_typealias.swift index 293f9825a40b0..28b649f24ae0a 100644 --- a/test/SILGen/capture_typealias.swift +++ b/test/SILGen/capture_typealias.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-stdlib -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-stdlib -emit-silgen %s | FileCheck %s typealias Int = Builtin.Int64 diff --git a/test/SILGen/casts.swift b/test/SILGen/casts.swift index 6ebe315e13858..6eb2a5482bc1b 100644 --- a/test/SILGen/casts.swift +++ b/test/SILGen/casts.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s class B { } class D : B { } diff --git a/test/SILGen/cf.swift b/test/SILGen/cf.swift index 4b66c1199deb2..523bafe6eeca6 100644 --- a/test/SILGen/cf.swift +++ b/test/SILGen/cf.swift @@ -1,4 +1,6 @@ -// RUN: %swift -import-cf-types -sdk %S/Inputs -target x86_64-apple-macosx10.9 %s -emit-silgen -o - | FileCheck %s +// RUN: %target-swift-frontend -import-cf-types -sdk %S/Inputs %s -emit-silgen -o - | FileCheck %s + +// REQUIRES: objc_interop import CoreCooling diff --git a/test/SILGen/class_bound_protocols.swift b/test/SILGen/class_bound_protocols.swift index 4dca054e6dc2c..147603a034a72 100644 --- a/test/SILGen/class_bound_protocols.swift +++ b/test/SILGen/class_bound_protocols.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-stdlib -parse-as-library -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-stdlib -parse-as-library -emit-silgen %s | FileCheck %s // -- Class-bound archetypes and existentials are *not* address-only and can // be manipulated using normal reference type value semantics. diff --git a/test/SILGen/closure_inline_initializer.swift b/test/SILGen/closure_inline_initializer.swift index 7e5933d47edd1..23cc01df59860 100644 --- a/test/SILGen/closure_inline_initializer.swift +++ b/test/SILGen/closure_inline_initializer.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s // CHECK-LABEL: sil shared @_TFIvV26closure_inline_initializer3Foo3fooSiiU_FT_Si diff --git a/test/SILGen/closures.swift b/test/SILGen/closures.swift index d6ee4b306a803..4a43eff5b1901 100644 --- a/test/SILGen/closures.swift +++ b/test/SILGen/closures.swift @@ -1,4 +1,5 @@ -// RUN: %swift -parse-stdlib -parse-as-library -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-stdlib -parse-as-library -emit-silgen %s | FileCheck %s + import Swift var zero = 0 diff --git a/test/SILGen/collection_cast_crash.swift b/test/SILGen/collection_cast_crash.swift index 364cacb6250e1..fb16ecbd27d3e 100644 --- a/test/SILGen/collection_cast_crash.swift +++ b/test/SILGen/collection_cast_crash.swift @@ -1,4 +1,4 @@ -// RUN: %swift -O -target x86_64-apple-macosx10.9 -primary-file %s -emit-sil -o - | FileCheck %s +// RUN: %target-swift-frontend -O -primary-file %s -emit-sil -o - | FileCheck %s // check if the compiler does not crash if a function is specialized // which contains a collection cast diff --git a/test/SILGen/collection_downcast.swift b/test/SILGen/collection_downcast.swift index df524ecc67188..c875879fe1566 100644 --- a/test/SILGen/collection_downcast.swift +++ b/test/SILGen/collection_downcast.swift @@ -1,4 +1,6 @@ -// RUN: %swift -emit-silgen -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s + +// REQUIRES: objc_interop import Foundation diff --git a/test/SILGen/collection_upcast.swift b/test/SILGen/collection_upcast.swift index 5bbab3cc8b2b4..78d2aa57c6f18 100644 --- a/test/SILGen/collection_upcast.swift +++ b/test/SILGen/collection_upcast.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s import Foundation diff --git a/test/SILGen/complete_object_init.swift b/test/SILGen/complete_object_init.swift index 81f1a6a1d8323..3b0e24fccbdb4 100644 --- a/test/SILGen/complete_object_init.swift +++ b/test/SILGen/complete_object_init.swift @@ -1,4 +1,5 @@ -// RUN: %swift %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend %s -emit-silgen | FileCheck %s + struct X { } class A { diff --git a/test/SILGen/conditionally_unreachable.swift b/test/SILGen/conditionally_unreachable.swift index 4db9da39eb64b..ce0cbf45fb7e6 100644 --- a/test/SILGen/conditionally_unreachable.swift +++ b/test/SILGen/conditionally_unreachable.swift @@ -1,8 +1,8 @@ -// RUN: %swift -emit-silgen -parse-stdlib -primary-file %s | FileCheck %s -check-prefix=RAW -// RUN: %swift -emit-sil -assert-config Debug -parse-stdlib -primary-file %s | FileCheck -check-prefix=DEBUG %s -// RUN: %swift -emit-sil -O -assert-config Debug -parse-stdlib -primary-file %s | FileCheck -check-prefix=DEBUG %s -// RUN: %swift -emit-sil -assert-config Release -parse-stdlib -primary-file %s | FileCheck -check-prefix=RELEASE %s -// RUN: %swift -emit-sil -O -assert-config Release -parse-stdlib -primary-file %s | FileCheck -check-prefix=RELEASE %s +// RUN: %target-swift-frontend -emit-silgen -parse-stdlib -primary-file %s | FileCheck %s -check-prefix=RAW +// RUN: %target-swift-frontend -emit-sil -assert-config Debug -parse-stdlib -primary-file %s | FileCheck -check-prefix=DEBUG %s +// RUN: %target-swift-frontend -emit-sil -O -assert-config Debug -parse-stdlib -primary-file %s | FileCheck -check-prefix=DEBUG %s +// RUN: %target-swift-frontend -emit-sil -assert-config Release -parse-stdlib -primary-file %s | FileCheck -check-prefix=RELEASE %s +// RUN: %target-swift-frontend -emit-sil -O -assert-config Release -parse-stdlib -primary-file %s | FileCheck -check-prefix=RELEASE %s import Swift diff --git a/test/SILGen/copy_lvalue_peepholes.swift b/test/SILGen/copy_lvalue_peepholes.swift index d0612213ee5f7..cec1464178919 100644 --- a/test/SILGen/copy_lvalue_peepholes.swift +++ b/test/SILGen/copy_lvalue_peepholes.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-stdlib -parse-as-library -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-stdlib -parse-as-library -emit-silgen %s | FileCheck %s typealias Int = Builtin.Int64 diff --git a/test/SILGen/decls.swift b/test/SILGen/decls.swift index 87dfd74aa0494..519a7e333dfab 100644 --- a/test/SILGen/decls.swift +++ b/test/SILGen/decls.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-as-library -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-as-library -emit-silgen %s | FileCheck %s // CHECK-LABEL: sil hidden @_TF5decls11void_returnFT_T_ // CHECK: = tuple diff --git a/test/SILGen/default_arguments.swift b/test/SILGen/default_arguments.swift index 9319425e4127c..8c55c3d6418ae 100644 --- a/test/SILGen/default_arguments.swift +++ b/test/SILGen/default_arguments.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s // __FUNCTION__ used as top-level parameter produces the module name. // CHECK-LABEL: sil @main @@ -25,7 +25,7 @@ func defarg1(i: Int = 17, #d: Double, s: String = "Hello") { } // CHECK-LABEL: sil hidden @_TF17default_arguments15testDefaultArg1FT_T_ func testDefaultArg1() { // CHECK: [[FNREF:%[0-9]+]] = function_ref @_TF17default_arguments7defarg1{{.*}} - // CHECK: [[LITFN:%[0-9]+]] = function_ref @_TFSdCfMSdFT20_builtinFloatLiteralBf80__Sd + // CHECK: [[LITFN:%[0-9]+]] = function_ref @_TFSdCfMSdFT20_builtinFloatLiteralBf{{64|80}}__Sd // CHECK: [[FLOAT64:%[0-9]+]] = metatype $@thin Double.Type // CHECK: [[FLOATLIT:%[0-9]+]] = float_literal $Builtin.FPIEEE{{64|80}}, {{0x4009000000000000|0x4000C800000000000000}} // CHECK: [[FLOATVAL:%[0-9]+]] = apply [transparent] [[LITFN]]([[FLOATLIT]], [[FLOAT64]]) diff --git a/test/SILGen/default_arguments_generic.swift b/test/SILGen/default_arguments_generic.swift index 865a5c549f1e4..5f5cb45a93d18 100644 --- a/test/SILGen/default_arguments_generic.swift +++ b/test/SILGen/default_arguments_generic.swift @@ -1,4 +1,5 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s + func foo(x: T = 0) { } struct Zim { diff --git a/test/SILGen/default_constructor.swift b/test/SILGen/default_constructor.swift index 133cbd3cb3e86..e7e562a1a5696 100644 --- a/test/SILGen/default_constructor.swift +++ b/test/SILGen/default_constructor.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s struct B { var i : Int, j : Float @@ -20,7 +20,7 @@ struct D { // CHECK: [[INTMETA:%[0-9]+]] = metatype $@thin Int.Type // CHECK: [[INTLIT:%[0-9]+]] = integer_literal $Builtin.Int2048, 2 // CHECK: [[INTVAL:%[0-9]+]] = apply [transparent] [[INTCONV]]([[INTLIT]], [[INTMETA]]) -// CHECK: [[FLOATCONV:%[0-9]+]] = function_ref @_TFSdCfMSdFT20_builtinFloatLiteralBf80__Sd +// CHECK: [[FLOATCONV:%[0-9]+]] = function_ref @_TFSdCfMSdFT20_builtinFloatLiteralBf{{64|80}}__Sd // CHECK: [[FLOATMETA:%[0-9]+]] = metatype $@thin Double.Type // CHECK: [[FLOATLIT:%[0-9]+]] = float_literal $Builtin.FPIEEE{{64|80}}, {{0x400C000000000000|0x4000E000000000000000}} // CHECK: [[FLOATVAL:%[0-9]+]] = apply [transparent] [[FLOATCONV]]([[FLOATLIT]], [[FLOATMETA]]) diff --git a/test/SILGen/deinit_in_vtable.swift b/test/SILGen/deinit_in_vtable.swift index 80de387cb34b7..9f54bfefe2e2f 100644 --- a/test/SILGen/deinit_in_vtable.swift +++ b/test/SILGen/deinit_in_vtable.swift @@ -1,7 +1,7 @@ -// RUN: %swift -O -emit-sil %s | FileCheck %s +// RUN: %target-swift-frontend -O -emit-sil %s | FileCheck %s // The second run tests is it can be compiled without crashes. -// RUN: %swift -O -S %s +// RUN: %target-swift-frontend -O -S %s private class A { func foo() -> Int { return 0 } diff --git a/test/SILGen/dependent_member_lowering.swift b/test/SILGen/dependent_member_lowering.swift index 2afe483ea6f20..4263e7bf20ec1 100644 --- a/test/SILGen/dependent_member_lowering.swift +++ b/test/SILGen/dependent_member_lowering.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s protocol P { typealias A diff --git a/test/SILGen/downcast_reabstraction.swift b/test/SILGen/downcast_reabstraction.swift index 8bf401b7567c6..29e9710bc060b 100644 --- a/test/SILGen/downcast_reabstraction.swift +++ b/test/SILGen/downcast_reabstraction.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s // CHECK-LABEL: sil hidden @_TF22downcast_reabstraction19condFunctionFromAnyFP_T_ // CHECK: checked_cast_addr_br take_always protocol<> in [[IN:%.*]]#1 : $*protocol<> to () -> () in [[OUT:%.*]]#1 : $*@callee_owned (@out (), @in ()) -> (), [[YES:bb[0-9]+]], [[NO:bb[0-9]+]] diff --git a/test/SILGen/dynamic.swift b/test/SILGen/dynamic.swift index 3f06812eff109..3d4bc4dc50636 100644 --- a/test/SILGen/dynamic.swift +++ b/test/SILGen/dynamic.swift @@ -1,5 +1,7 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import -primary-file %s %S/Inputs/dynamic_other.swift -emit-silgen | FileCheck %s -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import -primary-file %s %S/Inputs/dynamic_other.swift -emit-sil -verify +// RUN: %target-swift-frontend -sdk %S/Inputs -I %S/Inputs -enable-source-import -primary-file %s %S/Inputs/dynamic_other.swift -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %S/Inputs -enable-source-import -primary-file %s %S/Inputs/dynamic_other.swift -emit-sil -verify + +// REQUIRES: objc_interop import Foundation import gizmo diff --git a/test/SILGen/dynamic_init.swift b/test/SILGen/dynamic_init.swift index 763477d30e4f8..b4947db234260 100644 --- a/test/SILGen/dynamic_init.swift +++ b/test/SILGen/dynamic_init.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s class C { required init() { } diff --git a/test/SILGen/dynamic_lookup.swift b/test/SILGen/dynamic_lookup.swift index 2d39b45c755dd..590f1995ca0ef 100644 --- a/test/SILGen/dynamic_lookup.swift +++ b/test/SILGen/dynamic_lookup.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-as-library -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-as-library -emit-silgen %s | FileCheck %s class X { @objc func f() { } diff --git a/test/SILGen/dynamic_self.swift b/test/SILGen/dynamic_self.swift index a3cb928a09347..87fa09f60f7a1 100644 --- a/test/SILGen/dynamic_self.swift +++ b/test/SILGen/dynamic_self.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s -disable-objc-attr-requires-foundation-module | FileCheck %s protocol P { func f() -> Self diff --git a/test/SILGen/effectsattr.swift b/test/SILGen/effectsattr.swift index d5623376d513c..5d8cfe2a0cd58 100644 --- a/test/SILGen/effectsattr.swift +++ b/test/SILGen/effectsattr.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-stdlib -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-stdlib -emit-silgen %s | FileCheck %s //CHECK: [readonly] @func1 diff --git a/test/SILGen/enum.swift b/test/SILGen/enum.swift index 7410650b54971..4ed66170583da 100644 --- a/test/SILGen/enum.swift +++ b/test/SILGen/enum.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-as-library -parse-stdlib -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-as-library -parse-stdlib -emit-silgen %s | FileCheck %s protocol P {} diff --git a/test/SILGen/enum_derived.swift b/test/SILGen/enum_derived.swift index a95d7e9048af9..908747a7d4e7b 100644 --- a/test/SILGen/enum_derived.swift +++ b/test/SILGen/enum_derived.swift @@ -1,4 +1,4 @@ -// RUN: %swift -O -primary-file %s -emit-ir | FileCheck %s +// RUN: %target-swift-frontend -O -primary-file %s -emit-ir | FileCheck %s // Check if the hashValue and == for an enum (without payload) are generated and // check if that functions are compiled in an optimal way. diff --git a/test/SILGen/erasure_reabstraction.swift b/test/SILGen/erasure_reabstraction.swift index aebefcadbae89..a53fce9ec9c23 100644 --- a/test/SILGen/erasure_reabstraction.swift +++ b/test/SILGen/erasure_reabstraction.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s struct Foo {} class Bar {} diff --git a/test/SILGen/expressions.swift b/test/SILGen/expressions.swift index 883b36e7960f5..cc1055e74b0b6 100644 --- a/test/SILGen/expressions.swift +++ b/test/SILGen/expressions.swift @@ -1,7 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: echo "public var x = Int()" | %swift -target x86_64-apple-macosx10.9 -module-name FooBar -emit-module -o %t - -// RUN: %swift -parse-stdlib -emit-silgen %s -I%t -enable-character-literals -disable-access-control | FileCheck %s +// RUN: echo "public var x = Int()" | %target-swift-frontend -module-name FooBar -emit-module -o %t - +// RUN: %target-swift-frontend -parse-stdlib -emit-silgen %s -I%t -enable-character-literals -disable-access-control | FileCheck %s + import Swift import FooBar diff --git a/test/SILGen/extensions.swift b/test/SILGen/extensions.swift index cc6eb5f77432e..e47fd575eb9f9 100644 --- a/test/SILGen/extensions.swift +++ b/test/SILGen/extensions.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s class Foo { // CHECK-LABEL: sil hidden @_TFC10extensions3Foo3zimfS0_FT_T_ diff --git a/test/SILGen/external_definitions.swift b/test/SILGen/external_definitions.swift index fa2b46a85243d..5bf6b011e71ac 100644 --- a/test/SILGen/external_definitions.swift +++ b/test/SILGen/external_definitions.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs %s -emit-silgen | FileCheck %s import ansible diff --git a/test/SILGen/failable_initializers.swift b/test/SILGen/failable_initializers.swift index 578e4158d9339..9fded581acb32 100644 --- a/test/SILGen/failable_initializers.swift +++ b/test/SILGen/failable_initializers.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s protocol P {} class C: P {} diff --git a/test/SILGen/final.swift b/test/SILGen/final.swift index 79ed3b34146eb..a00cd8c0efe44 100644 --- a/test/SILGen/final.swift +++ b/test/SILGen/final.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s class TestClass { diff --git a/test/SILGen/force_cast_chained_optional.swift b/test/SILGen/force_cast_chained_optional.swift index 964b85b8eb1ed..257a30736b0ee 100644 --- a/test/SILGen/force_cast_chained_optional.swift +++ b/test/SILGen/force_cast_chained_optional.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s class Foo { var bar: Bar! diff --git a/test/SILGen/fragile_globals.swift b/test/SILGen/fragile_globals.swift index 2b2e05a168a5f..5528e1446a7ec 100644 --- a/test/SILGen/fragile_globals.swift +++ b/test/SILGen/fragile_globals.swift @@ -1,8 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -parse-as-library -sil-serialize-all -o %t %S/Inputs/ModuleA.swift -// RUN: %swift -emit-module -parse-as-library -sil-serialize-all -o %t %S/Inputs/ModuleB.swift -// RUN: %swift -parse-as-library -I%t %s -O -emit-sil | FileCheck %s +// RUN: %target-swift-frontend -emit-module -parse-as-library -sil-serialize-all -o %t %S/Inputs/ModuleA.swift +// RUN: %target-swift-frontend -emit-module -parse-as-library -sil-serialize-all -o %t %S/Inputs/ModuleB.swift +// RUN: %target-swift-frontend -parse-as-library -I%t %s -O -emit-sil | FileCheck %s import ModuleA import ModuleB diff --git a/test/SILGen/functions.swift b/test/SILGen/functions.swift index 4a21434924793..768aa54673304 100644 --- a/test/SILGen/functions.swift +++ b/test/SILGen/functions.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-stdlib -parse-as-library -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-stdlib -parse-as-library -emit-silgen %s | FileCheck %s import Swift // just for Optional diff --git a/test/SILGen/generic_casts.swift b/test/SILGen/generic_casts.swift index 5e58e9f33cda7..e78374530011f 100644 --- a/test/SILGen/generic_casts.swift +++ b/test/SILGen/generic_casts.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s protocol ClassBound : class {} protocol NotClassBound {} diff --git a/test/SILGen/generic_closures.swift b/test/SILGen/generic_closures.swift index 7a42456692339..e9f75b93b8798 100644 --- a/test/SILGen/generic_closures.swift +++ b/test/SILGen/generic_closures.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-stdlib -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-stdlib -emit-silgen %s | FileCheck %s typealias Int = Builtin.Int64 typealias Char = Builtin.Int32 diff --git a/test/SILGen/generic_literals.swift b/test/SILGen/generic_literals.swift index 43aa9d4ad8862..83576c06a3e5f 100644 --- a/test/SILGen/generic_literals.swift +++ b/test/SILGen/generic_literals.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s // CHECK-LABEL: sil hidden @_TF16generic_literals21genericIntegerLitera func genericIntegerLiteral(var x: T) { diff --git a/test/SILGen/generic_property_base_lifetime.swift b/test/SILGen/generic_property_base_lifetime.swift index ef30b341b13d9..577c2367addda 100644 --- a/test/SILGen/generic_property_base_lifetime.swift +++ b/test/SILGen/generic_property_base_lifetime.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s -disable-objc-attr-requires-foundation-module | FileCheck %s protocol ProtocolA: class { var intProp: Int { get set } diff --git a/test/SILGen/generic_signatures.swift b/test/SILGen/generic_signatures.swift index 3273a6d926f8f..1458a16ccf21b 100644 --- a/test/SILGen/generic_signatures.swift +++ b/test/SILGen/generic_signatures.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen -parse-stdlib %s +// RUN: %target-swift-frontend -emit-silgen -parse-stdlib %s protocol P { typealias Assoc diff --git a/test/SILGen/generic_tuples.swift b/test/SILGen/generic_tuples.swift index 22131b4af3716..362de472de59c 100644 --- a/test/SILGen/generic_tuples.swift +++ b/test/SILGen/generic_tuples.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen -parse-as-library %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -parse-as-library %s | FileCheck %s func dup(let x: T) -> (T, T) { return (x,x) } diff --git a/test/SILGen/generic_witness.swift b/test/SILGen/generic_witness.swift index 80026c038ee66..86d632e74ff88 100644 --- a/test/SILGen/generic_witness.swift +++ b/test/SILGen/generic_witness.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s protocol Runcible { func runce(x: A) diff --git a/test/SILGen/global_init_attribute.swift b/test/SILGen/global_init_attribute.swift index 1aaa813120734..12dc24fb5e4ee 100644 --- a/test/SILGen/global_init_attribute.swift +++ b/test/SILGen/global_init_attribute.swift @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -o %t %S/Inputs/def_global.swift -// RUN: %swift -parse-as-library -emit-silgen -I=%t %s | FileCheck %s +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/def_global.swift +// RUN: %target-swift-frontend -parse-as-library -emit-silgen -I %t %s | FileCheck %s // // Test that SILGen uses the "global_init" attribute for all global // variable addressors. diff --git a/test/SILGen/guaranteed_self.swift b/test/SILGen/guaranteed_self.swift index 8e775366c82ea..107e3d503410f 100644 --- a/test/SILGen/guaranteed_self.swift +++ b/test/SILGen/guaranteed_self.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen -enable-guaranteed-self %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -enable-guaranteed-self %s -disable-objc-attr-requires-foundation-module | FileCheck %s protocol Fooable { init() diff --git a/test/SILGen/if_expr.swift b/test/SILGen/if_expr.swift index 897e09de01b5e..2437a1a95dc2d 100644 --- a/test/SILGen/if_expr.swift +++ b/test/SILGen/if_expr.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s func fizzbuzz(i: Int) -> String { return i % 3 == 0 diff --git a/test/SILGen/if_while_binding.swift b/test/SILGen/if_while_binding.swift index 3067b8afbb688..2bf181805ddfa 100644 --- a/test/SILGen/if_while_binding.swift +++ b/test/SILGen/if_while_binding.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s func foo() -> String? { return "" } func bar() -> String? { return "" } diff --git a/test/SILGen/implicitly_unwrapped_optional.swift b/test/SILGen/implicitly_unwrapped_optional.swift index 306cca528da92..57bf10243b7ce 100644 --- a/test/SILGen/implicitly_unwrapped_optional.swift +++ b/test/SILGen/implicitly_unwrapped_optional.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s func foo(var #f: (()->())!) { f?() diff --git a/test/SILGen/init_ref_delegation.swift b/test/SILGen/init_ref_delegation.swift index 6e52e6aa914b7..d5553b62ab28b 100644 --- a/test/SILGen/init_ref_delegation.swift +++ b/test/SILGen/init_ref_delegation.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s -disable-objc-attr-requires-foundation-module | FileCheck %s struct X { } diff --git a/test/SILGen/lazy_global_access.swift b/test/SILGen/lazy_global_access.swift index a4a05bf059d7a..bbdd6513de5bb 100644 --- a/test/SILGen/lazy_global_access.swift +++ b/test/SILGen/lazy_global_access.swift @@ -1,5 +1,5 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s -check-prefix=MAIN -// RUN: %swift -parse-as-library -emit-silgen %s | FileCheck %s -check-prefix=LIBRARY +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s -check-prefix=MAIN +// RUN: %target-swift-frontend -parse-as-library -emit-silgen %s | FileCheck %s -check-prefix=LIBRARY // The following code is valid as a library or as a main source file. Script // variables should be accessed directly, whereas library global variables diff --git a/test/SILGen/lazy_globals.swift b/test/SILGen/lazy_globals.swift index 33bf7e1ecc87e..ad8cf6630b553 100644 --- a/test/SILGen/lazy_globals.swift +++ b/test/SILGen/lazy_globals.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-as-library -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-as-library -emit-silgen %s | FileCheck %s // CHECK: sil private @globalinit_[[T:.*]]_func0 : $@thin () -> () { // CHECK: [[XADDR:%.*]] = global_addr @_Tv12lazy_globals1xSi : $*Int diff --git a/test/SILGen/let_decls.swift b/test/SILGen/let_decls.swift index c58425e67f165..39bbaceaa134f 100644 --- a/test/SILGen/let_decls.swift +++ b/test/SILGen/let_decls.swift @@ -1,4 +1,5 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s + func takeClosure(a : () -> Int) {} // Let decls don't get boxes for trivial types. diff --git a/test/SILGen/lifetime.swift b/test/SILGen/lifetime.swift index 3c310c41cabd1..c583b37e127ff 100644 --- a/test/SILGen/lifetime.swift +++ b/test/SILGen/lifetime.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-as-library -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-as-library -emit-silgen %s | FileCheck %s struct Buh { var x: Int { diff --git a/test/SILGen/lifetime_unions.swift b/test/SILGen/lifetime_unions.swift index 9c6c510e8ad9e..05d0686a8c5eb 100644 --- a/test/SILGen/lifetime_unions.swift +++ b/test/SILGen/lifetime_unions.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-as-library -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-as-library -emit-silgen %s | FileCheck %s enum TrivialUnion { case Foo diff --git a/test/SILGen/mangling.swift b/test/SILGen/mangling.swift index 0f925b6abdf00..9b0ff27de9bc1 100644 --- a/test/SILGen/mangling.swift +++ b/test/SILGen/mangling.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs %s -emit-silgen | FileCheck %s import gizmo diff --git a/test/SILGen/mangling_ext_structA.swift b/test/SILGen/mangling_ext_structA.swift index cb414ec91bdd4..4a9eb2d7ebd09 100644 --- a/test/SILGen/mangling_ext_structA.swift +++ b/test/SILGen/mangling_ext_structA.swift @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -o %t %S/Inputs/def_structA.swift -// RUN: %swift -emit-silgen -module-name ext_structA -I=%t %s | FileCheck %s +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/def_structA.swift +// RUN: %target-swift-frontend -emit-silgen -module-name ext_structA -I %t %s | FileCheck %s import def_structA diff --git a/test/SILGen/mangling_private.swift b/test/SILGen/mangling_private.swift index a817c0f227d8b..08a32ffedfa96 100644 --- a/test/SILGen/mangling_private.swift +++ b/test/SILGen/mangling_private.swift @@ -1,14 +1,14 @@ // RUN: rm -rf %t && mkdir %t -// RUN: %swift -emit-module -o %t %S/Inputs/mangling_private_helper.swift -// RUN: %swift -emit-silgen %S/Inputs/mangling_private_helper.swift | FileCheck %s -check-prefix=CHECK-BASE +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/mangling_private_helper.swift +// RUN: %target-swift-frontend -emit-silgen %S/Inputs/mangling_private_helper.swift | FileCheck %s -check-prefix=CHECK-BASE -// RUN: %swift %s -I %t -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend %s -I %t -emit-silgen | FileCheck %s // RUN: cp %s %t -// RUN: %swift %t/mangling_private.swift -I %t -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend %t/mangling_private.swift -I %t -emit-silgen | FileCheck %s // RUN: cp %s %t/other_name.swift -// RUN: %swift %t/other_name.swift -I %t -emit-silgen -module-name mangling_private | FileCheck %s -check-prefix=OTHER-NAME +// RUN: %target-swift-frontend %t/other_name.swift -I %t -emit-silgen -module-name mangling_private | FileCheck %s -check-prefix=OTHER-NAME import mangling_private_helper diff --git a/test/SILGen/materializeForSet.swift b/test/SILGen/materializeForSet.swift index 818488d76c36f..decae380d8c25 100644 --- a/test/SILGen/materializeForSet.swift +++ b/test/SILGen/materializeForSet.swift @@ -1,5 +1,5 @@ -// RUN: %swift -emit-sil -parse-stdlib %s | FileCheck %s -// RUN: %swift -emit-silgen -parse-stdlib %s | FileCheck %s -check-prefix=SILGEN +// RUN: %target-swift-frontend -emit-sil -parse-stdlib %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -parse-stdlib %s | FileCheck %s -check-prefix=SILGEN import Swift diff --git a/test/SILGen/metatype_abstraction.swift b/test/SILGen/metatype_abstraction.swift index 2dcfff180dbe7..35ab3e93143e6 100644 --- a/test/SILGen/metatype_abstraction.swift +++ b/test/SILGen/metatype_abstraction.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-stdlib -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-stdlib -emit-silgen %s | FileCheck %s struct S {} class C {} diff --git a/test/SILGen/metatype_casts.swift b/test/SILGen/metatype_casts.swift index f392355f3e8fc..be6eb9f41bf3c 100644 --- a/test/SILGen/metatype_casts.swift +++ b/test/SILGen/metatype_casts.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s // CHECK-LABEL: sil hidden @_TF14metatype_casts6t_is_uU___FT_Sb // CHECK: checked_cast_br {{.*}} $@thick T.Type to $@thick U.Type diff --git a/test/SILGen/metatype_object_conversion.swift b/test/SILGen/metatype_object_conversion.swift index 0e858f3387abb..e16efb2b3fba9 100644 --- a/test/SILGen/metatype_object_conversion.swift +++ b/test/SILGen/metatype_object_conversion.swift @@ -1,4 +1,6 @@ -// RUN: %swift -emit-silgen -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s + +// REQUIRES: objc_interop import Foundation diff --git a/test/SILGen/metatypes.swift b/test/SILGen/metatypes.swift index 991af8bcfe345..8f582cab72b87 100644 --- a/test/SILGen/metatypes.swift +++ b/test/SILGen/metatypes.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-stdlib -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-stdlib -emit-silgen %s | FileCheck %s import Swift diff --git a/test/SILGen/multi_file.swift b/test/SILGen/multi_file.swift index 415d369a01d4c..9cb990ce068e0 100644 --- a/test/SILGen/multi_file.swift +++ b/test/SILGen/multi_file.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen -primary-file %s %S/Inputs/multi_file_helper.swift | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/multi_file_helper.swift | FileCheck %s // CHECK-LABEL: sil hidden @_TF10multi_file12rdar16016713 func rdar16016713(r: Range) { diff --git a/test/SILGen/objc_attr_NSManaged.swift b/test/SILGen/objc_attr_NSManaged.swift index 55d3cae6aed37..080f83e7e7a0a 100644 --- a/test/SILGen/objc_attr_NSManaged.swift +++ b/test/SILGen/objc_attr_NSManaged.swift @@ -1,4 +1,4 @@ -// RUN: %swift -sdk %S/Inputs %s -I %S/Inputs -enable-source-import -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs %s -I %S/Inputs -enable-source-import -emit-silgen | FileCheck %s // This file is also used by objc_attr_NSManaged_multi.swift. diff --git a/test/SILGen/objc_attr_NSManaged_multi.swift b/test/SILGen/objc_attr_NSManaged_multi.swift index 683e7d732a24c..293fead4cb583 100644 --- a/test/SILGen/objc_attr_NSManaged_multi.swift +++ b/test/SILGen/objc_attr_NSManaged_multi.swift @@ -1,4 +1,4 @@ -// RUN: %swift -sdk %S/Inputs -primary-file %s %S/objc_attr_NSManaged.swift -I %S/Inputs -enable-source-import -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -primary-file %s %S/objc_attr_NSManaged.swift -I %S/Inputs -enable-source-import -emit-silgen | FileCheck %s import Foundation diff --git a/test/SILGen/objc_blocks_bridging.swift b/test/SILGen/objc_blocks_bridging.swift index 822a6098131a9..933e633029105 100644 --- a/test/SILGen/objc_blocks_bridging.swift +++ b/test/SILGen/objc_blocks_bridging.swift @@ -1,4 +1,6 @@ -// RUN: %swift -verify -emit-silgen -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s +// RUN: %target-swift-frontend -verify -emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s + +// REQUIRES: objc_interop import Foundation diff --git a/test/SILGen/objc_bridging.swift b/test/SILGen/objc_bridging.swift index f7dd45789b140..3966479b2db48 100644 --- a/test/SILGen/objc_bridging.swift +++ b/test/SILGen/objc_bridging.swift @@ -1,4 +1,6 @@ -// RUN: %swift -emit-silgen -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-cpu --check-prefix=CHECK-%target-os-%target-cpu + +// REQUIRES: objc_interop import Foundation @@ -82,22 +84,56 @@ func setFoo(var f: Foo, var s: String) { func getZim(f: Foo) -> Bool { return f.zim() } -// CHECK-LABEL: sil hidden @_TF13objc_bridging6getZim -// CHECK: [[OBJC_BOOL:%.*]] = apply {{.*}} : $@cc(objc_method) @thin (Foo) -> ObjCBool -// CHECK: [[CONVERT:%.*]] = function_ref @swift_ObjCBoolToBool : $@thin (ObjCBool) -> Bool -// CHECK: [[SWIFT_BOOL:%.*]] = apply [[CONVERT]]([[OBJC_BOOL]]) : $@thin (ObjCBool) -> Bool -// CHECK: return [[SWIFT_BOOL]] : $Bool -// CHECK: } +// CHECK-i386-LABEL: sil hidden @_TF13objc_bridging6getZim +// CHECK-i386: [[OBJC_BOOL:%.*]] = apply {{.*}} : $@cc(objc_method) @thin (Foo) -> ObjCBool +// CHECK-i386: [[CONVERT:%.*]] = function_ref @swift_ObjCBoolToBool : $@thin (ObjCBool) -> Bool +// CHECK-i386: [[SWIFT_BOOL:%.*]] = apply [[CONVERT]]([[OBJC_BOOL]]) : $@thin (ObjCBool) -> Bool +// CHECK-i386: return [[SWIFT_BOOL]] : $Bool +// CHECK-i386: } + +// CHECK-macsox-x86_64-LABEL: sil hidden @_TF13objc_bridging6getZim +// CHECK-macsox-x86_64: [[OBJC_BOOL:%.*]] = apply {{.*}} : $@cc(objc_method) @thin (Foo) -> ObjCBool +// CHECK-macsox-x86_64: [[CONVERT:%.*]] = function_ref @swift_ObjCBoolToBool : $@thin (ObjCBool) -> Bool +// CHECK-macsox-x86_64: [[SWIFT_BOOL:%.*]] = apply [[CONVERT]]([[OBJC_BOOL]]) : $@thin (ObjCBool) -> Bool +// CHECK-macsox-x86_64: return [[SWIFT_BOOL]] : $Bool +// CHECK-macsox-x86_64: } + +// CHECK-ios-x86_64-LABEL: sil hidden @_TF13objc_bridging6getZim +// CHECK-ios-x86_64: [[SWIFT_BOOL:%.*]] = apply {{.*}} : $@cc(objc_method) @thin (Foo) -> Bool +// CHECK-ios-x86_64: return [[SWIFT_BOOL]] : $Bool +// CHECK-ios-x86_64: } + +// CHECK-arm64-LABEL: sil hidden @_TF13objc_bridging6getZim +// CHECK-arm64: [[SWIFT_BOOL:%.*]] = apply {{.*}} : $@cc(objc_method) @thin (Foo) -> Bool +// CHECK-arm64: return [[SWIFT_BOOL]] : $Bool +// CHECK-arm64: } // @interface Foo -(void) setZim: (BOOL)b; @end func setZim(f: Foo, b: Bool) { f.setZim(b) } -// CHECK-LABEL: sil hidden @_TF13objc_bridging6setZim -// CHECK: [[CONVERT:%.*]] = function_ref @swift_BoolToObjCBool : $@thin (Bool) -> ObjCBool -// CHECK: [[OBJC_BOOL:%.*]] = apply [[CONVERT]]({{%.*}}) : $@thin (Bool) -> ObjCBool -// CHECK: apply {{%.*}}([[OBJC_BOOL]], {{%.*}}) : $@cc(objc_method) @thin (ObjCBool, Foo) -> () -// CHECK: } +// CHECK-i386-LABEL: sil hidden @_TF13objc_bridging6setZim +// CHECK-i386: [[CONVERT:%.*]] = function_ref @swift_BoolToObjCBool : $@thin (Bool) -> ObjCBool +// CHECK-i386: [[OBJC_BOOL:%.*]] = apply [[CONVERT]]({{%.*}}) : $@thin (Bool) -> ObjCBool +// CHECK-i386: apply {{%.*}}([[OBJC_BOOL]], {{%.*}}) : $@cc(objc_method) @thin (ObjCBool, Foo) -> () +// CHECK-i386: } + +// CHECK-macsox-x86_64-LABEL: sil hidden @_TF13objc_bridging6setZim +// CHECK-macsox-x86_64: [[CONVERT:%.*]] = function_ref @swift_BoolToObjCBool : $@thin (Bool) -> ObjCBool +// CHECK-macsox-x86_64: [[OBJC_BOOL:%.*]] = apply [[CONVERT]]({{%.*}}) : $@thin (Bool) -> ObjCBool +// CHECK-macsox-x86_64: apply {{%.*}}([[OBJC_BOOL]], {{%.*}}) : $@cc(objc_method) @thin (ObjCBool, Foo) -> () +// CHECK-macsox-x86_64: } + +// CHECK-ios-x86_64-LABEL: sil hidden @_TF13objc_bridging6setZim +// CHECK-ios-x86_64: bb0([[FOO_OBJ:%[0-9]+]] : $Foo, [[SWIFT_BOOL:%[0-9]+]] : $Bool): +// CHECK-ios-x86_64: apply {{%.*}}([[SWIFT_BOOL]], [[FOO_OBJ]]) : $@cc(objc_method) @thin (Bool, Foo) -> () +// CHECK-ios-x86_64: } + +// CHECK-arm64-LABEL: sil hidden @_TF13objc_bridging6setZim +// CHECK-arm64: bb0([[FOO_OBJ:%[0-9]+]] : $Foo, [[SWIFT_BOOL:%[0-9]+]] : $Bool): +// CHECK-arm64: apply {{%.*}}([[SWIFT_BOOL]], [[FOO_OBJ]]) : $@cc(objc_method) @thin (Bool, Foo) -> () +// CHECK-arm64: } + // @interface Foo -(_Bool) zang; @end func getZang(f: Foo) -> Bool { return f.zang() @@ -362,12 +398,37 @@ func forceNSArrayMembers() -> (NSArray, NSArray) { // CHECK: [[RESULT:%.*]] = apply [[METHOD]] // CHECK: return [[RESULT]] -// Check that type lowering preserves the bool/BOOL distinction when bridging imported C functions. -// CHECK-LABEL: sil hidden @_TF13objc_bridging5boolsFSbTSbSb_ -// CHECK: function_ref @useBOOL : $@cc(cdecl) @thin (ObjCBool) -> () -// CHECK: function_ref @useBool : $@cc(cdecl) @thin (Bool) -> () -// CHECK: function_ref @getBOOL : $@cc(cdecl) @thin () -> ObjCBool -// CHECK: function_ref @getBool : $@cc(cdecl) @thin () -> Bool +// Check that type lowering preserves the bool/BOOL distinction when bridging +// imported C functions. + +// CHECK-i386-LABEL: sil hidden @_TF13objc_bridging5boolsFSbTSbSb_ +// CHECK-i386: function_ref @useBOOL : $@cc(cdecl) @thin (ObjCBool) -> () +// CHECK-i386: function_ref @useBool : $@cc(cdecl) @thin (Bool) -> () +// CHECK-i386: function_ref @getBOOL : $@cc(cdecl) @thin () -> ObjCBool +// CHECK-i386: function_ref @getBool : $@cc(cdecl) @thin () -> Bool + +// CHECK-macsox-x86_64-LABEL: sil hidden @_TF13objc_bridging5boolsFSbTSbSb_ +// CHECK-macsox-x86_64: function_ref @useBOOL : $@cc(cdecl) @thin (ObjCBool) -> () +// CHECK-macsox-x86_64: function_ref @useBool : $@cc(cdecl) @thin (Bool) -> () +// CHECK-macsox-x86_64: function_ref @getBOOL : $@cc(cdecl) @thin () -> ObjCBool +// CHECK-macsox-x86_64: function_ref @getBool : $@cc(cdecl) @thin () -> Bool + +// FIXME: no distinction on x86_64 and arm64, since SILGen looks at the +// underlying Clang decl of the bridged decl to decide whether it needs +// bridging. +// +// CHECK-ios-x86_64-LABEL: sil hidden @_TF13objc_bridging5boolsFSbTSbSb_ +// CHECK-ios-x86_64: function_ref @useBOOL : $@cc(cdecl) @thin (Bool) -> () +// CHECK-ios-x86_64: function_ref @useBool : $@cc(cdecl) @thin (Bool) -> () +// CHECK-ios-x86_64: function_ref @getBOOL : $@cc(cdecl) @thin () -> Bool +// CHECK-ios-x86_64: function_ref @getBool : $@cc(cdecl) @thin () -> Bool + +// CHECK-arm64-LABEL: sil hidden @_TF13objc_bridging5boolsFSbTSbSb_ +// CHECK-arm64: function_ref @useBOOL : $@cc(cdecl) @thin (Bool) -> () +// CHECK-arm64: function_ref @useBool : $@cc(cdecl) @thin (Bool) -> () +// CHECK-arm64: function_ref @getBOOL : $@cc(cdecl) @thin () -> Bool +// CHECK-arm64: function_ref @getBool : $@cc(cdecl) @thin () -> Bool + func bools(x: Bool) -> (Bool, Bool) { useBOOL(x) useBool(x) diff --git a/test/SILGen/objc_currying.swift b/test/SILGen/objc_currying.swift index 470aa00facac6..71b3837a53262 100644 --- a/test/SILGen/objc_currying.swift +++ b/test/SILGen/objc_currying.swift @@ -1,4 +1,6 @@ -// RUN: %swift -emit-silgen -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s + +// REQUIRES: objc_interop import Foundation import gizmo diff --git a/test/SILGen/objc_dealloc.swift b/test/SILGen/objc_dealloc.swift index 057baa8c34f44..5edfa2f5d0f44 100644 --- a/test/SILGen/objc_dealloc.swift +++ b/test/SILGen/objc_dealloc.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-silgen | FileCheck %s import gizmo diff --git a/test/SILGen/objc_dictionary_bridging.swift b/test/SILGen/objc_dictionary_bridging.swift index c3b6ab3667c16..2c3fdb88063e6 100644 --- a/test/SILGen/objc_dictionary_bridging.swift +++ b/test/SILGen/objc_dictionary_bridging.swift @@ -1,4 +1,6 @@ -// RUN: %swift -emit-silgen -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s + +// REQUIRES: objc_interop import Foundation import gizmo diff --git a/test/SILGen/objc_enum.swift b/test/SILGen/objc_enum.swift index e52dc0ed18aec..b0c857015a534 100644 --- a/test/SILGen/objc_enum.swift +++ b/test/SILGen/objc_enum.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs %s -emit-silgen | FileCheck %s import gizmo diff --git a/test/SILGen/objc_extensions.swift b/test/SILGen/objc_extensions.swift index db798c0f13f2f..0437bbedec57c 100644 --- a/test/SILGen/objc_extensions.swift +++ b/test/SILGen/objc_extensions.swift @@ -1,4 +1,6 @@ -// RUN: %swift -emit-silgen -sdk %S/Inputs/ -I %S/Inputs -enable-source-import %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -sdk %S/Inputs/ -I %S/Inputs -enable-source-import %s | FileCheck %s + +// REQUIRES: objc_interop import Foundation import objc_extensions_helper diff --git a/test/SILGen/objc_factory_method.swift b/test/SILGen/objc_factory_method.swift index 8bce7a7619414..e9e508d42073f 100644 --- a/test/SILGen/objc_factory_method.swift +++ b/test/SILGen/objc_factory_method.swift @@ -1,8 +1,10 @@ -// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend %clang-importer-sdk %s -emit-silgen | FileCheck %s // FIXME: The -emit-sil line is there only to check that the generated // SIL doesn't freak out DI. -// RUN: %swift %clang-importer-sdk -target x86_64-apple-macosx10.9 %s -emit-sil | FileCheck %s +// RUN: %target-swift-frontend %clang-importer-sdk %s -emit-sil | FileCheck %s + +// REQUIRES: objc_interop import Foundation diff --git a/test/SILGen/objc_final.swift b/test/SILGen/objc_final.swift index 3c6db85bb9180..50490cf1686fa 100644 --- a/test/SILGen/objc_final.swift +++ b/test/SILGen/objc_final.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-silgen -emit-verbose-sil | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-silgen -emit-verbose-sil | FileCheck %s + +// REQUIRES: objc_interop import Foundation diff --git a/test/SILGen/objc_generic_class.swift b/test/SILGen/objc_generic_class.swift index 6bebcd74f8789..9f95c1a86cf3b 100644 --- a/test/SILGen/objc_generic_class.swift +++ b/test/SILGen/objc_generic_class.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-silgen | FileCheck %s + +// REQUIRES: objc_interop import gizmo diff --git a/test/SILGen/objc_imported_init.swift b/test/SILGen/objc_imported_init.swift index 6db3f0631979b..7e5b12ef7e684 100644 --- a/test/SILGen/objc_imported_init.swift +++ b/test/SILGen/objc_imported_init.swift @@ -1,4 +1,6 @@ -// RUN: %swift -verify -emit-silgen -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s +// RUN: %target-swift-frontend -verify -emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s + +// REQUIRES: objc_interop import Foundation diff --git a/test/SILGen/objc_init_ref_delegation.swift b/test/SILGen/objc_init_ref_delegation.swift index 8930b54b21899..7273facbea224 100644 --- a/test/SILGen/objc_init_ref_delegation.swift +++ b/test/SILGen/objc_init_ref_delegation.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-silgen | FileCheck %s + +// REQUIRES: objc_interop import gizmo diff --git a/test/SILGen/objc_local.swift b/test/SILGen/objc_local.swift index 68a01e7a0c225..996e3e3ff5761 100644 --- a/test/SILGen/objc_local.swift +++ b/test/SILGen/objc_local.swift @@ -1,4 +1,6 @@ -// RUN: %swift -emit-silgen -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s + +// REQUIRES: objc_interop import Foundation diff --git a/test/SILGen/objc_metatypes.swift b/test/SILGen/objc_metatypes.swift index 87aebe53435dc..984e7fd975894 100644 --- a/test/SILGen/objc_metatypes.swift +++ b/test/SILGen/objc_metatypes.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs %s -emit-silgen -disable-objc-attr-requires-foundation-module | FileCheck %s + +// REQUIRES: objc_interop import gizmo diff --git a/test/SILGen/objc_nonnull_lie_hack.swift b/test/SILGen/objc_nonnull_lie_hack.swift index 624be526a8b9b..7e930c6598d85 100644 --- a/test/SILGen/objc_nonnull_lie_hack.swift +++ b/test/SILGen/objc_nonnull_lie_hack.swift @@ -1,8 +1,10 @@ // RUN: rm -rf %t/APINotes // RUN: mkdir -p %t/APINotes // RUN: %clang_apinotes -yaml-to-binary %S/Inputs/gizmo.apinotes -o %t/APINotes/gizmo.apinotesc -// RUN: %swift -emit-silgen -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -I %t/APINotes -enable-source-import -primary-file %s | FileCheck -check-prefix=SILGEN %s -// RUN: %swift -emit-sil -O -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -I %t/APINotes -enable-source-import -primary-file %s | FileCheck -check-prefix=OPT %s +// RUN: %target-swift-frontend -emit-silgen -sdk %S/Inputs -I %S/Inputs -I %t/APINotes -enable-source-import -primary-file %s | FileCheck -check-prefix=SILGEN %s +// RUN: %target-swift-frontend -emit-sil -O -sdk %S/Inputs -I %S/Inputs -I %t/APINotes -enable-source-import -primary-file %s | FileCheck -check-prefix=OPT %s + +// REQUIRES: objc_interop import Foundation import gizmo diff --git a/test/SILGen/objc_options.swift b/test/SILGen/objc_options.swift index 770666882f9e7..90766c3380d82 100644 --- a/test/SILGen/objc_options.swift +++ b/test/SILGen/objc_options.swift @@ -1,4 +1,6 @@ -// RUN: %swift %clang-importer-sdk -emit-silgen -target x86_64-apple-macosx10.9 %s | FileCheck %s +// RUN: %target-swift-frontend %clang-importer-sdk -emit-silgen %s | FileCheck %s + +// REQUIRES: objc_interop import Foundation diff --git a/test/SILGen/objc_ownership_conventions.swift b/test/SILGen/objc_ownership_conventions.swift index 979625de0088a..7bb8781e8ac2e 100644 --- a/test/SILGen/objc_ownership_conventions.swift +++ b/test/SILGen/objc_ownership_conventions.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-silgen | FileCheck %s + +// REQUIRES: objc_interop import gizmo diff --git a/test/SILGen/objc_properties.swift b/test/SILGen/objc_properties.swift index 557d76c5f9f43..a7df52fd94d6b 100644 --- a/test/SILGen/objc_properties.swift +++ b/test/SILGen/objc_properties.swift @@ -1,4 +1,6 @@ -// RUN: %swift %s -emit-silgen -emit-verbose-sil -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import | FileCheck %s +// RUN: %target-swift-frontend %s -emit-silgen -emit-verbose-sil -sdk %S/Inputs -I %S/Inputs -enable-source-import | FileCheck %s + +// REQUIRES: objc_interop import Foundation diff --git a/test/SILGen/objc_protocols.swift b/test/SILGen/objc_protocols.swift index ec771508d2ee4..70921661bb0a4 100644 --- a/test/SILGen/objc_protocols.swift +++ b/test/SILGen/objc_protocols.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-silgen -disable-objc-attr-requires-foundation-module | FileCheck %s + +// REQUIRES: objc_interop import gizmo import objc_protocols_Bas diff --git a/test/SILGen/objc_set_bridging.swift b/test/SILGen/objc_set_bridging.swift index 982895f6fce57..d3c0b99f6db21 100644 --- a/test/SILGen/objc_set_bridging.swift +++ b/test/SILGen/objc_set_bridging.swift @@ -1,5 +1,6 @@ -// RUN: rm -rf %t/clang-module-cache -// RUN: %swift -emit-silgen -module-cache-path %t/clang-module-cache -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s + +// REQUIRES: objc_interop import Foundation import gizmo diff --git a/test/SILGen/objc_subscript.swift b/test/SILGen/objc_subscript.swift index 69f885cc10d1f..3d7e639a74e12 100644 --- a/test/SILGen/objc_subscript.swift +++ b/test/SILGen/objc_subscript.swift @@ -1,4 +1,6 @@ -// RUN: %swift %s -emit-silgen -emit-verbose-sil | FileCheck %s +// RUN: %target-swift-frontend %s -emit-silgen -emit-verbose-sil -disable-objc-attr-requires-foundation-module | FileCheck %s + +// REQUIRES: objc_interop @objc class ObjCClass {} diff --git a/test/SILGen/objc_super.swift b/test/SILGen/objc_super.swift index 337f21fa3f698..e820b2da02756 100644 --- a/test/SILGen/objc_super.swift +++ b/test/SILGen/objc_super.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-silgen | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-silgen | FileCheck %s + +// REQUIRES: objc_interop import gizmo diff --git a/test/SILGen/objc_thunks.swift b/test/SILGen/objc_thunks.swift index 30c1a2059577d..b7f72df5b8594 100644 --- a/test/SILGen/objc_thunks.swift +++ b/test/SILGen/objc_thunks.swift @@ -1,4 +1,6 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-silgen -emit-verbose-sil | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-silgen -emit-verbose-sil | FileCheck %s + +// REQUIRES: objc_interop import gizmo @@ -10,8 +12,8 @@ class Hoozit : Gizmo { // CHECK-NEXT: retain [[THIS]] // CHECK-NEXT: // function_ref // CHECK-NEXT: [[NATIVE:%.*]] = function_ref @_TFC11objc_thunks6Hoozit7typicalfS0_FTSi1yCSo5Gizmo_S1_ : $@cc(method) @thin (Int, @owned Gizmo, @owned Hoozit) -> @owned Gizmo - // CHECK-NEXT: [[RES:%.*]] = apply [[NATIVE]]([[X]], [[Y]], [[THIS]]) {{.*}} line:6:8:auto_gen - // CHECK-NEXT: autorelease_return [[RES]] : $Gizmo // {{.*}} line:6:8:auto_gen + // CHECK-NEXT: [[RES:%.*]] = apply [[NATIVE]]([[X]], [[Y]], [[THIS]]) {{.*}} line:[[@LINE-7]]:8:auto_gen + // CHECK-NEXT: autorelease_return [[RES]] : $Gizmo // {{.*}} line:[[@LINE-8]]:8:auto_gen // CHECK-NEXT: } // NS_CONSUMES_SELF by inheritance diff --git a/test/SILGen/objc_witnesses.swift b/test/SILGen/objc_witnesses.swift index 2d6e26cca89c6..5771a99e8e4be 100644 --- a/test/SILGen/objc_witnesses.swift +++ b/test/SILGen/objc_witnesses.swift @@ -1,4 +1,6 @@ -// RUN: %swift -emit-silgen -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s + +// REQUIRES: objc_interop import Foundation import gizmo diff --git a/test/SILGen/optional-cast.swift b/test/SILGen/optional-cast.swift index 2b59ea7b6817e..5cf479c62fc37 100644 --- a/test/SILGen/optional-cast.swift +++ b/test/SILGen/optional-cast.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s class A {} class B : A {} diff --git a/test/SILGen/optional.swift b/test/SILGen/optional.swift index 1c319d5e7faed..7808bb8850a89 100644 --- a/test/SILGen/optional.swift +++ b/test/SILGen/optional.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s func foo(var f: (()->())?) { f?() diff --git a/test/SILGen/optional_lvalue.swift b/test/SILGen/optional_lvalue.swift index 2d773eb77d010..fe32173ca4a5f 100644 --- a/test/SILGen/optional_lvalue.swift +++ b/test/SILGen/optional_lvalue.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s // CHECK-LABEL: sil hidden @_TF15optional_lvalue22assign_optional_lvalueFTRGSqSi_Si_T_ // CHECK: [[SHADOW:%.*]] = alloc_box $Optional diff --git a/test/SILGen/partial_apply_generic.swift b/test/SILGen/partial_apply_generic.swift index 47f2989ec572b..9de43b7001026 100644 --- a/test/SILGen/partial_apply_generic.swift +++ b/test/SILGen/partial_apply_generic.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s protocol Foo { static func foo() diff --git a/test/SILGen/pointer_conversion.swift b/test/SILGen/pointer_conversion.swift index 972966aa7d3da..0196c85134824 100644 --- a/test/SILGen/pointer_conversion.swift +++ b/test/SILGen/pointer_conversion.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s import Foundation diff --git a/test/SILGen/properties.swift b/test/SILGen/properties.swift index b7307fc780da8..4a7c8c8e2d940 100644 --- a/test/SILGen/properties.swift +++ b/test/SILGen/properties.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-as-library -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-as-library -emit-silgen %s | FileCheck %s var zero: Int = 0 diff --git a/test/SILGen/property_abstraction.swift b/test/SILGen/property_abstraction.swift index f431e6592ff32..b96187a139fb6 100644 --- a/test/SILGen/property_abstraction.swift +++ b/test/SILGen/property_abstraction.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-stdlib -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-stdlib -emit-silgen %s | FileCheck %s struct Int { mutating func foo() {} diff --git a/test/SILGen/protocol_cast_toplevel.swift b/test/SILGen/protocol_cast_toplevel.swift index 6c92bc2c9fc23..3e6d47b39ab01 100644 --- a/test/SILGen/protocol_cast_toplevel.swift +++ b/test/SILGen/protocol_cast_toplevel.swift @@ -1,4 +1,6 @@ -// RUN: %swift -emit-silgen %s +// RUN: %target-swift-frontend -emit-silgen %s -disable-objc-attr-requires-foundation-module + +// REQUIRES: objc_interop @objc protocol Unrelated {} diff --git a/test/SILGen/protocol_class_refinement.swift b/test/SILGen/protocol_class_refinement.swift index b2c36edbc7ed8..c4301c4d3e36e 100644 --- a/test/SILGen/protocol_class_refinement.swift +++ b/test/SILGen/protocol_class_refinement.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s protocol UID { func uid() -> Int diff --git a/test/SILGen/protocol_optional.swift b/test/SILGen/protocol_optional.swift index 1ea9509d5d098..f31448689292b 100644 --- a/test/SILGen/protocol_optional.swift +++ b/test/SILGen/protocol_optional.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-as-library -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-as-library -emit-silgen %s | FileCheck %s @objc protocol P1 { optional func method(x: Int) diff --git a/test/SILGen/protocols.swift b/test/SILGen/protocols.swift index f1c0f45c345ee..9f8f5a475c57f 100644 --- a/test/SILGen/protocols.swift +++ b/test/SILGen/protocols.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s //===----------------------------------------------------------------------===// // Calling Existential Subscripts diff --git a/test/SILGen/reabstract.swift b/test/SILGen/reabstract.swift index 1f069c625c1ca..6a7951699325d 100644 --- a/test/SILGen/reabstract.swift +++ b/test/SILGen/reabstract.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s func takeFn(f : T -> T?) {} func liftOptional(x : Int) -> Int? { return x } diff --git a/test/SILGen/required_init.swift b/test/SILGen/required_init.swift index 50f4760141de2..2688f44844263 100644 --- a/test/SILGen/required_init.swift +++ b/test/SILGen/required_init.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s func subclassFloatLiteral() -> Bar { let x: Bar = 1.0 diff --git a/test/SILGen/result_abstraction.swift b/test/SILGen/result_abstraction.swift index 04d037636fb95..b66b6e2c95b32 100644 --- a/test/SILGen/result_abstraction.swift +++ b/test/SILGen/result_abstraction.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s struct S {} struct R {} diff --git a/test/SILGen/same_type_abstraction.swift b/test/SILGen/same_type_abstraction.swift index 7b03dd6e0dc89..3ac25cafc19fa 100644 --- a/test/SILGen/same_type_abstraction.swift +++ b/test/SILGen/same_type_abstraction.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s protocol Associated { typealias Assoc diff --git a/test/SILGen/sil_locations.swift b/test/SILGen/sil_locations.swift index 80b3cf2b66409..dda922e78e428 100644 --- a/test/SILGen/sil_locations.swift +++ b/test/SILGen/sil_locations.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen -emit-verbose-sil %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -emit-verbose-sil %s | FileCheck %s // FIXME: Not sure if this an ideal source info for the branch - // it points to if, not the last instruction in the block. diff --git a/test/SILGen/sil_locations_top_level.swift b/test/SILGen/sil_locations_top_level.swift index 95c75fa59e4f6..bdee09ea6d342 100644 --- a/test/SILGen/sil_locations_top_level.swift +++ b/test/SILGen/sil_locations_top_level.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen -emit-verbose-sil %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -emit-verbose-sil %s | FileCheck %s // Test top-level/module locations. class TopLevelObjectTy { diff --git a/test/SILGen/specialize_thunk.swift b/test/SILGen/specialize_thunk.swift index eb4c40d044dcb..93483975ac981 100644 --- a/test/SILGen/specialize_thunk.swift +++ b/test/SILGen/specialize_thunk.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -emit-silgen -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-silgen -o - | FileCheck %s func standalone_generic(x: T, y: T) -> T { return x } diff --git a/test/SILGen/statements.swift b/test/SILGen/statements.swift index 7939a221db6ac..efa66382c32a7 100644 --- a/test/SILGen/statements.swift +++ b/test/SILGen/statements.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-as-library -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-as-library -emit-silgen %s | FileCheck %s func bar(x: Int) {} func foo(x: Int, y: Bool) {} diff --git a/test/SILGen/super_class_method.swift b/test/SILGen/super_class_method.swift index 07ef114e345d5..b75182556b299 100644 --- a/test/SILGen/super_class_method.swift +++ b/test/SILGen/super_class_method.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen -target x86_64-apple-macosx10.9 -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | FileCheck %s import Foundation class MyFunkyDictionary: NSDictionary { diff --git a/test/SILGen/super_init_refcounting.swift b/test/SILGen/super_init_refcounting.swift index a37e9aed214aa..8ffb5929a2ce1 100644 --- a/test/SILGen/super_init_refcounting.swift +++ b/test/SILGen/super_init_refcounting.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s class Foo { init() {} diff --git a/test/SILGen/switch.swift b/test/SILGen/switch.swift index d7094c4be3b38..23727b041315e 100644 --- a/test/SILGen/switch.swift +++ b/test/SILGen/switch.swift @@ -1,4 +1,4 @@ -// RUN: %swift -enable-experimental-patterns -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -enable-experimental-patterns -emit-silgen %s | FileCheck %s // TODO: Implement tuple equality in the library. // BLOCKED: diff --git a/test/SILGen/switch_abstraction.swift b/test/SILGen/switch_abstraction.swift index 43242349d390d..e469b5fce661d 100644 --- a/test/SILGen/switch_abstraction.swift +++ b/test/SILGen/switch_abstraction.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen -parse-stdlib %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -parse-stdlib %s | FileCheck %s struct A {} diff --git a/test/SILGen/switch_fallthrough.swift b/test/SILGen/switch_fallthrough.swift index fdbc454660932..753a5b5bce737 100644 --- a/test/SILGen/switch_fallthrough.swift +++ b/test/SILGen/switch_fallthrough.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s // Some fake predicates for pattern guards. func runced() -> Bool { return true } diff --git a/test/SILGen/switch_isa.swift b/test/SILGen/switch_isa.swift index 1ec4f980d3fa4..fb0b93b4a9eca 100644 --- a/test/SILGen/switch_isa.swift +++ b/test/SILGen/switch_isa.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s // rdar://17772217 func testSwitchOnExistential(value: Any) { diff --git a/test/SILGen/switch_objc.swift b/test/SILGen/switch_objc.swift index 8f373280de120..bc0ab6e15fac9 100644 --- a/test/SILGen/switch_objc.swift +++ b/test/SILGen/switch_objc.swift @@ -1,4 +1,6 @@ -// RUN: %swift %clang-importer-sdk -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend %clang-importer-sdk -emit-silgen %s | FileCheck %s + +// REQUIRES: objc_interop import Foundation diff --git a/test/SILGen/switch_var.swift b/test/SILGen/switch_var.swift index 36b22a3a4e04a..06da3398e141b 100644 --- a/test/SILGen/switch_var.swift +++ b/test/SILGen/switch_var.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s // TODO: Implement tuple equality in the library. // BLOCKED: diff --git a/test/SILGen/toplevel.swift b/test/SILGen/toplevel.swift index b89b2387c3f65..5d5fa34587ce6 100644 --- a/test/SILGen/toplevel.swift +++ b/test/SILGen/toplevel.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s // CHECK-LABEL: sil @main // CHECK: bb0({{%.*}} : $Int32, {{%.*}} : $UnsafeMutablePointer>): diff --git a/test/SILGen/transparent_attribute.swift b/test/SILGen/transparent_attribute.swift index f06b029a82a9a..377295a2903ce 100644 --- a/test/SILGen/transparent_attribute.swift +++ b/test/SILGen/transparent_attribute.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen -emit-verbose-sil %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -emit-verbose-sil %s | FileCheck %s // Test if 'transparent' atribute gets propagated correctly to apply instructions. diff --git a/test/SILGen/tuples.swift b/test/SILGen/tuples.swift index 20efa36494075..2db55684f8dd7 100644 --- a/test/SILGen/tuples.swift +++ b/test/SILGen/tuples.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s class C {} enum Foo { diff --git a/test/SILGen/types.swift b/test/SILGen/types.swift index 75eb96361cfe2..5a92c1dfd5a4c 100644 --- a/test/SILGen/types.swift +++ b/test/SILGen/types.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-as-library -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -parse-as-library -emit-silgen %s | FileCheck %s class C { var member: Int = 0 diff --git a/test/SILGen/unicode_scalar_concat.swift b/test/SILGen/unicode_scalar_concat.swift index 67d96dd22f8e1..4dc8373b25414 100644 --- a/test/SILGen/unicode_scalar_concat.swift +++ b/test/SILGen/unicode_scalar_concat.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s // Check that string literals that are unicode scalar literals // are emitted as string_literal instead of integers. diff --git a/test/SILGen/union.swift b/test/SILGen/union.swift index 2148719296c19..e946705401aae 100644 --- a/test/SILGen/union.swift +++ b/test/SILGen/union.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen -parse-as-library %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen -parse-as-library %s | FileCheck %s enum Boolish { case falsy diff --git a/test/SILGen/unmanaged.swift b/test/SILGen/unmanaged.swift index f7ba410deded5..8ff81a038ff49 100644 --- a/test/SILGen/unmanaged.swift +++ b/test/SILGen/unmanaged.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-sil %s | FileCheck %s +// RUN: %target-swift-frontend -emit-sil %s | FileCheck %s class C {} diff --git a/test/SILGen/unowned.swift b/test/SILGen/unowned.swift index 047321e887365..d8c356c53d9cf 100644 --- a/test/SILGen/unowned.swift +++ b/test/SILGen/unowned.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s func takeClosure(fn: () -> Int) {} diff --git a/test/SILGen/unreachable_code.swift b/test/SILGen/unreachable_code.swift index cf8b98229beb8..19085c28fdb26 100644 --- a/test/SILGen/unreachable_code.swift +++ b/test/SILGen/unreachable_code.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-sil %s -o /dev/null -verify +// RUN: %target-swift-frontend -emit-sil %s -o /dev/null -verify func testUnreachableAfterReturn() -> Int { var x: Int = 3; diff --git a/test/SILGen/unsupported_recursive_value_type.swift b/test/SILGen/unsupported_recursive_value_type.swift index a0bd26499edca..37b39f2eb135d 100644 --- a/test/SILGen/unsupported_recursive_value_type.swift +++ b/test/SILGen/unsupported_recursive_value_type.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-sil -verify %s +// RUN: %target-swift-frontend -emit-sil -verify %s struct SelfRecursiveStruct { // expected-error{{recursive value type}} let a: SelfRecursiveStruct diff --git a/test/SILGen/upcast_existential.swift b/test/SILGen/upcast_existential.swift index bb975c14366b7..8491a8634ce06 100644 --- a/test/SILGen/upcast_existential.swift +++ b/test/SILGen/upcast_existential.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s protocol P {} protocol Q {} diff --git a/test/SILGen/vtables.swift b/test/SILGen/vtables.swift index f52da9dcdbcd1..1393a496365f5 100644 --- a/test/SILGen/vtables.swift +++ b/test/SILGen/vtables.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -emit-silgen -I %S/Inputs -enable-source-import %s | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -emit-silgen -I %S/Inputs -enable-source-import %s -disable-objc-attr-requires-foundation-module | FileCheck %s import gizmo diff --git a/test/SILGen/weak.swift b/test/SILGen/weak.swift index da9b14d7c4c72..d68da0b955e40 100644 --- a/test/SILGen/weak.swift +++ b/test/SILGen/weak.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s class C { func f() -> Int { return 42 } diff --git a/test/SILGen/witness_same_type.swift b/test/SILGen/witness_same_type.swift index 39fe05eaefae6..441d8d0e8f20d 100644 --- a/test/SILGen/witness_same_type.swift +++ b/test/SILGen/witness_same_type.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s protocol Fooable { typealias Bar diff --git a/test/SILGen/witness_tables.swift b/test/SILGen/witness_tables.swift index 678ddf4ecfac3..cd2dcd1ea9c35 100644 --- a/test/SILGen/witness_tables.swift +++ b/test/SILGen/witness_tables.swift @@ -1,5 +1,6 @@ -// RUN: %swift -emit-silgen -parse-stdlib -I %S/Inputs -enable-source-import %s | FileCheck -check-prefix=TABLE %s -// RUN: %swift -emit-silgen -parse-stdlib -I %S/Inputs -enable-source-import %s | FileCheck -check-prefix=SYMBOL %s +// RUN: %target-swift-frontend -emit-silgen -parse-stdlib -I %S/Inputs -enable-source-import %s -disable-objc-attr-requires-foundation-module > %t.sil +// RUN: FileCheck -check-prefix=TABLE %s < %t.sil +// RUN: FileCheck -check-prefix=SYMBOL %s < %t.sil import witness_tables_b diff --git a/test/SILGen/witnesses.swift b/test/SILGen/witnesses.swift index 2a8343c99f856..4f09331174772 100644 --- a/test/SILGen/witnesses.swift +++ b/test/SILGen/witnesses.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s -disable-objc-attr-requires-foundation-module | FileCheck %s infix operator <~> {} diff --git a/test/SILGen/witnesses_class.swift b/test/SILGen/witnesses_class.swift index bb6026c557acf..6fc2ecf86304e 100644 --- a/test/SILGen/witnesses_class.swift +++ b/test/SILGen/witnesses_class.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s protocol Fooable: class { func foo() diff --git a/test/SILGen/witnesses_inheritance.swift b/test/SILGen/witnesses_inheritance.swift index 1aae645b2c62d..8dd638600deda 100644 --- a/test/SILGen/witnesses_inheritance.swift +++ b/test/SILGen/witnesses_inheritance.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s protocol Fooable { func foo() diff --git a/test/SILGen/witnesses_refinement.swift b/test/SILGen/witnesses_refinement.swift index 2f4c7ac848a49..350778f6db214 100644 --- a/test/SILGen/witnesses_refinement.swift +++ b/test/SILGen/witnesses_refinement.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s protocol Saturable: Comparable { func saturated(max: Self) -> Self diff --git a/test/SILGen/writeback.swift b/test/SILGen/writeback.swift index 5e5b94f5c47d4..3ec720442ec39 100644 --- a/test/SILGen/writeback.swift +++ b/test/SILGen/writeback.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen %s | FileCheck %s +// RUN: %target-swift-frontend -emit-silgen %s | FileCheck %s struct Foo { mutating // used to test writeback. diff --git a/test/SILGen/writeback_conflict_diagnostics.swift b/test/SILGen/writeback_conflict_diagnostics.swift index e9068f725365b..8eb9a9884403f 100644 --- a/test/SILGen/writeback_conflict_diagnostics.swift +++ b/test/SILGen/writeback_conflict_diagnostics.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -o /dev/null -emit-silgen -verify +// RUN: %target-swift-frontend %s -o /dev/null -emit-silgen -verify struct MutatorStruct { diff --git a/test/SILPasses/abcopts.sil b/test/SILPasses/abcopts.sil index e049029a59b22..3c9a52734e472 100644 --- a/test/SILPasses/abcopts.sil +++ b/test/SILPasses/abcopts.sil @@ -1,5 +1,5 @@ -// RUN: %sil-opt -loop-rotate -dce -simplify-cfg -abcopts -enable-abcopts=1 %s | FileCheck %s -// RUN: %sil-opt -loop-rotate -dce -simplify-cfg -abcopts -dce -enable-abcopts -enable-abc-hoisting %s | FileCheck %s --check-prefix=HOIST +// RUN: %target-sil-opt -loop-rotate -dce -simplify-cfg -abcopts -enable-abcopts=1 %s | FileCheck %s +// RUN: %target-sil-opt -loop-rotate -dce -simplify-cfg -abcopts -dce -enable-abcopts -enable-abc-hoisting %s | FileCheck %s --check-prefix=HOIST sil_stage canonical diff --git a/test/SILPasses/allocbox_to_stack.sil b/test/SILPasses/allocbox_to_stack.sil index b7029c715eb6b..7a8e4f7d25726 100644 --- a/test/SILPasses/allocbox_to_stack.sil +++ b/test/SILPasses/allocbox_to_stack.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -allocbox-to-stack | FileCheck %s +// RUN: %target-sil-opt %s -allocbox-to-stack | FileCheck %s import Builtin import Swift diff --git a/test/SILPasses/allocbox_to_stack_with_false.swift b/test/SILPasses/allocbox_to_stack_with_false.swift index f84675696858f..aba894768ddc9 100644 --- a/test/SILPasses/allocbox_to_stack_with_false.swift +++ b/test/SILPasses/allocbox_to_stack_with_false.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-sil %s | FileCheck %s +// RUN: %target-swift-frontend -emit-sil %s | FileCheck %s // Make sure that materializations of computed properties such as 'false' and // 'true' don't leave needless stack allocations. diff --git a/test/SILPasses/always_inline.sil b/test/SILPasses/always_inline.sil index 4a291e6a44b91..367cfd5ef39fd 100644 --- a/test/SILPasses/always_inline.sil +++ b/test/SILPasses/always_inline.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -inline -dce -sil-inline-threshold=1 -verify | FileCheck %s +// RUN: %target-sil-opt %s -inline -dce -sil-inline-threshold=1 -verify | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/array_mutable.swift b/test/SILPasses/array_mutable.swift index 0b2986fe71ce0..987ac1ecaecaa 100644 --- a/test/SILPasses/array_mutable.swift +++ b/test/SILPasses/array_mutable.swift @@ -1,4 +1,4 @@ -// RUN: %swift -O -emit-sil -primary-file %s | FileCheck %s +// RUN: %target-swift-frontend -O -emit-sil -primary-file %s | FileCheck %s // // Test Array "make_mutable" hoisting. It's hard for FileCheck to // recognize the hoisting because we don't know which block is the diff --git a/test/SILPasses/assert_configuration.sil b/test/SILPasses/assert_configuration.sil index eb905bc5dbd94..5788db42d127b 100644 --- a/test/SILPasses/assert_configuration.sil +++ b/test/SILPasses/assert_configuration.sil @@ -1,6 +1,6 @@ -// RUN: %sil-opt %s -diagnostic-constant-propagation -assert-conf-id 1 | FileCheck %s --check-prefix=ONE -// RUN: %sil-opt %s -diagnostic-constant-propagation -assert-conf-id 4294967295 | FileCheck %s --check-prefix=DISABLED -// RUN: %sil-opt %s -performance-constant-propagation -assert-conf-id 1 | FileCheck %s --check-prefix=PERFONE +// RUN: %target-sil-opt %s -diagnostic-constant-propagation -assert-conf-id 1 | FileCheck %s --check-prefix=ONE +// RUN: %target-sil-opt %s -diagnostic-constant-propagation -assert-conf-id 4294967295 | FileCheck %s --check-prefix=DISABLED +// RUN: %target-sil-opt %s -performance-constant-propagation -assert-conf-id 1 | FileCheck %s --check-prefix=PERFONE import Builtin diff --git a/test/SILPasses/canonicalize_switch_enum.sil b/test/SILPasses/canonicalize_switch_enum.sil index f06450e45c35d..ee02478f5d41f 100644 --- a/test/SILPasses/canonicalize_switch_enum.sil +++ b/test/SILPasses/canonicalize_switch_enum.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -simplify-cfg -verify | FileCheck %s +// RUN: %target-sil-opt %s -simplify-cfg -verify | FileCheck %s import Builtin import Swift diff --git a/test/SILPasses/capture_promotion.sil b/test/SILPasses/capture_promotion.sil index 95fe6d7721dc4..217fb2a37ee31 100644 --- a/test/SILPasses/capture_promotion.sil +++ b/test/SILPasses/capture_promotion.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -capture-promotion -verify | FileCheck %s +// RUN: %target-sil-opt %s -capture-promotion -verify | FileCheck %s // Check to make sure that the process of promoting closure captures results in // a correctly cloned and modified closure function body. This test diff --git a/test/SILPasses/capture_promotion.swift b/test/SILPasses/capture_promotion.swift index a7b3f4adbbf29..a6a647c773eb2 100644 --- a/test/SILPasses/capture_promotion.swift +++ b/test/SILPasses/capture_promotion.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -emit-sil -o - -verify | FileCheck %s +// RUN: %target-swift-frontend %s -emit-sil -o - -verify | FileCheck %s class Foo { func foo() -> Int { diff --git a/test/SILPasses/capture_promotion_reachability.sil b/test/SILPasses/capture_promotion_reachability.sil index aca4db8ffe6ad..1f99e807f70fa 100644 --- a/test/SILPasses/capture_promotion_reachability.sil +++ b/test/SILPasses/capture_promotion_reachability.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -capture-promotion -verify | FileCheck %s +// RUN: %target-sil-opt %s -capture-promotion -verify | FileCheck %s sil_stage raw diff --git a/test/SILPasses/capture_propagation.sil b/test/SILPasses/capture_propagation.sil index 05bbbc971997f..9b5a82fe60746 100644 --- a/test/SILPasses/capture_propagation.sil +++ b/test/SILPasses/capture_propagation.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -capture-prop -verify | FileCheck %s +// RUN: %target-sil-opt %s -capture-prop -verify | FileCheck %s // Check the CapturePropagation specialized the reabstraction thunk. @@ -112,4 +112,4 @@ bb0(%0 : $@callee_owned () -> ()): apply %0() : $@callee_owned () -> () %9999 = tuple() return %9999 : $() -} \ No newline at end of file +} diff --git a/test/SILPasses/closure_specialize.sil b/test/SILPasses/closure_specialize.sil index 4a4c03af9a918..12bb1a3370934 100644 --- a/test/SILPasses/closure_specialize.sil +++ b/test/SILPasses/closure_specialize.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt -closure-specialize %s | FileCheck %s +// RUN: %target-sil-opt -closure-specialize %s | FileCheck %s import Builtin import Swift diff --git a/test/SILPasses/closure_specialize_bug.sil b/test/SILPasses/closure_specialize_bug.sil index 484164efa0827..f1cb2b2fc5836 100644 --- a/test/SILPasses/closure_specialize_bug.sil +++ b/test/SILPasses/closure_specialize_bug.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt -closure-specialize %s | FileCheck %s +// RUN: %target-sil-opt -closure-specialize %s | FileCheck %s + // rdar://18156518 import Builtin diff --git a/test/SILPasses/closure_specialize_simple.sil b/test/SILPasses/closure_specialize_simple.sil index 622b4d7532ed6..94197884068a1 100644 --- a/test/SILPasses/closure_specialize_simple.sil +++ b/test/SILPasses/closure_specialize_simple.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt -closure-specialize %s | FileCheck %s +// RUN: %target-sil-opt -closure-specialize %s | FileCheck %s import Builtin import Swift diff --git a/test/SILPasses/codemotion.sil b/test/SILPasses/codemotion.sil index aee671ac393bb..bd32d7c32d07e 100644 --- a/test/SILPasses/codemotion.sil +++ b/test/SILPasses/codemotion.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -codemotion -verify | FileCheck %s +// RUN: %target-sil-opt %s -codemotion -verify | FileCheck %s import Builtin import Swift diff --git a/test/SILPasses/constant_propagation.sil b/test/SILPasses/constant_propagation.sil index 5271221c02f43..5fbfd7f88260d 100644 --- a/test/SILPasses/constant_propagation.sil +++ b/test/SILPasses/constant_propagation.sil @@ -1,5 +1,5 @@ -// RUN: %sil-opt %s -diagnostic-constant-propagation | FileCheck %s -// RUN: %sil-opt %s -performance-constant-propagation | FileCheck %s +// RUN: %target-sil-opt %s -diagnostic-constant-propagation | FileCheck %s +// RUN: %target-sil-opt %s -performance-constant-propagation | FileCheck %s import Builtin diff --git a/test/SILPasses/constant_propagation2.sil b/test/SILPasses/constant_propagation2.sil index 42c8a3d58e743..bc7e29af3416f 100644 --- a/test/SILPasses/constant_propagation2.sil +++ b/test/SILPasses/constant_propagation2.sil @@ -1,4 +1,5 @@ -// RUN: %swift %s -emit-sil -verify +// RUN: %target-swift-frontend %s -emit-sil -verify + import Builtin // fold_sadd_with_overflow_Overflow diff --git a/test/SILPasses/copyforward.sil b/test/SILPasses/copyforward.sil index 02187593d0d7d..479db7bd3112f 100644 --- a/test/SILPasses/copyforward.sil +++ b/test/SILPasses/copyforward.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -copy-forwarding -verify -enable-copyforwarding -enable-destroyhoisting | FileCheck %s +// RUN: %target-sil-opt %s -copy-forwarding -verify -enable-copyforwarding -enable-destroyhoisting | FileCheck %s sil_stage canonical @@ -313,4 +313,4 @@ bb0(%0 : $*AnyObject): dealloc_stack %g0#0 : $*@local_storage GeneratorOfOne %p0 = tuple () return %p0 : $() -} \ No newline at end of file +} diff --git a/test/SILPasses/cse.sil b/test/SILPasses/cse.sil index 074868f64a937..d31c25ce31ff7 100644 --- a/test/SILPasses/cse.sil +++ b/test/SILPasses/cse.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -cse -verify | FileCheck %s +// RUN: %target-sil-opt %s -cse -verify | FileCheck %s import Builtin import Swift diff --git a/test/SILPasses/cse_apply.sil b/test/SILPasses/cse_apply.sil index 078b942297fb3..4d93e4a9a0afb 100644 --- a/test/SILPasses/cse_apply.sil +++ b/test/SILPasses/cse_apply.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -cse -verify | FileCheck %s +// RUN: %target-sil-opt %s -cse -verify | FileCheck %s + sil_stage canonical import Builtin diff --git a/test/SILPasses/dead_alloc_elim.sil b/test/SILPasses/dead_alloc_elim.sil index 7c5a454741968..f0ceae0dd81c5 100644 --- a/test/SILPasses/dead_alloc_elim.sil +++ b/test/SILPasses/dead_alloc_elim.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt -deadobject-elim -verify %s | FileCheck %s +// RUN: %target-sil-opt -deadobject-elim -verify %s | FileCheck %s import Swift import Builtin diff --git a/test/SILPasses/dead_code_elimination.sil b/test/SILPasses/dead_code_elimination.sil index d9dd1617431e1..bb17a2cc0d69e 100644 --- a/test/SILPasses/dead_code_elimination.sil +++ b/test/SILPasses/dead_code_elimination.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt -dce -verify %s | FileCheck %s +// RUN: %target-sil-opt -dce -verify %s | FileCheck %s + sil_stage canonical import Builtin diff --git a/test/SILPasses/dead_func.swift b/test/SILPasses/dead_func.swift index 4ae1e83d66b5f..23a2d27617f47 100644 --- a/test/SILPasses/dead_func.swift +++ b/test/SILPasses/dead_func.swift @@ -1,4 +1,5 @@ -// RUN: %swift %s -O -emit-sil +// RUN: %target-swift-frontend %s -O -emit-sil + // Make sure we are not crashing on this one. var a : [String] = ["foo"] diff --git a/test/SILPasses/dead_function_elimination.swift b/test/SILPasses/dead_function_elimination.swift index c27b73bf557a0..1af14449f0409 100644 --- a/test/SILPasses/dead_function_elimination.swift +++ b/test/SILPasses/dead_function_elimination.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -O -emit-sil | FileCheck %s +// RUN: %target-swift-frontend %s -O -emit-sil | FileCheck %s // Check if cycles are removed. diff --git a/test/SILPasses/dead_inlined_func.swift b/test/SILPasses/dead_inlined_func.swift index fc0efac8b2c98..4305e30badbe7 100644 --- a/test/SILPasses/dead_inlined_func.swift +++ b/test/SILPasses/dead_inlined_func.swift @@ -1,6 +1,5 @@ -// RUN: %swift -O -g %s -emit-sil | FileCheck %s -check-prefix=CHECK-SIL -// RUN: %swift -O -g %s -sil-serialize-all -emit-ir | FileCheck %s -check-prefix=CHECK-IR - +// RUN: %target-swift-frontend -O -g %s -emit-sil | FileCheck %s -check-prefix=CHECK-SIL +// RUN: %target-swift-frontend -O -g %s -sil-serialize-all -emit-ir | FileCheck %s -check-prefix=CHECK-IR // The dead inlined function should not be in the SIL // CHECK-SIL-NOT: sil {{.*}}to_be_inlined diff --git a/test/SILPasses/dead_internal_func.swift b/test/SILPasses/dead_internal_func.swift index 5badea10e1f12..fbfe6f9950262 100644 --- a/test/SILPasses/dead_internal_func.swift +++ b/test/SILPasses/dead_internal_func.swift @@ -1,6 +1,5 @@ // RUN: %target-swift-frontend -O -emit-sil %s %S/Inputs/internal_func.swift | FileCheck %s - // Check that an internal function from another file is removed after it gets // dead through inlining. diff --git a/test/SILPasses/dead_method.swift b/test/SILPasses/dead_method.swift index 7b49a6f4c360e..d169498cc5c03 100644 --- a/test/SILPasses/dead_method.swift +++ b/test/SILPasses/dead_method.swift @@ -1,4 +1,4 @@ -// RUN: %swift -O -primary-file %s %S/Inputs/public_class.swift -parse-as-library -emit-sil | FileCheck %s +// RUN: %target-swift-frontend -O -primary-file %s %S/Inputs/public_class.swift -parse-as-library -emit-sil | FileCheck %s private class Derived : Base { override func visible() { diff --git a/test/SILPasses/dead_witness_module.swift b/test/SILPasses/dead_witness_module.swift index 908043b66416b..8e3c03b0cfdb1 100644 --- a/test/SILPasses/dead_witness_module.swift +++ b/test/SILPasses/dead_witness_module.swift @@ -1,6 +1,6 @@ // RUN: rm -rf %t && mkdir %t -// RUN: %swift -Onone -parse-stdlib -parse-as-library -module-name TestModule -sil-serialize-all %S/Inputs/TestModule.swift -emit-module-path %t/TestModule.swiftmodule -// RUN: %swift -O %s -I %t -emit-sil | FileCheck %s +// RUN: %target-swift-frontend -Onone -parse-stdlib -parse-as-library -module-name TestModule -sil-serialize-all %S/Inputs/TestModule.swift -emit-module-path %t/TestModule.swiftmodule +// RUN: %target-swift-frontend -O %s -I %t -emit-sil | FileCheck %s // DeadFunctionElimination may not remove a method from a witness table which // is imported from another module. diff --git a/test/SILPasses/definite_init.sil b/test/SILPasses/definite_init.sil index 5cd655aac4c2d..2dc65ddab4277 100644 --- a/test/SILPasses/definite_init.sil +++ b/test/SILPasses/definite_init.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -definite-init -verify | FileCheck %s +// RUN: %target-sil-opt %s -definite-init -verify | FileCheck %s import Builtin import Swift diff --git a/test/SILPasses/definite_init_crashes.sil b/test/SILPasses/definite_init_crashes.sil index 77d64e0257319..4f71b2eaafd7a 100644 --- a/test/SILPasses/definite_init_crashes.sil +++ b/test/SILPasses/definite_init_crashes.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -definite-init -verify | FileCheck %s +// RUN: %target-sil-opt %s -definite-init -verify | FileCheck %s // These are all regression tests to ensure that the memory promotion pass // doesn't crash. diff --git a/test/SILPasses/definite_init_diagnostics.swift b/test/SILPasses/definite_init_diagnostics.swift index d11d0c649bd23..fb7d1bd46c319 100644 --- a/test/SILPasses/definite_init_diagnostics.swift +++ b/test/SILPasses/definite_init_diagnostics.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-sil -sdk %S/../SILGen/Inputs %s -I %S/../SILGen/Inputs -enable-source-import -parse-stdlib -o /dev/null -verify +// RUN: %target-swift-frontend -emit-sil -sdk %S/../SILGen/Inputs %s -I %S/../SILGen/Inputs -enable-source-import -parse-stdlib -o /dev/null -verify import Swift import gizmo diff --git a/test/SILPasses/definite_init_failable_initializers.swift b/test/SILPasses/definite_init_failable_initializers.swift index 5b16b81ce1311..481571cdea756 100644 --- a/test/SILPasses/definite_init_failable_initializers.swift +++ b/test/SILPasses/definite_init_failable_initializers.swift @@ -1,8 +1,8 @@ +// RUN: %target-swift-frontend -emit-sil -verify %s + // High-level tests that DI accepts and rejects failure from failable // initializers properly. -// RUN: %swift -emit-sil -verify %s - // For value types, we can handle failure at any point, using DI's established // analysis for partial struct and tuple values. diff --git a/test/SILPasses/definite_init_hang.swift b/test/SILPasses/definite_init_hang.swift index b80d1ee3af13d..4ac0604f79e69 100644 --- a/test/SILPasses/definite_init_hang.swift +++ b/test/SILPasses/definite_init_hang.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-sil %s -parse-as-library -o /dev/null -verify +// RUN: %target-swift-frontend -emit-sil %s -parse-as-library -o /dev/null -verify var gg: Bool = false var rg: Int = 0 diff --git a/test/SILPasses/devirt_access.sil b/test/SILPasses/devirt_access.sil index 732a9c9b56710..dbc3ed9fed037 100644 --- a/test/SILPasses/devirt_access.sil +++ b/test/SILPasses/devirt_access.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -inline -devirtualize -verify | FileCheck %s +// RUN: %target-sil-opt %s -inline -devirtualize -verify | FileCheck %s + sil_stage canonical import Builtin diff --git a/test/SILPasses/devirt_access.swift b/test/SILPasses/devirt_access.swift index 8f310c6b9d082..ff7c2f72daab0 100644 --- a/test/SILPasses/devirt_access.swift +++ b/test/SILPasses/devirt_access.swift @@ -1,8 +1,8 @@ // RUN: rm -rf %t && mkdir -p %t -// RUN: %swift -emit-module -Onone -o %t %S/Inputs/devirt_access_other_module.swift +// RUN: %target-swift-frontend -emit-module -Onone -o %t %S/Inputs/devirt_access_other_module.swift -// RUN: %swift -O -primary-file %s %S/Inputs/devirt_access_helper.swift -I %t -emit-sil -enable-private-discriminators -sil-inline-threshold 1000 -sil-verify-all | FileCheck -check-prefix=WHOLE-MODULE %s -// RUN: %swift -O -primary-file %s %S/Inputs/devirt_access_helper.swift -I %t -emit-sil -enable-private-discriminators -sil-inline-threshold 1000 -sil-verify-all | FileCheck -check-prefix=PRIMARY-FILE %s +// RUN: %target-swift-frontend -O -primary-file %s %S/Inputs/devirt_access_helper.swift -I %t -emit-sil -enable-private-discriminators -sil-inline-threshold 1000 -sil-verify-all | FileCheck -check-prefix=WHOLE-MODULE %s +// RUN: %target-swift-frontend -O -primary-file %s %S/Inputs/devirt_access_helper.swift -I %t -emit-sil -enable-private-discriminators -sil-inline-threshold 1000 -sil-verify-all | FileCheck -check-prefix=PRIMARY-FILE %s import devirt_access_other_module diff --git a/test/SILPasses/devirt_archetype_method.swift b/test/SILPasses/devirt_archetype_method.swift index 1289d62e6104a..b0ccd8dba8ca9 100644 --- a/test/SILPasses/devirt_archetype_method.swift +++ b/test/SILPasses/devirt_archetype_method.swift @@ -1,4 +1,5 @@ -// RUN: %swift -O -emit-sil -primary-file %s | FileCheck %s +// RUN: %target-swift-frontend -O -emit-sil -primary-file %s | FileCheck %s + // We can't deserialize apply_inst with subst lists. When radar://14443304 // is fixed then we should convert this test to a SIL test. diff --git a/test/SILPasses/devirt_base_class.swift b/test/SILPasses/devirt_base_class.swift index 68f0c5a07f880..b19cfddbfab11 100644 --- a/test/SILPasses/devirt_base_class.swift +++ b/test/SILPasses/devirt_base_class.swift @@ -1,4 +1,5 @@ -// RUN: %swift -O -emit-sil -disable-func-sig-opts %s | FileCheck %s +// RUN: %target-swift-frontend -O -emit-sil -disable-func-sig-opts %s | FileCheck %s + public class Base1 { @inline(never) func f() -> Int { return 0 } } public class Base2: Base1 { diff --git a/test/SILPasses/devirt_contravariant_args.swift b/test/SILPasses/devirt_contravariant_args.swift index 39b336b5bacc2..70f3202d61159 100644 --- a/test/SILPasses/devirt_contravariant_args.swift +++ b/test/SILPasses/devirt_contravariant_args.swift @@ -1,4 +1,4 @@ -// RUN: %swift -O -primary-file %s -emit-sil -sil-inline-threshold 1000 -sil-verify-all | FileCheck %s +// RUN: %target-swift-frontend -O -primary-file %s -emit-sil -sil-inline-threshold 1000 -sil-verify-all | FileCheck %s // Make sure that we can dig all the way through the class hierarchy and // protocol conformances. diff --git a/test/SILPasses/devirt_covariant_return.swift b/test/SILPasses/devirt_covariant_return.swift index 1d40a574c8c41..c0467b0be5d04 100644 --- a/test/SILPasses/devirt_covariant_return.swift +++ b/test/SILPasses/devirt_covariant_return.swift @@ -1,4 +1,4 @@ -// RUN: %swift -O -primary-file %s -emit-sil -sil-inline-threshold 1000 -sil-verify-all | FileCheck %s +// RUN: %target-swift-frontend -O -primary-file %s -emit-sil -sil-inline-threshold 1000 -sil-verify-all | FileCheck %s // Make sure that we can dig all the way through the class hierarchy and // protocol conformances with covariant return types correctly. The verifier diff --git a/test/SILPasses/devirt_ctors.sil b/test/SILPasses/devirt_ctors.sil index 6685174ccb5f3..4f513d735038f 100644 --- a/test/SILPasses/devirt_ctors.sil +++ b/test/SILPasses/devirt_ctors.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -inline -devirtualize -verify | FileCheck %s +// RUN: %target-sil-opt %s -inline -devirtualize -verify | FileCheck %s + sil_stage canonical import Builtin diff --git a/test/SILPasses/devirt_default_case.swift b/test/SILPasses/devirt_default_case.swift index dba8e1fd9210e..0afa562650cf1 100644 --- a/test/SILPasses/devirt_default_case.swift +++ b/test/SILPasses/devirt_default_case.swift @@ -1,5 +1,4 @@ -// RUN: %swift -O -module-name devirt_default_case -disable-func-sig-opts -emit-sil %s | FileCheck %s - +// RUN: %target-swift-frontend -O -module-name devirt_default_case -disable-func-sig-opts -emit-sil %s | FileCheck %s @asmname("action") func action(n:Int)->() diff --git a/test/SILPasses/devirt_inherited_conformance.swift b/test/SILPasses/devirt_inherited_conformance.swift index c8ac8d5da9d86..723a70b23b70a 100644 --- a/test/SILPasses/devirt_inherited_conformance.swift +++ b/test/SILPasses/devirt_inherited_conformance.swift @@ -1,4 +1,4 @@ -// RUN: %swift -O %s -emit-sil -sil-inline-threshold 1000 | FileCheck %s +// RUN: %target-swift-frontend -O %s -emit-sil -sil-inline-threshold 1000 | FileCheck %s // Make sure that we can dig all the way through the class hierarchy and // protocol conformances. diff --git a/test/SILPasses/devirt_jump_thread.sil b/test/SILPasses/devirt_jump_thread.sil index 11edbc1dded21..61d24e56c8fe9 100644 --- a/test/SILPasses/devirt_jump_thread.sil +++ b/test/SILPasses/devirt_jump_thread.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -simplify-cfg -cse | FileCheck %s +// RUN: %target-sil-opt %s -simplify-cfg -cse | FileCheck %s // Check that jump-threading works for sequences of checked_cast_br instructions produced by the devirtualizer. // This allows for simplifications of code like e.g. f.foo() + f.foo() diff --git a/test/SILPasses/devirt_override.sil b/test/SILPasses/devirt_override.sil index 775341e56d195..69fc97060da40 100644 --- a/test/SILPasses/devirt_override.sil +++ b/test/SILPasses/devirt_override.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -inline -devirtualize -verify | FileCheck %s +// RUN: %target-sil-opt %s -inline -devirtualize -verify | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/devirt_protocol_method_invocations.swift b/test/SILPasses/devirt_protocol_method_invocations.swift index 6ec60361220d6..702058675584b 100644 --- a/test/SILPasses/devirt_protocol_method_invocations.swift +++ b/test/SILPasses/devirt_protocol_method_invocations.swift @@ -1,4 +1,5 @@ -// RUN: %swift -O -emit-sil %s | FileCheck %s +// RUN: %target-swift-frontend -O -emit-sil %s | FileCheck %s + public protocol Foo { func foo(x:Int)->Int } diff --git a/test/SILPasses/devirt_single_module_in_multple_files.swift b/test/SILPasses/devirt_single_module_in_multple_files.swift index 93b3cd9bdf462..a5808f79049fd 100644 --- a/test/SILPasses/devirt_single_module_in_multple_files.swift +++ b/test/SILPasses/devirt_single_module_in_multple_files.swift @@ -1,4 +1,4 @@ -// RUN: %swiftc_driver -module-name devirt_single_module_in_multiple_files -O %s %S/Inputs/BaseProblem.swift %S/Inputs/Problems.swift -parse-as-library -emit-sil 2>&1 | FileCheck %s +// RUN: %target-swiftc_driver -module-name devirt_single_module_in_multiple_files -O %s %S/Inputs/BaseProblem.swift %S/Inputs/Problems.swift -parse-as-library -emit-sil 2>&1 | FileCheck %s public func test() { let e = Evaluator() diff --git a/test/SILPasses/devirt_specialized_conformance.swift b/test/SILPasses/devirt_specialized_conformance.swift index 0749d76c785fe..d6a643b746512 100644 --- a/test/SILPasses/devirt_specialized_conformance.swift +++ b/test/SILPasses/devirt_specialized_conformance.swift @@ -1,4 +1,4 @@ -// RUN: %swift -O %s -emit-sil -sil-verify-all | FileCheck %s +// RUN: %target-swift-frontend -O %s -emit-sil -sil-verify-all | FileCheck %s // Make sure that we completely inline/devirtualize/substitute all the way down // to unknown1. diff --git a/test/SILPasses/devirt_specialized_inherited_interplay.swift b/test/SILPasses/devirt_specialized_inherited_interplay.swift index 22ada0c5b774f..958929d1dabeb 100644 --- a/test/SILPasses/devirt_specialized_inherited_interplay.swift +++ b/test/SILPasses/devirt_specialized_inherited_interplay.swift @@ -1,4 +1,4 @@ -// RUN: %swift -sil-verify-all -O %s -emit-sil | FileCheck %s +// RUN: %target-swift-frontend -sil-verify-all -O %s -emit-sil | FileCheck %s // This file consists of tests for making sure that protocol conformances and // inherited conformances work well together when applied to each other. The diff --git a/test/SILPasses/devirt_type_subst_bug.swift b/test/SILPasses/devirt_type_subst_bug.swift index b4594e3266ccf..74b0204abde50 100644 --- a/test/SILPasses/devirt_type_subst_bug.swift +++ b/test/SILPasses/devirt_type_subst_bug.swift @@ -1,4 +1,5 @@ -// RUN: %swift -emit-sil -O -emit-object %s +// RUN: %target-swift-frontend -emit-sil -O -emit-object %s + // We used to crash on this when trying to devirtualize a call to: // // %168 = witness_method $Array, #SequenceType."~>"!1 : $@cc(witness_method) @thin <Ï„_0_0, Ï„_1_0 where Ï„_0_0 : SequenceType, Ï„_0_0.Generator : GeneratorType> (@out Optional<Ï„_1_0>, @in Ï„_0_0, _PreprocessingPass, @owned @callee_owned (@out Ï„_1_0, @in Ï„_0_0) -> (), @thick Ï„_0_0.Type) -> () diff --git a/test/SILPasses/devirtualize.sil b/test/SILPasses/devirtualize.sil index 0536ee5471aed..49d103f223c56 100644 --- a/test/SILPasses/devirtualize.sil +++ b/test/SILPasses/devirtualize.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -devirtualize -dce -verify | FileCheck %s +// RUN: %target-sil-opt %s -devirtualize -dce -verify | FileCheck %s + sil_stage canonical import Builtin diff --git a/test/SILPasses/devirtualize1.swift b/test/SILPasses/devirtualize1.swift index b1f8daea67c7b..d39374282532d 100644 --- a/test/SILPasses/devirtualize1.swift +++ b/test/SILPasses/devirtualize1.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -O -emit-sil | FileCheck %s +// RUN: %target-swift-frontend %s -O -emit-sil | FileCheck %s class Bar { var m_x : Int diff --git a/test/SILPasses/devirtualize2.sil b/test/SILPasses/devirtualize2.sil index d109d239b55f1..d5adf1ae5888a 100644 --- a/test/SILPasses/devirtualize2.sil +++ b/test/SILPasses/devirtualize2.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -devirtualize -verify | FileCheck %s +// RUN: %target-sil-opt %s -devirtualize -verify | FileCheck %s + sil_stage canonical import Builtin diff --git a/test/SILPasses/devirtualize_cast.swift b/test/SILPasses/devirtualize_cast.swift index 0eccb31c820d7..6bd19704dcdac 100644 --- a/test/SILPasses/devirtualize_cast.swift +++ b/test/SILPasses/devirtualize_cast.swift @@ -1,4 +1,5 @@ -// RUN: %swift %s -O -emit-sil +// RUN: %target-swift-frontend %s -O -emit-sil + // Make sure we are not crashing on this one. class X { func ping() {} } diff --git a/test/SILPasses/devirtualize_existential.swift b/test/SILPasses/devirtualize_existential.swift index 6d7df12dd3f92..07ef3f7273a33 100644 --- a/test/SILPasses/devirtualize_existential.swift +++ b/test/SILPasses/devirtualize_existential.swift @@ -1,4 +1,5 @@ -// RUN: %swift %s -O -emit-sil | not FileCheck %s +// RUN: %target-swift-frontend %s -O -emit-sil | not FileCheck %s + // FIXME: Existential devirtualization needs to be updated to work with // open_existential instructions. rdar://problem/18506660 diff --git a/test/SILPasses/diagnose_unreachable.sil b/test/SILPasses/diagnose_unreachable.sil index e477945097466..fe8da8f9b0d64 100644 --- a/test/SILPasses/diagnose_unreachable.sil +++ b/test/SILPasses/diagnose_unreachable.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -diagnose-unreachable | FileCheck %s +// RUN: %target-sil-opt %s -diagnose-unreachable | FileCheck %s import Builtin import Swift diff --git a/test/SILPasses/diagnostic_constant_propagation.swift b/test/SILPasses/diagnostic_constant_propagation.swift index 7e8a415179aa1..7d255c1efc951 100644 --- a/test/SILPasses/diagnostic_constant_propagation.swift +++ b/test/SILPasses/diagnostic_constant_propagation.swift @@ -1,4 +1,9 @@ -// RUN: %swift -emit-sil -primary-file %s -o /dev/null -verify +// RUN: %target-swift-frontend -emit-sil -primary-file %s -o /dev/null -verify + +// REQUIRES: PTRSIZE=64 + +// FIXME: Extend test/SILPasses/diagnostic_constant_propagation.swift to 32-bit platforms + // These are tests for diagnostics produced by constant propagation pass. func testArithmeticOverflow() { diff --git a/test/SILPasses/enum_jump_thread.sil b/test/SILPasses/enum_jump_thread.sil index d1ec341be8f78..fd0ca228e878e 100644 --- a/test/SILPasses/enum_jump_thread.sil +++ b/test/SILPasses/enum_jump_thread.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -simplify-cfg -cse | FileCheck %s +// RUN: %target-sil-opt %s -simplify-cfg -cse | FileCheck %s // Test if jump-threading is done to combine two enum instructions // into a single block. diff --git a/test/SILPasses/external_defs_to_decls.sil b/test/SILPasses/external_defs_to_decls.sil index 640eea2a3e328..eb1fd63a8db2c 100644 --- a/test/SILPasses/external_defs_to_decls.sil +++ b/test/SILPasses/external_defs_to_decls.sil @@ -1,8 +1,8 @@ -// RUN: %sil-opt -external-defs-to-decls %s | FileCheck %s +// RUN: %target-sil-opt -external-defs-to-decls %s | FileCheck %s // CHECK: sil @no_op : $@thin () -> () sil public_external @no_op : $@thin () -> () { bb0: %9999 = tuple() return %9999 : $() -} \ No newline at end of file +} diff --git a/test/SILPasses/functionsigopts.sil b/test/SILPasses/functionsigopts.sil index 02ca8d996f3bb..fae3f9b082350 100644 --- a/test/SILPasses/functionsigopts.sil +++ b/test/SILPasses/functionsigopts.sil @@ -1,5 +1,5 @@ -// RUN: %sil-opt -function-signature-opts %s | FileCheck %s -// RUN: %sil-opt -function-signature-opts %s | FileCheck -check-prefix=CHECK-NEGATIVE %s +// RUN: %target-sil-opt -function-signature-opts %s | FileCheck %s +// RUN: %target-sil-opt -function-signature-opts %s | FileCheck -check-prefix=CHECK-NEGATIVE %s import Builtin diff --git a/test/SILPasses/functionsigopts_sroa.sil b/test/SILPasses/functionsigopts_sroa.sil index c16259209ab30..6b785a72d5f31 100644 --- a/test/SILPasses/functionsigopts_sroa.sil +++ b/test/SILPasses/functionsigopts_sroa.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt -function-signature-opts -verify %s | FileCheck %s +// RUN: %target-sil-opt -function-signature-opts -verify %s | FileCheck %s import Builtin diff --git a/test/SILPasses/global_arc_opts_layout_compatible_casts.sil b/test/SILPasses/global_arc_opts_layout_compatible_casts.sil index 97c8f0017cdbf..890829bd2f3de 100644 --- a/test/SILPasses/global_arc_opts_layout_compatible_casts.sil +++ b/test/SILPasses/global_arc_opts_layout_compatible_casts.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt -global-arc-opts %s | FileCheck %s +// RUN: %target-sil-opt -global-arc-opts %s | FileCheck %s // This file is separate from the normal ARC optimizer tests to make // it easy to remove when layout compatible types are removed. diff --git a/test/SILPasses/global_arc_opts_loops.sil.gyb b/test/SILPasses/global_arc_opts_loops.sil.gyb index 7dca93de786ce..ac68a3c7fcb27 100644 --- a/test/SILPasses/global_arc_opts_loops.sil.gyb +++ b/test/SILPasses/global_arc_opts_loops.sil.gyb @@ -2,7 +2,7 @@ // RUN: rm -rf %t // RUN: mkdir %t // RUN: %gyb %s > %t/global-arc-opts-loops.sil -// RUN: %sil-opt -global-arc-opts -verify %t/global-arc-opts-loops.sil | FileCheck %t/global-arc-opts-loops.sil +// RUN: %target-sil-opt -global-arc-opts -verify %t/global-arc-opts-loops.sil | FileCheck %t/global-arc-opts-loops.sil %# Ignore the following admonition; it applies to the resulting .sil %# test file only. diff --git a/test/SILPasses/global_arc_unique_check.sil b/test/SILPasses/global_arc_unique_check.sil index 545aa4dbc48aa..41d71dcdcaba9 100644 --- a/test/SILPasses/global_arc_unique_check.sil +++ b/test/SILPasses/global_arc_unique_check.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt -global-arc-opts -verify %s | FileCheck %s +// RUN: %target-sil-opt -global-arc-opts -verify %s | FileCheck %s import Builtin import Swift diff --git a/test/SILPasses/globalarcopts.sil b/test/SILPasses/globalarcopts.sil index 718aa9bd2baf7..a0e0436fff49c 100644 --- a/test/SILPasses/globalarcopts.sil +++ b/test/SILPasses/globalarcopts.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt -global-arc-opts -verify %s | FileCheck %s +// RUN: %target-sil-opt -global-arc-opts -verify %s | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/globalarcopts_rcidentityanalysis.sil b/test/SILPasses/globalarcopts_rcidentityanalysis.sil index 2b5dae4f1db8a..c4050a0135a57 100644 --- a/test/SILPasses/globalarcopts_rcidentityanalysis.sil +++ b/test/SILPasses/globalarcopts_rcidentityanalysis.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt -global-arc-opts -verify %s | FileCheck %s +// RUN: %target-sil-opt -global-arc-opts -verify %s | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/globalloadstoreopts.sil b/test/SILPasses/globalloadstoreopts.sil index 82ab37eb7dcbf..c28a08d61eef2 100644 --- a/test/SILPasses/globalloadstoreopts.sil +++ b/test/SILPasses/globalloadstoreopts.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -module-name Swift -global-load-store-opts -verify | FileCheck %s +// RUN: %target-sil-opt %s -module-name Swift -global-load-store-opts -verify | FileCheck %s import Builtin diff --git a/test/SILPasses/globalloadstoreopts_self_cycle_bug.sil b/test/SILPasses/globalloadstoreopts_self_cycle_bug.sil index e89d2b4c98dcb..61573f933e665 100644 --- a/test/SILPasses/globalloadstoreopts_self_cycle_bug.sil +++ b/test/SILPasses/globalloadstoreopts_self_cycle_bug.sil @@ -1,7 +1,7 @@ // Verifies that we can correctly handle self cycles in control flow. -// RUN: %sil-opt %s -global-load-store-opts -verify | FileCheck %s +// RUN: %target-sil-opt %s -global-load-store-opts -verify | FileCheck %s // Make sure we can move load of end out of loop even though we have store of start inside loop. -// RUN: %sil-opt %s -licm -verify | FileCheck %s --check-prefix=LICM +// RUN: %target-sil-opt %s -licm -verify | FileCheck %s --check-prefix=LICM import Builtin import Swift diff --git a/test/SILPasses/globalopt.sil b/test/SILPasses/globalopt.sil index b13f191e50bb7..eb37a76f5d252 100644 --- a/test/SILPasses/globalopt.sil +++ b/test/SILPasses/globalopt.sil @@ -1,7 +1,8 @@ -// RUN: %sil-opt %s -global-opt | FileCheck %s +// RUN: %target-sil-opt %s -global-opt | FileCheck %s // // ginit.cold has a hammock with an initializer call on the slow path. // ginit.loop has a loop containing an initializer call. + sil_stage canonical diff --git a/test/SILPasses/inline_addressor.swift b/test/SILPasses/inline_addressor.swift index c3d866dbc8b99..0baf4fc9441b4 100644 --- a/test/SILPasses/inline_addressor.swift +++ b/test/SILPasses/inline_addressor.swift @@ -1,4 +1,4 @@ -// RUN: %swift -primary-file %s -parse-as-library -emit-sil -O | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -parse-as-library -emit-sil -O | FileCheck %s var inputval = 27 diff --git a/test/SILPasses/inline_caches.sil b/test/SILPasses/inline_caches.sil index 763539c6e5527..600c2e8f7d778 100644 --- a/test/SILPasses/inline_caches.sil +++ b/test/SILPasses/inline_caches.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -inlinecaches | FileCheck %s +// RUN: %target-sil-opt %s -inlinecaches | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/inline_heuristics.sil b/test/SILPasses/inline_heuristics.sil index 4b20c0621454c..7398f34b3e8be 100644 --- a/test/SILPasses/inline_heuristics.sil +++ b/test/SILPasses/inline_heuristics.sil @@ -1,6 +1,6 @@ // RUN: rm -rf %t && mkdir -p %t -// RUN: %sil-opt %s -inline -debug-only=sil-inliner -sil-inline-test-threshold=1 2>%t/log | FileCheck %s -// RUN: FileCheck -check-prefix=LOG %s <%t/log +// RUN: %target-sil-opt %s -inline -debug-only=sil-inliner -sil-inline-test-threshold=1 2>%t/log | FileCheck %s +// RUN: FileCheck -check-prefix=LOG %s < %t/log // REQUIRES: asserts // This test checks the inline heuristics based on the debug log output of diff --git a/test/SILPasses/inline_recursive.swift b/test/SILPasses/inline_recursive.swift index 8f09adaf290ce..21af93ef79b67 100644 --- a/test/SILPasses/inline_recursive.swift +++ b/test/SILPasses/inline_recursive.swift @@ -1,4 +1,4 @@ -// RUN: %swift -primary-file %s -disable-func-sig-opts -parse-as-library -emit-sil -O | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -disable-func-sig-opts -parse-as-library -emit-sil -O | FileCheck %s private func recFunc(x: Int) -> Int { if x > 0 { diff --git a/test/SILPasses/inline_semantics.sil b/test/SILPasses/inline_semantics.sil index 8c945b63976af..b00a7f3f4c4c0 100644 --- a/test/SILPasses/inline_semantics.sil +++ b/test/SILPasses/inline_semantics.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -early-inline -sil-inline-threshold=50 -verify | FileCheck %s +// RUN: %target-sil-opt %s -early-inline -sil-inline-threshold=50 -verify | FileCheck %s + sil_stage canonical import Builtin diff --git a/test/SILPasses/inlinecaches_arc.sil b/test/SILPasses/inlinecaches_arc.sil index e8c0d382fd451..27164cefe8086 100644 --- a/test/SILPasses/inlinecaches_arc.sil +++ b/test/SILPasses/inlinecaches_arc.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -inlinecaches | FileCheck %s +// RUN: %target-sil-opt %s -inlinecaches | FileCheck %s + sil_stage canonical import Builtin diff --git a/test/SILPasses/inlinecaches_objc.sil b/test/SILPasses/inlinecaches_objc.sil index 175f4cfd3f627..ac62dd88702df 100644 --- a/test/SILPasses/inlinecaches_objc.sil +++ b/test/SILPasses/inlinecaches_objc.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -inlinecaches | FileCheck %s +// RUN: %target-sil-opt %s -inlinecaches | FileCheck %s + sil_stage canonical import Builtin diff --git a/test/SILPasses/inout_deshadow.sil b/test/SILPasses/inout_deshadow.sil index 8f3bde9c0ac98..a1a20b8178e6f 100644 --- a/test/SILPasses/inout_deshadow.sil +++ b/test/SILPasses/inout_deshadow.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -inout-deshadow | FileCheck %s +// RUN: %target-sil-opt %s -inout-deshadow | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/inout_deshadow_integration.swift b/test/SILPasses/inout_deshadow_integration.swift index 3a07918873fe9..df24a57cedaa0 100644 --- a/test/SILPasses/inout_deshadow_integration.swift +++ b/test/SILPasses/inout_deshadow_integration.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -emit-sil | FileCheck %s +// RUN: %target-swift-frontend %s -emit-sil | FileCheck %s // This is an integration check for the inout-deshadow pass, verifying that it // deshadows the inout variables in certain cases. These test should not be diff --git a/test/SILPasses/iv_info_printer.sil b/test/SILPasses/iv_info_printer.sil index b0859c83a242d..36869ca1f42fe 100644 --- a/test/SILPasses/iv_info_printer.sil +++ b/test/SILPasses/iv_info_printer.sil @@ -1,5 +1,7 @@ -// RUN: %sil-opt %s -iv-info-printer 2>&1 | FileCheck %s +// RUN: %target-sil-opt %s -iv-info-printer 2>&1 | FileCheck %s + // REQUIRES: asserts + sil_stage canonical import Builtin diff --git a/test/SILPasses/licm.sil b/test/SILPasses/licm.sil index db704fb95a335..c03ae3752a75f 100644 --- a/test/SILPasses/licm.sil +++ b/test/SILPasses/licm.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -licm -verify | FileCheck %s +// RUN: %target-sil-opt %s -licm -verify | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/linker.swift b/test/SILPasses/linker.swift index e1da0fcbb8241..ab3a2bb52de4e 100644 --- a/test/SILPasses/linker.swift +++ b/test/SILPasses/linker.swift @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module %S/Inputs/linker_pass_input.swift -o %t/Swift.swiftmodule -parse-stdlib -parse-as-library -module-name Swift -sil-serialize-all -module-link-name swiftCore -// RUN: %swift %s -O -I=%t -sil-debug-serialization -o - -emit-sil | FileCheck %s +// RUN: %target-swift-frontend -emit-module %S/Inputs/linker_pass_input.swift -o %t/Swift.swiftmodule -parse-stdlib -parse-as-library -module-name Swift -sil-serialize-all -module-link-name swiftCore +// RUN: %target-swift-frontend %s -O -I %t -sil-debug-serialization -o - -emit-sil | FileCheck %s // CHECK: sil public_external [fragile] @_TFSs11doSomethingFT_T_ : $@thin () -> () { doSomething() diff --git a/test/SILPasses/loop_info_printer.sil b/test/SILPasses/loop_info_printer.sil index c9f59f5101bc9..14421beee6150 100644 --- a/test/SILPasses/loop_info_printer.sil +++ b/test/SILPasses/loop_info_printer.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -loop-info-printer 2>&1 | FileCheck %s +// RUN: %target-sil-opt %s -loop-info-printer 2>&1 | FileCheck %s + // REQUIRES: asserts import Builtin diff --git a/test/SILPasses/looprotate.sil b/test/SILPasses/looprotate.sil index d758b209cc0e4..caa7366b60d3d 100644 --- a/test/SILPasses/looprotate.sil +++ b/test/SILPasses/looprotate.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt -loop-rotate %s | FileCheck %s +// RUN: %target-sil-opt -loop-rotate %s | FileCheck %s sil_stage canonical @@ -298,4 +298,4 @@ bb5: %r3 = tuple () return %r3 : $() -} \ No newline at end of file +} diff --git a/test/SILPasses/loweraggregateinstrs.sil b/test/SILPasses/loweraggregateinstrs.sil index 9f973407d45a7..6b00c1d3c4f77 100644 --- a/test/SILPasses/loweraggregateinstrs.sil +++ b/test/SILPasses/loweraggregateinstrs.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -lower-aggregate-instrs -verify | FileCheck %s +// RUN: %target-sil-opt %s -lower-aggregate-instrs -verify | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/mandatory_inlining.sil b/test/SILPasses/mandatory_inlining.sil index d51178083e9af..2263973ed0a85 100644 --- a/test/SILPasses/mandatory_inlining.sil +++ b/test/SILPasses/mandatory_inlining.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -mandatory-inlining -verify | FileCheck %s +// RUN: %target-sil-opt %s -mandatory-inlining -verify | FileCheck %s import Builtin import Swift diff --git a/test/SILPasses/mandatory_inlining.swift b/test/SILPasses/mandatory_inlining.swift index 573acb422e1cd..41e70f42ff630 100644 --- a/test/SILPasses/mandatory_inlining.swift +++ b/test/SILPasses/mandatory_inlining.swift @@ -1,4 +1,4 @@ -// RUN: %swift -primary-file %s -emit-sil -o - -verify | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-sil -o - -verify | FileCheck %s // These tests are deliberately shallow, because I do not want to depend on the // specifics of SIL generation, which might change for reasons unrelated to this diff --git a/test/SILPasses/mandatory_inlining_circular.sil b/test/SILPasses/mandatory_inlining_circular.sil index bf1b179a6093a..0e17817637c15 100644 --- a/test/SILPasses/mandatory_inlining_circular.sil +++ b/test/SILPasses/mandatory_inlining_circular.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -mandatory-inlining -verify +// RUN: %target-sil-opt %s -mandatory-inlining -verify import Builtin import Swift diff --git a/test/SILPasses/mandatory_inlining_circular.swift b/test/SILPasses/mandatory_inlining_circular.swift index 87c75b134198c..56ad89149a7c3 100644 --- a/test/SILPasses/mandatory_inlining_circular.swift +++ b/test/SILPasses/mandatory_inlining_circular.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-sil %s -o /dev/null -verify +// RUN: %target-swift-frontend -emit-sil %s -o /dev/null -verify @transparent func waldo(x: Double) -> Double { return fred(x); // expected-error {{inlining 'transparent' functions forms circular loop}} expected-note 1 {{while inlining here}} diff --git a/test/SILPasses/mem2reg.sil b/test/SILPasses/mem2reg.sil index d4a090b5abd5d..7108a7383efdb 100644 --- a/test/SILPasses/mem2reg.sil +++ b/test/SILPasses/mem2reg.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -mem2reg -verify | FileCheck %s +// RUN: %target-sil-opt %s -mem2reg -verify | FileCheck %s import Builtin import Swift diff --git a/test/SILPasses/mem2reg_liveness.sil b/test/SILPasses/mem2reg_liveness.sil index 7e378dab01a6b..b9efef5b91f2d 100644 --- a/test/SILPasses/mem2reg_liveness.sil +++ b/test/SILPasses/mem2reg_liveness.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -mem2reg -verify | FileCheck %s +// RUN: %target-sil-opt %s -mem2reg -verify | FileCheck %s import Builtin import Swift diff --git a/test/SILPasses/mem2reg_simple.sil b/test/SILPasses/mem2reg_simple.sil index 262948e0792fa..33c366b30b29b 100644 --- a/test/SILPasses/mem2reg_simple.sil +++ b/test/SILPasses/mem2reg_simple.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -mem2reg -verify | FileCheck %s +// RUN: %target-sil-opt %s -mem2reg -verify | FileCheck %s + sil_stage canonical import Builtin diff --git a/test/SILPasses/mem2reg_unreachable.sil b/test/SILPasses/mem2reg_unreachable.sil index 581053316302e..d2c7e5859fb37 100644 --- a/test/SILPasses/mem2reg_unreachable.sil +++ b/test/SILPasses/mem2reg_unreachable.sil @@ -1,5 +1,7 @@ -// RUN: %sil-opt %s -mem2reg -verify +// RUN: %target-sil-opt %s -mem2reg -verify + // Make sure we are not crashing on blocks that are not dominated by the entry block. + sil_stage canonical import Builtin diff --git a/test/SILPasses/mm_inlinecaches_multiple.sil b/test/SILPasses/mm_inlinecaches_multiple.sil index 5a945c5a3becd..349990a1561ee 100644 --- a/test/SILPasses/mm_inlinecaches_multiple.sil +++ b/test/SILPasses/mm_inlinecaches_multiple.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -inlinecaches | FileCheck %s +// RUN: %target-sil-opt %s -inlinecaches | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/move_cond_fail.sil b/test/SILPasses/move_cond_fail.sil index 2fba4958153d1..eeb4446b74f50 100644 --- a/test/SILPasses/move_cond_fail.sil +++ b/test/SILPasses/move_cond_fail.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -licm -verify | FileCheck %s +// RUN: %target-sil-opt %s -licm -verify | FileCheck %s import Builtin import Swift diff --git a/test/SILPasses/noreturn_folding.sil b/test/SILPasses/noreturn_folding.sil index 94f3630bf2bc2..b87497151314a 100644 --- a/test/SILPasses/noreturn_folding.sil +++ b/test/SILPasses/noreturn_folding.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt -noreturn-folding < %s | FileCheck %s +// RUN: %target-sil-opt -noreturn-folding < %s | FileCheck %s import Builtin diff --git a/test/SILPasses/pa_removal.sil b/test/SILPasses/pa_removal.sil index 033ab2635d9c2..25578ff795dd0 100644 --- a/test/SILPasses/pa_removal.sil +++ b/test/SILPasses/pa_removal.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -sil-combine -verify | FileCheck %s +// RUN: %target-sil-opt %s -sil-combine -verify | FileCheck %s + sil_stage canonical import Builtin diff --git a/test/SILPasses/peephole_thick_to_objc_metatype.sil b/test/SILPasses/peephole_thick_to_objc_metatype.sil index 5d81326d41f57..7e7955ce5dc32 100644 --- a/test/SILPasses/peephole_thick_to_objc_metatype.sil +++ b/test/SILPasses/peephole_thick_to_objc_metatype.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -sil-combine -verify | FileCheck %s +// RUN: %target-sil-opt %s -sil-combine -verify | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/peephole_trunc_and_ext.sil b/test/SILPasses/peephole_trunc_and_ext.sil index 11a3aabd5e55d..6088f536fc013 100644 --- a/test/SILPasses/peephole_trunc_and_ext.sil +++ b/test/SILPasses/peephole_trunc_and_ext.sil @@ -1,4 +1,5 @@ -// RUN: %swift %s -emit-sil -O -o - -verify | FileCheck %s +// RUN: %target-swift-frontend %s -emit-sil -O -o - -verify | FileCheck %s + sil_stage canonical import Builtin diff --git a/test/SILPasses/performance_inliner.sil b/test/SILPasses/performance_inliner.sil index 7b179f3d5d1c9..7225490402656 100644 --- a/test/SILPasses/performance_inliner.sil +++ b/test/SILPasses/performance_inliner.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -inline -sil-inline-threshold=50 -sil-combine -verify | FileCheck %s +// RUN: %target-sil-opt %s -inline -sil-inline-threshold=50 -sil-combine -verify | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/polymorphic_inline_caches.swift b/test/SILPasses/polymorphic_inline_caches.swift index 1dc9e7adff0cf..f694afae92595 100644 --- a/test/SILPasses/polymorphic_inline_caches.swift +++ b/test/SILPasses/polymorphic_inline_caches.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -O -emit-sil +// RUN: %target-swift-frontend %s -O -emit-sil class A { func ping() -> Int { return 1 } diff --git a/test/SILPasses/predictable_memopt.sil b/test/SILPasses/predictable_memopt.sil index d9455e15ca796..0bac4596eea9e 100644 --- a/test/SILPasses/predictable_memopt.sil +++ b/test/SILPasses/predictable_memopt.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -predictable-memopt | FileCheck %s +// RUN: %target-sil-opt %s -predictable-memopt | FileCheck %s import Builtin import Swift diff --git a/test/SILPasses/pure_apply.swift b/test/SILPasses/pure_apply.swift index f7ac59efecc8b..c35107be63bbc 100644 --- a/test/SILPasses/pure_apply.swift +++ b/test/SILPasses/pure_apply.swift @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -sil-combine -verify | FileCheck %s +// RUN: %target-sil-opt %s -sil-combine -verify | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/recursive_func.sil b/test/SILPasses/recursive_func.sil index 8c6fa62ab75cd..f50141043b86f 100644 --- a/test/SILPasses/recursive_func.sil +++ b/test/SILPasses/recursive_func.sil @@ -1,4 +1,4 @@ -// RUN: %swift -O %s -disable-func-sig-opts -emit-sil | FileCheck %s +// RUN: %target-swift-frontend -O %s -disable-func-sig-opts -emit-sil | FileCheck %s // rdar://16761933 // Make sure we can handle recursive function within a class. diff --git a/test/SILPasses/recursive_single.sil b/test/SILPasses/recursive_single.sil index c9a65bbecbf25..b75c08a50999c 100644 --- a/test/SILPasses/recursive_single.sil +++ b/test/SILPasses/recursive_single.sil @@ -1,4 +1,4 @@ -// RUN: %swift -O %s -emit-sil | FileCheck %s +// RUN: %target-swift-frontend -O %s -emit-sil | FileCheck %s // rdar://16761933 // Make sure we can handle recursive function within a class that diff --git a/test/SILPasses/ref_elt_addr.sil b/test/SILPasses/ref_elt_addr.sil index c28ef86558632..8e083c3e43c99 100644 --- a/test/SILPasses/ref_elt_addr.sil +++ b/test/SILPasses/ref_elt_addr.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -cse -verify | FileCheck %s +// RUN: %target-sil-opt %s -cse -verify | FileCheck %s + sil_stage canonical import Builtin diff --git a/test/SILPasses/remove_unused_func.sil b/test/SILPasses/remove_unused_func.sil index b085531e0318e..4d7225c719234 100644 --- a/test/SILPasses/remove_unused_func.sil +++ b/test/SILPasses/remove_unused_func.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -sil-deadfuncelim -verify | FileCheck %s +// RUN: %target-sil-opt %s -sil-deadfuncelim -verify | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/return.swift b/test/SILPasses/return.swift index 8366a39f29f48..59ef19eecc726 100644 --- a/test/SILPasses/return.swift +++ b/test/SILPasses/return.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -emit-sil -verify +// RUN: %target-swift-frontend %s -emit-sil -verify func singleBlock() -> Int { var y = 0 diff --git a/test/SILPasses/select_enum_addr_reads_memory.sil b/test/SILPasses/select_enum_addr_reads_memory.sil index 9ca77ae37eac2..6b9518bcfc339 100644 --- a/test/SILPasses/select_enum_addr_reads_memory.sil +++ b/test/SILPasses/select_enum_addr_reads_memory.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt -loop-rotate %s | FileCheck %s +// RUN: %target-sil-opt -loop-rotate %s | FileCheck %s import Builtin diff --git a/test/SILPasses/sil_combine.sil b/test/SILPasses/sil_combine.sil index e4d554303b2c8..4114c5211daa9 100644 --- a/test/SILPasses/sil_combine.sil +++ b/test/SILPasses/sil_combine.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -sil-combine -verify | FileCheck %s +// RUN: %target-sil-opt %s -sil-combine -verify | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/sil_combine_devirt.sil b/test/SILPasses/sil_combine_devirt.sil index 3d76e790b857f..b8c5753889ac0 100644 --- a/test/SILPasses/sil_combine_devirt.sil +++ b/test/SILPasses/sil_combine_devirt.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -devirtualize -verify | FileCheck %s +// RUN: %target-sil-opt %s -devirtualize -verify | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/sil_combine_enum_addr.sil b/test/SILPasses/sil_combine_enum_addr.sil index af48185844930..20130702261e0 100644 --- a/test/SILPasses/sil_combine_enum_addr.sil +++ b/test/SILPasses/sil_combine_enum_addr.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -sil-combine -simplify-cfg -verify | FileCheck %s +// RUN: %target-sil-opt %s -sil-combine -simplify-cfg -verify | FileCheck %s + sil_stage canonical import Builtin diff --git a/test/SILPasses/sil_combine_enums.sil b/test/SILPasses/sil_combine_enums.sil index 8f94be3d94d58..8d3f33b2476a2 100644 --- a/test/SILPasses/sil_combine_enums.sil +++ b/test/SILPasses/sil_combine_enums.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -sil-combine -verify | FileCheck %s +// RUN: %target-sil-opt %s -sil-combine -verify | FileCheck %s + sil_stage canonical import Builtin diff --git a/test/SILPasses/sil_combine_same_ops.sil b/test/SILPasses/sil_combine_same_ops.sil index a5f6f92f53eaa..fe0e673552f58 100644 --- a/test/SILPasses/sil_combine_same_ops.sil +++ b/test/SILPasses/sil_combine_same_ops.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -sil-combine -verify | FileCheck %s +// RUN: %target-sil-opt %s -sil-combine -verify | FileCheck %s // Test optimization of various builtins which receive the same value in their first and second operand. diff --git a/test/SILPasses/sil_combine_uncheck.sil b/test/SILPasses/sil_combine_uncheck.sil index d7b10a9c80f70..ff7ff3c0d441c 100644 --- a/test/SILPasses/sil_combine_uncheck.sil +++ b/test/SILPasses/sil_combine_uncheck.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -sil-combine -remove-runtime-asserts -verify | FileCheck %s +// RUN: %target-sil-opt %s -sil-combine -remove-runtime-asserts -verify | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/sil_concat_string_literals.sil b/test/SILPasses/sil_concat_string_literals.sil index 893ff6910441e..d0b507512997d 100644 --- a/test/SILPasses/sil_concat_string_literals.sil +++ b/test/SILPasses/sil_concat_string_literals.sil @@ -1,5 +1,6 @@ -// RUN: %sil-opt %s -sil-combine -verify | FileCheck %s -// RUN: %sil-opt %s -diagnostic-constant-propagation -verify | FileCheck %s +// RUN: %target-sil-opt %s -sil-combine -verify | FileCheck %s +// RUN: %target-sil-opt %s -diagnostic-constant-propagation -verify | FileCheck %s + sil_stage canonical import Builtin diff --git a/test/SILPasses/sil_locations.sil b/test/SILPasses/sil_locations.sil index 0a54cc0c87d8a..11de4f929af2e 100644 --- a/test/SILPasses/sil_locations.sil +++ b/test/SILPasses/sil_locations.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt -mandatory-inlining -emit-verbose-sil %s | FileCheck %s +// RUN: %target-sil-opt -mandatory-inlining -emit-verbose-sil %s | FileCheck %s import Builtin import Swift diff --git a/test/SILPasses/sil_locations.swift b/test/SILPasses/sil_locations.swift index 137b954c97fb0..1890862739c64 100644 --- a/test/SILPasses/sil_locations.swift +++ b/test/SILPasses/sil_locations.swift @@ -1,4 +1,4 @@ -// RUN: %swift -primary-file %s -emit-sil -emit-verbose-sil | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -emit-sil -emit-verbose-sil | FileCheck %s func searchForMe(x: Float) -> Float { return x diff --git a/test/SILPasses/sil_simplify_instrs.sil b/test/SILPasses/sil_simplify_instrs.sil index 36f1ab5a3b471..64e0f6c96d2ba 100644 --- a/test/SILPasses/sil_simplify_instrs.sil +++ b/test/SILPasses/sil_simplify_instrs.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -sil-combine -verify | FileCheck %s +// RUN: %target-sil-opt %s -sil-combine -verify | FileCheck %s import Builtin import Swift diff --git a/test/SILPasses/sil_witness_tables_external_witnesstable.swift b/test/SILPasses/sil_witness_tables_external_witnesstable.swift index c25833aed9c4f..926d9b52515e0 100644 --- a/test/SILPasses/sil_witness_tables_external_witnesstable.swift +++ b/test/SILPasses/sil_witness_tables_external_witnesstable.swift @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module %S/Inputs/sil_witness_tables_external_input.swift -o %t/Swift.swiftmodule -parse-stdlib -parse-as-library -module-name Swift -sil-serialize-all -module-link-name swiftCore -// RUN: %swift -O -sil-inline-threshold 0 -I=%t %s -emit-sil | FileCheck %s +// RUN: %target-swift-frontend -emit-module %S/Inputs/sil_witness_tables_external_input.swift -o %t/Swift.swiftmodule -parse-stdlib -parse-as-library -module-name Swift -sil-serialize-all -module-link-name swiftCore +// RUN: %target-swift-frontend -O -sil-inline-threshold 0 -I %t %s -emit-sil | FileCheck %s import Swift diff --git a/test/SILPasses/simp_enum.sil b/test/SILPasses/simp_enum.sil index 5dc08d1e2c8aa..1d3a1b7a92905 100644 --- a/test/SILPasses/simp_enum.sil +++ b/test/SILPasses/simp_enum.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -sil-combine -verify | FileCheck %s +// RUN: %target-sil-opt %s -sil-combine -verify | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/simplify_cfg.sil b/test/SILPasses/simplify_cfg.sil index caada4d92961f..cee3a34fe0cca 100644 --- a/test/SILPasses/simplify_cfg.sil +++ b/test/SILPasses/simplify_cfg.sil @@ -1,6 +1,7 @@ -// RUN: %sil-opt %s -simplify-cfg | FileCheck %s +// RUN: %target-sil-opt %s -simplify-cfg | FileCheck %s // FIXME: Update for select_enum change. -// RUN: %sil-opt %s -simplify-cfg -sil-combine -simplify-cfg | FileCheck %s --check-prefix=CHECK_WITH_COMBINE +// RUN: %target-sil-opt %s -simplify-cfg -sil-combine -simplify-cfg | FileCheck %s --check-prefix=CHECK_WITH_COMBINE + import Builtin import Swift diff --git a/test/SILPasses/simplify_cfg_args.sil b/test/SILPasses/simplify_cfg_args.sil index 9410b81f800be..0be6ccdfd661a 100644 --- a/test/SILPasses/simplify_cfg_args.sil +++ b/test/SILPasses/simplify_cfg_args.sil @@ -1,5 +1,6 @@ -// RUN: %sil-opt %s -simplify-cfg | FileCheck %s -// RUN: %sil-opt %s -codemotion -simplify-cfg | FileCheck %s --check-prefix=CHECK_WITH_CODEMOTION +// RUN: %target-sil-opt %s -simplify-cfg | FileCheck %s +// RUN: %target-sil-opt %s -codemotion -simplify-cfg | FileCheck %s --check-prefix=CHECK_WITH_CODEMOTION + sil_stage raw import Builtin diff --git a/test/SILPasses/spec_archetype_method.swift b/test/SILPasses/spec_archetype_method.swift index 4f7d12a0216b7..32fb3624e97c0 100644 --- a/test/SILPasses/spec_archetype_method.swift +++ b/test/SILPasses/spec_archetype_method.swift @@ -1,4 +1,5 @@ -// RUN: %swift -O -disable-arc-opts -sil-inline-threshold 0 -emit-sil -primary-file %s | FileCheck %s +// RUN: %target-swift-frontend -O -disable-arc-opts -sil-inline-threshold 0 -emit-sil -primary-file %s | FileCheck %s + // We can't deserialize apply_inst with subst lists. When radar://14443304 // is fixed then we should convert this test to a SIL test. diff --git a/test/SILPasses/spec_conf1.swift b/test/SILPasses/spec_conf1.swift index 302a1b1b0c833..0d28b1b5bb9ec 100644 --- a/test/SILPasses/spec_conf1.swift +++ b/test/SILPasses/spec_conf1.swift @@ -1,4 +1,5 @@ -// RUN: %swift -O -disable-arc-opts -sil-inline-threshold 0 -emit-sil -Xllvm -enable-destroyhoisting=false %s | FileCheck %s +// RUN: %target-swift-frontend -O -disable-arc-opts -sil-inline-threshold 0 -emit-sil -Xllvm -enable-destroyhoisting=false %s | FileCheck %s + // We can't deserialize apply_inst with subst lists. When radar://14443304 // is fixed then we should convert this test to a SIL test. diff --git a/test/SILPasses/spec_conf2.swift b/test/SILPasses/spec_conf2.swift index 55652cb2669a2..eed891df760ab 100644 --- a/test/SILPasses/spec_conf2.swift +++ b/test/SILPasses/spec_conf2.swift @@ -1,6 +1,8 @@ -// RUN: %swift -O -disable-arc-opts -sil-inline-threshold 0 -emit-sil -Xllvm -enable-destroyhoisting=false %s | FileCheck %s +// RUN: %target-swift-frontend -O -disable-arc-opts -sil-inline-threshold 0 -emit-sil -Xllvm -enable-destroyhoisting=false %s | FileCheck %s + // We can't deserialize apply_inst with subst lists. When radar://14443304 // is fixed then we should convert this test to a SIL test. + protocol P { func p() } protocol Q { func q() } diff --git a/test/SILPasses/spec_recursion.swift b/test/SILPasses/spec_recursion.swift index 863da81ae6554..90d6c53de37c1 100644 --- a/test/SILPasses/spec_recursion.swift +++ b/test/SILPasses/spec_recursion.swift @@ -1,6 +1,7 @@ -// RUN: %swift -O -disable-func-sig-opts -emit-sil %s | FileCheck %s +// RUN: %target-swift-frontend -O -disable-func-sig-opts -emit-sil %s | FileCheck %s // Make sure we are not looping forever. + extension Array { mutating func new_method(predicate: (T, T) -> Bool, left : Int, right : Int) { diff --git a/test/SILPasses/specialize.sil b/test/SILPasses/specialize.sil index 3a5b8fd5d9bc0..10029350080aa 100644 --- a/test/SILPasses/specialize.sil +++ b/test/SILPasses/specialize.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt -specialize %s | FileCheck %s +// RUN: %target-sil-opt -specialize %s | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/specialize_apply_conf.swift b/test/SILPasses/specialize_apply_conf.swift index ca89f5d1570b0..ba8f3fccd366c 100644 --- a/test/SILPasses/specialize_apply_conf.swift +++ b/test/SILPasses/specialize_apply_conf.swift @@ -1,4 +1,4 @@ -// RUN: %swift -disable-func-sig-opts -O -sil-inline-threshold 1 -emit-sil -primary-file %s | FileCheck %s +// RUN: %target-swift-frontend -disable-func-sig-opts -O -sil-inline-threshold 1 -emit-sil -primary-file %s | FileCheck %s // We can't deserialize apply_inst with subst lists. When radar://14443304 // is fixed then we should convert this test to a SIL test. diff --git a/test/SILPasses/specialize_chain.swift b/test/SILPasses/specialize_chain.swift index e3bce48624fe3..e6e65927455bf 100644 --- a/test/SILPasses/specialize_chain.swift +++ b/test/SILPasses/specialize_chain.swift @@ -1,4 +1,4 @@ -// RUN: %swift -disable-func-sig-opts -O -sil-inline-threshold 0 -emit-sil -primary-file %s | FileCheck %s +// RUN: %target-swift-frontend -disable-func-sig-opts -O -sil-inline-threshold 0 -emit-sil -primary-file %s | FileCheck %s // We can't deserialize apply_inst with subst lists. When radar://14443304 // is fixed then we should convert this test to a SIL test. diff --git a/test/SILPasses/specialize_checked_cast_branch.swift b/test/SILPasses/specialize_checked_cast_branch.swift index af7101780b4fc..4e596cfcf4e3b 100644 --- a/test/SILPasses/specialize_checked_cast_branch.swift +++ b/test/SILPasses/specialize_checked_cast_branch.swift @@ -1,5 +1,6 @@ +// RUN: %target-swift-frontend -disable-func-sig-opts -emit-sil -O -sil-inline-threshold 0 %s -o - | not FileCheck %s + // FIXME: rdar://problem/18603827 -// RUN: %swift -disable-func-sig-opts -emit-sil -O -sil-inline-threshold 0 %s -o - | not FileCheck %s class C {} class D : C {} diff --git a/test/SILPasses/specialize_dont_touch_transparent.swift b/test/SILPasses/specialize_dont_touch_transparent.swift index 71edcf68dad64..c26639b36d857 100644 --- a/test/SILPasses/specialize_dont_touch_transparent.swift +++ b/test/SILPasses/specialize_dont_touch_transparent.swift @@ -1,4 +1,4 @@ -// RUN: %swift -disable-func-sig-opts -O -emit-sil -primary-file %s | FileCheck %s +// RUN: %target-swift-frontend -disable-func-sig-opts -O -emit-sil -primary-file %s | FileCheck %s // CHECK-LABEL: sil hidden [transparent] @_TF33specialize_dont_touch_transparent22transparentDoSomethingFT_VSs4Int8 : $@thin () -> Int8 { // CHECK: bb0: diff --git a/test/SILPasses/specialize_ext.swift b/test/SILPasses/specialize_ext.swift index fc65be8bff533..0363a763bdd67 100644 --- a/test/SILPasses/specialize_ext.swift +++ b/test/SILPasses/specialize_ext.swift @@ -1,4 +1,4 @@ -// RUN: %swift -disable-func-sig-opts -sil-inline-threshold 0 -O -emit-sil -primary-file %s | FileCheck %s +// RUN: %target-swift-frontend -disable-func-sig-opts -sil-inline-threshold 0 -O -emit-sil -primary-file %s | FileCheck %s struct XXX { init(t : T) {m_t = t} diff --git a/test/SILPasses/specialize_inherited.sil b/test/SILPasses/specialize_inherited.sil index fac93eeb3857d..06599648d78e9 100644 --- a/test/SILPasses/specialize_inherited.sil +++ b/test/SILPasses/specialize_inherited.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -specialize -module-name inherit -verify | FileCheck %s +// RUN: %target-sil-opt %s -specialize -module-name inherit -verify | FileCheck %s import Builtin import Swift diff --git a/test/SILPasses/specialize_metatypes_with_nondefault_representation.sil b/test/SILPasses/specialize_metatypes_with_nondefault_representation.sil index ac8a7303788e6..b2e5795e29ae1 100644 --- a/test/SILPasses/specialize_metatypes_with_nondefault_representation.sil +++ b/test/SILPasses/specialize_metatypes_with_nondefault_representation.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -specialize -verify | FileCheck %s +// RUN: %target-sil-opt %s -specialize -verify | FileCheck %s // This test checks that we properly distinguish in between the specialized // functions for the @thick, @thin, and @objc_metatype metatypes. diff --git a/test/SILPasses/specialize_unconditional_checked_cast.swift b/test/SILPasses/specialize_unconditional_checked_cast.swift index a270241f68a43..3dc47dc6936b0 100644 --- a/test/SILPasses/specialize_unconditional_checked_cast.swift +++ b/test/SILPasses/specialize_unconditional_checked_cast.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-sil -o - -O -sil-inline-threshold 0 -disable-func-sig-opts -verify %s | FileCheck %s +// RUN: %target-swift-frontend -emit-sil -o - -O -sil-inline-threshold 0 -disable-func-sig-opts -verify %s | FileCheck %s ////////////////// // Declarations // diff --git a/test/SILPasses/split_critical_edges.sil b/test/SILPasses/split_critical_edges.sil index a12a8da7a3e4b..a0e9877f09c35 100644 --- a/test/SILPasses/split_critical_edges.sil +++ b/test/SILPasses/split_critical_edges.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt %s -split-critical-edges | FileCheck %s +// RUN: %target-sil-opt %s -split-critical-edges | FileCheck %s import Builtin import Swift diff --git a/test/SILPasses/sroa.sil b/test/SILPasses/sroa.sil index a60978825eb77..f9888b21265dc 100644 --- a/test/SILPasses/sroa.sil +++ b/test/SILPasses/sroa.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt -sroa -verify %s | FileCheck %s +// RUN: %target-sil-opt -sroa -verify %s | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/sroa_unreferenced_members.swift b/test/SILPasses/sroa_unreferenced_members.swift index 179252746780f..0f8f3b34a5ded 100644 --- a/test/SILPasses/sroa_unreferenced_members.swift +++ b/test/SILPasses/sroa_unreferenced_members.swift @@ -1,4 +1,4 @@ -// RUN: %swift -target x86_64-apple-macosx10.9 -sdk %S/Inputs -O -emit-sil -I %S/Inputs -enable-source-import -primary-file %s -enable-union-import | FileCheck %s +// RUN: %target-swift-frontend -sdk %S/Inputs -O -emit-sil -I %S/Inputs -enable-source-import -primary-file %s -enable-union-import | FileCheck %s import gizmo diff --git a/test/SILPasses/static_initializer.sil b/test/SILPasses/static_initializer.sil index edc90349405a0..eb607ebf30562 100644 --- a/test/SILPasses/static_initializer.sil +++ b/test/SILPasses/static_initializer.sil @@ -1,4 +1,5 @@ -// RUN: %sil-opt %s -enable-static-init -global-opt | FileCheck %s +// RUN: %target-sil-opt %s -enable-static-init -global-opt | FileCheck %s + import Builtin import Swift diff --git a/test/SILPasses/static_report.sil b/test/SILPasses/static_report.sil index bb1aa502baaea..72969fe6947c6 100644 --- a/test/SILPasses/static_report.sil +++ b/test/SILPasses/static_report.sil @@ -1,4 +1,5 @@ -// RUN: %swift %s -emit-sil -verify +// RUN: %target-swift-frontend %s -emit-sil -verify + import Builtin // test_static_report diff --git a/test/SILPasses/strip_debug_info.sil b/test/SILPasses/strip_debug_info.sil index c7ae0fa402728..8e64716251ba9 100644 --- a/test/SILPasses/strip_debug_info.sil +++ b/test/SILPasses/strip_debug_info.sil @@ -1,4 +1,4 @@ -// RUN: %sil-opt -strip-debug-info %s | FileCheck %s +// RUN: %target-sil-opt -strip-debug-info %s | FileCheck %s sil_stage canonical diff --git a/test/SILPasses/swap_refcnt.swift b/test/SILPasses/swap_refcnt.swift index 47df34ce9e911..e0e9ed8023e4d 100644 --- a/test/SILPasses/swap_refcnt.swift +++ b/test/SILPasses/swap_refcnt.swift @@ -1,4 +1,4 @@ -// RUN: %swift -O -emit-sil %s | FileCheck %s +// RUN: %target-swift-frontend -O -emit-sil %s | FileCheck %s // Make sure we can swap two values in an array without retaining anything. diff --git a/test/SILPasses/switch.swift b/test/SILPasses/switch.swift index 89096d59308cf..f9df795b37431 100644 --- a/test/SILPasses/switch.swift +++ b/test/SILPasses/switch.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-sil %s -verify +// RUN: %target-swift-frontend -emit-sil %s -verify func non_fully_covered_switch(var x: Int) -> Int { switch x { diff --git a/test/SILPasses/unreachable_code.swift b/test/SILPasses/unreachable_code.swift index 4ce4ee4f7ed94..45cae5f1c5ebd 100644 --- a/test/SILPasses/unreachable_code.swift +++ b/test/SILPasses/unreachable_code.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-sil %s -o /dev/null -verify +// RUN: %target-swift-frontend -emit-sil %s -o /dev/null -verify func ifFalse() -> Int { if false { // expected-note {{always evaluates to false}} diff --git a/test/SILPasses/unused_containers.swift b/test/SILPasses/unused_containers.swift index 6dd7f24c2ea35..63d2f22b29055 100644 --- a/test/SILPasses/unused_containers.swift +++ b/test/SILPasses/unused_containers.swift @@ -1,4 +1,4 @@ -// RUN: %swift -primary-file %s -O -emit-sil | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -O -emit-sil | FileCheck %s //CHECK-LABEL: @_TF17unused_containers16empty_array_testFT_T_ //CHECK: bb0: diff --git a/test/Sema/accessibility.swift b/test/Sema/accessibility.swift index 35100b56959ba..893514230003a 100644 --- a/test/Sema/accessibility.swift +++ b/test/Sema/accessibility.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift public protocol PublicProto { func publicReq() diff --git a/test/Sema/accessibility_multi.swift b/test/Sema/accessibility_multi.swift index 63cfbdcd29fa8..059185ccf3647 100644 --- a/test/Sema/accessibility_multi.swift +++ b/test/Sema/accessibility_multi.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -primary-file %s %S/Inputs/accessibility_multi_other.swift -verify -enable-access-control +// RUN: %target-swift-frontend -parse -primary-file %s %S/Inputs/accessibility_multi_other.swift -verify -enable-access-control func reset(inout value: Int) { value = 0 } diff --git a/test/Sema/availability.swift b/test/Sema/availability.swift index aeb5e52896040..017cfb3630dcd 100644 --- a/test/Sema/availability.swift +++ b/test/Sema/availability.swift @@ -1,4 +1,6 @@ -// RUN: %swift -parse %s -target x86_64-apple-macosx10.9 -verify +// RUN: %target-parse-verify-swift + +// REQUIRES: OS=macosx @availability(*, unavailable) func unavailable_foo() {} // expected-note {{'unavailable_foo()' has been explicitly marked unavailable here}} diff --git a/test/Sema/availability_versions.swift b/test/Sema/availability_versions.swift index 3d39722d1cc00..d1afc36c96fcb 100644 --- a/test/Sema/availability_versions.swift +++ b/test/Sema/availability_versions.swift @@ -1,4 +1,6 @@ -// RUN: %swift -parse -enable-experimental-availability-checking -target x86_64-apple-macosx10.9 -verify %s +// RUN: %target-parse-verify-swift -enable-experimental-availability-checking + +// REQUIRES: OS=macosx @availability(OSX, introduced=10.9) var globalAvailableOn10_9: Int = 9 diff --git a/test/Sema/availability_versions_objc_api.swift b/test/Sema/availability_versions_objc_api.swift index 8a49f97631fe2..92cadf80f3bb5 100644 --- a/test/Sema/availability_versions_objc_api.swift +++ b/test/Sema/availability_versions_objc_api.swift @@ -1,4 +1,7 @@ -// RUN: %swift %clang-importer-sdk -parse -verify -I %S/Inputs/custom-modules -enable-experimental-availability-checking -target x86_64-apple-macosx10.9 %s +// RUN: %target-parse-verify-swift %clang-importer-sdk -I %S/Inputs/custom-modules -enable-experimental-availability-checking + +// REQUIRES: OS=macosx +// REQUIRES: objc_interop import Foundation diff --git a/test/Sema/availability_versions_optionals.swift b/test/Sema/availability_versions_optionals.swift index bb19f1cd0c7d1..fefe802386f6f 100644 --- a/test/Sema/availability_versions_optionals.swift +++ b/test/Sema/availability_versions_optionals.swift @@ -1,4 +1,7 @@ -// RUN: %swift -parse -enable-experimental-availability-checking -enable-experimental-unavailable-as-optional -target x86_64-apple-macosx10.9 -verify %s +// RUN: %target-parse-verify-swift -enable-experimental-availability-checking -enable-experimental-unavailable-as-optional + +// REQUIRES: OS=macosx +// REQUIRES: objc_interop @availability(OSX, introduced=10.9) var globalAvailableOn10_9: Int = 9 diff --git a/test/Sema/diag_metatype_cast_to_reference_no_objc.swift b/test/Sema/diag_metatype_cast_to_reference_no_objc.swift index 6ba0699f12e54..a1749c4a239c7 100644 --- a/test/Sema/diag_metatype_cast_to_reference_no_objc.swift +++ b/test/Sema/diag_metatype_cast_to_reference_no_objc.swift @@ -1,5 +1,5 @@ -// RUN: %swift -disable-objc-interop -parse %s -verify +// RUN: %target-swift-frontend -disable-objc-interop -parse %s -verify -func test(c : AnyClass) { - var obj : AnyObject = c // expected-error {{converting a metatype to a reference is only supported with an Objective-C runtime}} +func test(c: AnyClass) { + var obj: AnyObject = c // expected-error {{converting a metatype to a reference is only supported with an Objective-C runtime}} } diff --git a/test/Sema/diag_self_assign.swift b/test/Sema/diag_self_assign.swift index 14da94ba2412e..500626cbf53df 100644 --- a/test/Sema/diag_self_assign.swift +++ b/test/Sema/diag_self_assign.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift var sa1_global: Int sa1_global = sa1_global // expected-error {{assigning a variable to itself}} diff --git a/test/Sema/diag_unreachable_after_return.swift b/test/Sema/diag_unreachable_after_return.swift index c75ee6ffed986..aeb8f4d7d42b1 100644 --- a/test/Sema/diag_unreachable_after_return.swift +++ b/test/Sema/diag_unreachable_after_return.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift // Warn when the indentation is the same. func f_returns_void() {} diff --git a/test/Sema/diag_values_of_module_type.swift b/test/Sema/diag_values_of_module_type.swift index 74840a93876ff..79ec0774f3c05 100644 --- a/test/Sema/diag_values_of_module_type.swift +++ b/test/Sema/diag_values_of_module_type.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify -I=%S/Inputs -enable-source-import +// RUN: %target-parse-verify-swift -I %S/Inputs -enable-source-import import diag_values_of_module_type_foo diff --git a/test/Sema/enum_equatable_hashable.swift b/test/Sema/enum_equatable_hashable.swift index c5e207a13f162..c799a6708bbad 100644 --- a/test/Sema/enum_equatable_hashable.swift +++ b/test/Sema/enum_equatable_hashable.swift @@ -1,6 +1,6 @@ // RUN: rm -rf %t && mkdir -p %t // RUN: cp %s %t/main.swift -// RUN: %swift -parse -verify -primary-file %t/main.swift %S/Inputs/enum_equatable_hashable_other.swift +// RUN: %target-swift-frontend -parse -verify -primary-file %t/main.swift %S/Inputs/enum_equatable_hashable_other.swift enum Foo { case A, B diff --git a/test/Sema/enum_raw_multi.swift b/test/Sema/enum_raw_multi.swift index 22752a0a556c9..6bc2a350e0121 100644 --- a/test/Sema/enum_raw_multi.swift +++ b/test/Sema/enum_raw_multi.swift @@ -1,2 +1,2 @@ -// RUN: %swift -parse -verify %S/Inputs/enum_raw_multi1.swift %S/Inputs/enum_raw_multi2.swift -// RUN: %swift -parse -verify %S/Inputs/enum_raw_multi2.swift %S/Inputs/enum_raw_multi1.swift +// RUN: %target-swift-frontend -parse -verify %S/Inputs/enum_raw_multi1.swift %S/Inputs/enum_raw_multi2.swift +// RUN: %target-swift-frontend -parse -verify %S/Inputs/enum_raw_multi2.swift %S/Inputs/enum_raw_multi1.swift diff --git a/test/Sema/enum_raw_representable.swift b/test/Sema/enum_raw_representable.swift index b6afcb7525a66..e6c7370a4ab9c 100644 --- a/test/Sema/enum_raw_representable.swift +++ b/test/Sema/enum_raw_representable.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift enum Foo : Int { case A, B, C diff --git a/test/Sema/enum_raw_representable_migrate.swift b/test/Sema/enum_raw_representable_migrate.swift index dc57c11e1140a..1f618936e468c 100644 --- a/test/Sema/enum_raw_representable_migrate.swift +++ b/test/Sema/enum_raw_representable_migrate.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Test Fix-Its to migrate fromRaw/toRaw to the failable initializer // and rawValue property, respectively. diff --git a/test/Sema/enum_raw_representable_multi_file.swift b/test/Sema/enum_raw_representable_multi_file.swift index 56dc6b446b54d..a454b58ebd806 100644 --- a/test/Sema/enum_raw_representable_multi_file.swift +++ b/test/Sema/enum_raw_representable_multi_file.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify -primary-file %s %S/Inputs/enum_multi_file_helper.swift +// RUN: %target-swift-frontend -parse -verify -primary-file %s %S/Inputs/enum_multi_file_helper.swift var raw1: Int = Foo.A.rawValue var raw2: Bar.RawValue = 0 diff --git a/test/Sema/extension_binding_multi.swift b/test/Sema/extension_binding_multi.swift index 18ad8fca7865a..4a441345d876c 100644 --- a/test/Sema/extension_binding_multi.swift +++ b/test/Sema/extension_binding_multi.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -primary-file %S/../Inputs/empty.swift %s -verify +// RUN: %target-swift-frontend -parse -primary-file %S/../Inputs/empty.swift %s -verify struct A: CollectionType { struct Index: BidirectionalIndexType {} diff --git a/test/Sema/immutability.swift b/test/Sema/immutability.swift index 4ccea702b3ee5..45623437dbe25 100644 --- a/test/Sema/immutability.swift +++ b/test/Sema/immutability.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift let bad_property_1: Int { // expected-error {{'let' declarations cannot be computed properties}} get { diff --git a/test/Sema/implicit_initializer_multi.swift b/test/Sema/implicit_initializer_multi.swift index ce11d2b107de6..508e5814197d2 100644 --- a/test/Sema/implicit_initializer_multi.swift +++ b/test/Sema/implicit_initializer_multi.swift @@ -1,4 +1,4 @@ -// RUN: %swift -emit-silgen -primary-file %s %S/Inputs/implicit_initializer_multi_other.swift -verify +// RUN: %target-swift-frontend -emit-silgen -primary-file %s %S/Inputs/implicit_initializer_multi_other.swift -verify func test() { let _ = DefaultInitializable() diff --git a/test/Sema/import_and_define_class.swift b/test/Sema/import_and_define_class.swift index d0572b4ba0624..075ad4ea752df 100644 --- a/test/Sema/import_and_define_class.swift +++ b/test/Sema/import_and_define_class.swift @@ -1,3 +1,6 @@ // RUN: %target-swift-frontend -parse %s + +// REQUIRES: objc_interop + import Foundation class C {} diff --git a/test/Sema/infer_block_type.swift b/test/Sema/infer_block_type.swift index 9f93a74172b9f..8f83358370f73 100644 --- a/test/Sema/infer_block_type.swift +++ b/test/Sema/infer_block_type.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -emit-silgen +// RUN: %target-swift-frontend %s -emit-silgen // Passing a var to immediately called Swift closure causes segfault in Xcode 6.1 (6A1042b) diff --git a/test/Sema/objc_attr_requires_module.swift b/test/Sema/objc_attr_requires_module.swift index b261d181b15cb..aa86d10e9d477 100644 --- a/test/Sema/objc_attr_requires_module.swift +++ b/test/Sema/objc_attr_requires_module.swift @@ -1,2 +1,3 @@ -// RUN: %swiftc_driver -parse %s -Xfrontend -verify +// RUN: %target-swiftc_driver -parse %s -Xfrontend -verify + @objc class Foo {} // expected-error {{@objc attribute used without importing module 'Foundation'}} diff --git a/test/Serialization/always_inline.swift b/test/Serialization/always_inline.swift index fb8c118988756..00c8b1eeb24ee 100644 --- a/test/Serialization/always_inline.swift +++ b/test/Serialization/always_inline.swift @@ -1,8 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -sil-serialize-all -o %t %S/Inputs/def_always_inline.swift +// RUN: %target-swift-frontend -emit-module -sil-serialize-all -o %t %S/Inputs/def_always_inline.swift // RUN: llvm-bcanalyzer %t/def_always_inline.swiftmodule | FileCheck %s -// RUN: %swift -emit-silgen -sil-link-all -I=%t %s | FileCheck %s -check-prefix=SIL +// RUN: %target-swift-frontend -emit-silgen -sil-link-all -I %t %s | FileCheck %s -check-prefix=SIL // CHECK-NOT: UnknownCode diff --git a/test/Serialization/array.swift b/test/Serialization/array.swift index b88d9f109e392..b87fb8eaa5115 100644 --- a/test/Serialization/array.swift +++ b/test/Serialization/array.swift @@ -1,8 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -o %t %S/Inputs/has_array.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/has_array.swift // RUN: llvm-bcanalyzer %t/has_array.swiftmodule | FileCheck %s -// RUN: %swift -emit-silgen -I=%t %s -o /dev/null +// RUN: %target-swift-frontend -emit-silgen -I %t %s -o /dev/null // XFAIL: * // CHECK-NOT: UnknownCode diff --git a/test/Serialization/autolinking.swift b/test/Serialization/autolinking.swift index 19844d037f34d..e4b25b6da897b 100644 --- a/test/Serialization/autolinking.swift +++ b/test/Serialization/autolinking.swift @@ -1,26 +1,24 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -target x86_64-apple-macosx10.9 -parse-stdlib -o %t -module-name someModule -module-link-name module %S/../Inputs/empty.swift -// RUN: %swift -emit-ir -lmagic %s -I=%t > %t/out.txt +// 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 -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: mkdir -p %t/someModule.framework/Modules/someModule.swiftmodule/ -// RUN: mv %t/someModule.swiftmodule %t/someModule.framework/Modules/someModule.swiftmodule/x86_64.swiftmodule -// RUN: %swift -emit-ir -target x86_64-apple-macosx10.9 -lmagic %s -F %t > %t/framework.txt +// RUN: mv %t/someModule.swiftmodule %t/someModule.framework/Modules/someModule.swiftmodule/%target-swiftmodule-name +// RUN: %target-swift-frontend -emit-ir -lmagic %s -F %t > %t/framework.txt // RUN: FileCheck -check-prefix=FRAMEWORK %s < %t/framework.txt // RUN: FileCheck -check-prefix=NO-FORCE-LOAD %s < %t/framework.txt -// RUN: %swift -emit-module -parse-stdlib -o %t -module-name someModule -module-link-name module %S/../Inputs/empty.swift -autolink-force-load -// RUN: %swift -emit-ir -lmagic %s -I=%t > %t/force-load.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 -emit-ir -lmagic %s -I %t > %t/force-load.txt // RUN: FileCheck %s < %t/force-load.txt // RUN: FileCheck -check-prefix=FORCE-LOAD-CLIENT %s < %t/force-load.txt -// RUN: %swift -emit-ir -parse-stdlib -module-name someModule -module-link-name module %S/../Inputs/empty.swift | FileCheck --check-prefix=NO-FORCE-LOAD %s -// RUN: %swift -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: %swift -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 - -// REQUIRES: X86 +// RUN: %target-swift-frontend -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 -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 -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 import someModule diff --git a/test/Serialization/autolinking_immediate.swift b/test/Serialization/autolinking_immediate.swift index c912a995b8859..ac91e5d2003cb 100644 --- a/test/Serialization/autolinking_immediate.swift +++ b/test/Serialization/autolinking_immediate.swift @@ -1,7 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -parse-stdlib -o %t -module-name someModule -module-link-name module %S/../Inputs/empty.swift -// RUN: not %swift -interpret -lmagic %s -I=%t 2>&1 | FileCheck %s +// RUN: %target-swift-frontend -emit-module -parse-stdlib -o %t -module-name someModule -module-link-name module %S/../Inputs/empty.swift +// RUN: not %swift -interpret -lmagic %s -I %t 2>&1 | FileCheck %s + // REQUIRES: swift_interpreter import someModule diff --git a/test/Serialization/basic_sil.swift b/test/Serialization/basic_sil.swift index 09db3e93e2486..7ae70e27c57f7 100644 --- a/test/Serialization/basic_sil.swift +++ b/test/Serialization/basic_sil.swift @@ -2,12 +2,12 @@ // RUN: mkdir %t // RUN: %target-build-swift -Xfrontend %clang-importer-sdk -I %S/../Inputs/clang-importer-sdk/swift-modules -emit-module -Xfrontend -disable-diagnostic-passes -Xfrontend -sil-serialize-all -force-single-frontend-invocation -o %t/def_basic.swiftmodule %S/Inputs/def_basic.sil // RUN: llvm-bcanalyzer %t/def_basic.swiftmodule | FileCheck %s -// RUN: %target-build-swift -Xfrontend %clang-importer-sdk -emit-silgen -Xfrontend -sil-link-all -I=%t %s | FileCheck %S/Inputs/def_basic.sil +// RUN: %target-build-swift -Xfrontend %clang-importer-sdk -emit-silgen -Xfrontend -sil-link-all -I %t %s | FileCheck %S/Inputs/def_basic.sil // RUN: rm -rf %t // RUN: mkdir %t // RUN: %target-build-swift -Xfrontend %clang-importer-sdk -emit-module -Xfrontend -disable-diagnostic-passes -force-single-frontend-invocation -Xfrontend -sil-serialize-all -o %t/def_basic.swiftmodule %S/Inputs/def_basic.sil -// RUN: %target-build-swift -Xfrontend %clang-importer-sdk -emit-silgen -Xfrontend -sil-link-all -I=%t %s | FileCheck -check-prefix=CHECK_DECL %S/Inputs/def_basic.sil +// RUN: %target-build-swift -Xfrontend %clang-importer-sdk -emit-silgen -Xfrontend -sil-link-all -I %t %s | FileCheck -check-prefix=CHECK_DECL %S/Inputs/def_basic.sil // CHECK-NOT: UnknownCode diff --git a/test/Serialization/builtin.swift b/test/Serialization/builtin.swift index 12ba8fd4c3403..5393a5e8c6a14 100644 --- a/test/Serialization/builtin.swift +++ b/test/Serialization/builtin.swift @@ -1,8 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -parse-stdlib -o %t %S/Inputs/alias_builtin.swift +// RUN: %target-swift-frontend -emit-module -parse-stdlib -o %t %S/Inputs/alias_builtin.swift // RUN: llvm-bcanalyzer %t/alias_builtin.swiftmodule | FileCheck %s -// RUN: %swift -I=%t -parse %s -verify +// RUN: %target-swift-frontend -I %t -parse %s -verify // CHECK-NOT: UnknownCode diff --git a/test/Serialization/class-roundtrip-module.swift b/test/Serialization/class-roundtrip-module.swift index c68f26df3a724..d6a748462ba0d 100644 --- a/test/Serialization/class-roundtrip-module.swift +++ b/test/Serialization/class-roundtrip-module.swift @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -module-name def_class -o %t/stage1.swiftmodule %S/Inputs/def_class.swift -// RUN: %swift -emit-module -parse-as-library -o %t/def_class.swiftmodule %t/stage1.swiftmodule -// RUN: %swift -emit-sil -sil-debug-serialization -I=%t %S/class.swift | FileCheck %s -check-prefix=SIL +// RUN: %target-swift-frontend -emit-module -module-name def_class -o %t/stage1.swiftmodule %S/Inputs/def_class.swift -disable-objc-attr-requires-foundation-module +// RUN: %target-swift-frontend -emit-module -parse-as-library -o %t/def_class.swiftmodule %t/stage1.swiftmodule +// RUN: %target-swift-frontend -emit-sil -sil-debug-serialization -I %t %S/class.swift | FileCheck %s -check-prefix=SIL // SIL-LABEL: sil public_external [transparent] [fragile] @_TFSsoi1pFTSiSi_Si : $@thin (Int, Int) -> Int { diff --git a/test/Serialization/class.swift b/test/Serialization/class.swift index 143fe207fb2a7..f54edeb98d13a 100644 --- a/test/Serialization/class.swift +++ b/test/Serialization/class.swift @@ -1,9 +1,9 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-object -emit-module -o %t %S/Inputs/def_class.swift +// RUN: %target-swift-frontend -emit-object -emit-module -o %t %S/Inputs/def_class.swift -disable-objc-attr-requires-foundation-module // RUN: llvm-bcanalyzer %t/def_class.swiftmodule | FileCheck %s -// RUN: %swift -emit-sil -sil-debug-serialization -I=%t %s | FileCheck %s -check-prefix=SIL -// RUN: echo "import def_class; struct A : ClassProto {}" | not %swift -parse -I=%t - 2>&1 | FileCheck %s -check-prefix=CHECK-STRUCT +// RUN: %target-swift-frontend -emit-sil -sil-debug-serialization -I %t %s | FileCheck %s -check-prefix=SIL +// RUN: echo "import def_class; struct A : ClassProto {}" | not %target-swift-frontend -parse -I %t - 2>&1 | FileCheck %s -check-prefix=CHECK-STRUCT // CHECK-NOT: UnknownCode // CHECK-STRUCT: non-class type 'A' cannot conform to class protocol 'ClassProto' diff --git a/test/Serialization/comments-framework.swift b/test/Serialization/comments-framework.swift index fbbcfbddb195e..c148abe20fb72 100644 --- a/test/Serialization/comments-framework.swift +++ b/test/Serialization/comments-framework.swift @@ -1,13 +1,11 @@ // RUN: rm -rf %t // RUN: mkdir -p %t/comments.framework/Modules/comments.swiftmodule/ -// RUN: %swift -module-name comments -emit-module -emit-module-path %t/comments.framework/Modules/comments.swiftmodule/x86_64.swiftmodule -emit-module-doc-path %t/comments.framework/Modules/comments.swiftmodule/x86_64.swiftdoc %s -// RUN: %swift-ide-test -print-module-comments -module-to-print=comments -source-filename %s -F %t | FileCheck %s +// RUN: %target-swift-frontend -module-name comments -emit-module -emit-module-path %t/comments.framework/Modules/comments.swiftmodule/%target-swiftmodule-name -emit-module-doc-path %t/comments.framework/Modules/comments.swiftmodule/%target-swiftdoc-name %s +// RUN: %target-swift-ide-test -print-module-comments -module-to-print=comments -source-filename %s -F %t | FileCheck %s // RUN: cp -r %t/comments.framework/Modules/comments.swiftmodule %t/comments.swiftmodule -// RUN: %swift-ide-test -print-module-comments -module-to-print=comments -source-filename %s -I %t | FileCheck %s - -// REQUIRES: OS=macosx +// RUN: %target-swift-ide-test -print-module-comments -module-to-print=comments -source-filename %s -I %t | FileCheck %s /// first_decl_class_1 Aaa. class first_decl_class_1 { diff --git a/test/Serialization/comments.swift b/test/Serialization/comments.swift index 694d7f6954003..658ec39ac39f5 100644 --- a/test/Serialization/comments.swift +++ b/test/Serialization/comments.swift @@ -2,21 +2,21 @@ // // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -module-name comments -emit-module -emit-module-path %t/comments.swiftmodule -emit-module-doc -emit-module-doc-path %t/comments.swiftdoc %s +// RUN: %target-swift-frontend -module-name comments -emit-module -emit-module-path %t/comments.swiftmodule -emit-module-doc -emit-module-doc-path %t/comments.swiftdoc %s // RUN: llvm-bcanalyzer %t/comments.swiftmodule | FileCheck %s -check-prefix=BCANALYZER // RUN: llvm-bcanalyzer %t/comments.swiftdoc | FileCheck %s -check-prefix=BCANALYZER -// RUN: %swift-ide-test -print-module-comments -module-to-print=comments -source-filename %s -I %t | FileCheck %s -check-prefix=FIRST +// RUN: %target-swift-ide-test -print-module-comments -module-to-print=comments -source-filename %s -I %t | FileCheck %s -check-prefix=FIRST // Test the case when we have a multiple files in a module. // // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -module-name comments -emit-module -emit-module-path %t/first.swiftmodule -emit-module-doc -emit-module-doc-path %t/first.swiftdoc -primary-file %s %S/Inputs/def_comments.swift -// RUN: %swift -module-name comments -emit-module -emit-module-path %t/second.swiftmodule -emit-module-doc -emit-module-doc-path %t/second.swiftdoc %s -primary-file %S/Inputs/def_comments.swift -// RUN: %swift -module-name comments -emit-module -emit-module-path %t/comments.swiftmodule -emit-module-doc -emit-module-doc-path %t/comments.swiftdoc %t/first.swiftmodule %t/second.swiftmodule +// RUN: %target-swift-frontend -module-name comments -emit-module -emit-module-path %t/first.swiftmodule -emit-module-doc -emit-module-doc-path %t/first.swiftdoc -primary-file %s %S/Inputs/def_comments.swift +// RUN: %target-swift-frontend -module-name comments -emit-module -emit-module-path %t/second.swiftmodule -emit-module-doc -emit-module-doc-path %t/second.swiftdoc %s -primary-file %S/Inputs/def_comments.swift +// RUN: %target-swift-frontend -module-name comments -emit-module -emit-module-path %t/comments.swiftmodule -emit-module-doc -emit-module-doc-path %t/comments.swiftdoc %t/first.swiftmodule %t/second.swiftmodule // RUN: llvm-bcanalyzer %t/comments.swiftmodule | FileCheck %s -check-prefix=BCANALYZER // RUN: llvm-bcanalyzer %t/comments.swiftdoc | FileCheck %s -check-prefix=BCANALYZER -// RUN: %swift-ide-test -print-module-comments -module-to-print=comments -source-filename %s -I %t > %t.printed.txt +// RUN: %target-swift-ide-test -print-module-comments -module-to-print=comments -source-filename %s -I %t > %t.printed.txt // RUN: FileCheck %s -check-prefix=FIRST < %t.printed.txt // RUN: FileCheck %s -check-prefix=SECOND < %t.printed.txt diff --git a/test/Serialization/default_silfunction_deserializationfrom_stdlib.swift b/test/Serialization/default_silfunction_deserializationfrom_stdlib.swift index c0d7a37b5ed83..6d3fbf89ba0bb 100644 --- a/test/Serialization/default_silfunction_deserializationfrom_stdlib.swift +++ b/test/Serialization/default_silfunction_deserializationfrom_stdlib.swift @@ -1,6 +1,6 @@ // FIXME: depends on brittle stdlib implementation details // XFAIL: * -// RUN: %swift %s -emit-sil -O -o - -sil-debug-serialization | FileCheck %s +// RUN: %target-swift-frontend %s -emit-sil -O -o - -sil-debug-serialization | FileCheck %s // CHECK-DAG: sil public_external [transparent] @_TFSsoi1pU__FT3lhsGVSs13UnsafeMutablePointerQ__3rhsSi_GS_Q__ : $@thin (UnsafeMutablePointer, Int) -> UnsafeMutablePointer { // CHECK-DAG: sil public_external @_TFVSs13UnsafeMutablePointerCU__fMGS_Q__FT5valueBp_GS_Q__ : $@thin (Builtin.RawPointer, @thin UnsafeMutablePointer.Type) -> UnsafeMutablePointer { diff --git a/test/Serialization/duplicate_normalprotocolconformance.swift b/test/Serialization/duplicate_normalprotocolconformance.swift index 44a2613012058..9fd9a14a49585 100644 --- a/test/Serialization/duplicate_normalprotocolconformance.swift +++ b/test/Serialization/duplicate_normalprotocolconformance.swift @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift %S/Inputs/duplicate_normalprotocolconformance_input.swift -o %t/Swift.swiftmodule -sil-serialize-all -emit-module -parse-stdlib -parse-as-library -module-link-name swiftCore -module-name Swift -// RUN: %swift -c %s -I=%t -sil-link-all -o %t/out +// RUN: %target-swift-frontend %S/Inputs/duplicate_normalprotocolconformance_input.swift -o %t/Swift.swiftmodule -sil-serialize-all -emit-module -parse-stdlib -parse-as-library -module-link-name swiftCore -module-name Swift +// RUN: %target-swift-frontend -c %s -I %t -sil-link-all -o %t/out import Swift diff --git a/test/Serialization/empty.swift b/test/Serialization/empty.swift index d641972244dcf..8892a8ab90dae 100644 --- a/test/Serialization/empty.swift +++ b/test/Serialization/empty.swift @@ -1,6 +1,6 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -parse-stdlib -o %t %s +// RUN: %target-swift-frontend -emit-module -parse-stdlib -o %t %s // RUN: llvm-bcanalyzer -dump %t/empty.swiftmodule > %t/empty.dump.txt // RUN: FileCheck %s < %t/empty.dump.txt // RUN: FileCheck -check-prefix=NEGATIVE %s < %t/empty.dump.txt diff --git a/test/Serialization/function.swift b/test/Serialization/function.swift index 88d4e8a5599db..eacd34ee93ba4 100644 --- a/test/Serialization/function.swift +++ b/test/Serialization/function.swift @@ -1,8 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -o %t %S/Inputs/def_func.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/def_func.swift // RUN: llvm-bcanalyzer %t/def_func.swiftmodule | FileCheck %s -// RUN: %swift -emit-silgen -I=%t %s | FileCheck %s -check-prefix=SIL +// RUN: %target-swift-frontend -emit-silgen -I %t %s | FileCheck %s -check-prefix=SIL // CHECK-NOT: FALL_BACK_TO_TRANSLATION_UNIT // CHECK-NOT: UnknownCode diff --git a/test/Serialization/generic_witness.swift b/test/Serialization/generic_witness.swift index c2f8a0555f86c..341001692728c 100644 --- a/test/Serialization/generic_witness.swift +++ b/test/Serialization/generic_witness.swift @@ -1,8 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -o %t %S/Inputs/has_generic_witness.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/has_generic_witness.swift // RUN: llvm-bcanalyzer %t/has_generic_witness.swiftmodule | FileCheck %s -// RUN: %swift -emit-ir -I=%t %s -o /dev/null +// RUN: %target-swift-frontend -emit-ir -I %t %s -o /dev/null // We have to perform IRGen to actually check that the generic substitutions // are being used. diff --git a/test/Serialization/global_init.swift b/test/Serialization/global_init.swift index e4e68fec9af6d..82b021d0616f0 100644 --- a/test/Serialization/global_init.swift +++ b/test/Serialization/global_init.swift @@ -1,8 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -parse-as-library -sil-serialize-all -o %t %s +// RUN: %target-swift-frontend -emit-module -parse-as-library -sil-serialize-all -o %t %s // RUN: llvm-bcanalyzer %t/global_init.swiftmodule | FileCheck %s -check-prefix=BCANALYZER -// RUN: %sil-opt %t/global_init.swiftmodule | FileCheck %s +// RUN: %target-sil-opt %t/global_init.swiftmodule | FileCheck %s // BCANALYZER-NOT: UnknownCode diff --git a/test/Serialization/import_source.swift b/test/Serialization/import_source.swift index 05cf248097e48..af834aeccc405 100644 --- a/test/Serialization/import_source.swift +++ b/test/Serialization/import_source.swift @@ -1,4 +1,4 @@ -// RUN: not %swift -parse -I=%S/Inputs %s 2>%t.txt +// RUN: not %target-swift-frontend -parse -I %S/Inputs %s 2>%t.txt // RUN: FileCheck %s < %t.txt // RUN: FileCheck %s -check-prefix=NEGATIVE < %t.txt diff --git a/test/Serialization/inherited-conformance.swift b/test/Serialization/inherited-conformance.swift index ec287c58f4a19..12ea397dede6e 100644 --- a/test/Serialization/inherited-conformance.swift +++ b/test/Serialization/inherited-conformance.swift @@ -1,8 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -o %t -module-name Base %S/Inputs/inherited-conformance-base.swift -// RUN: %swift -emit-module -o %t -module-name User -I %t %S/Inputs/inherited-conformance-user.swift -// RUN: %swift -parse -I %t %s +// RUN: %target-swift-frontend -emit-module -o %t -module-name Base %S/Inputs/inherited-conformance-base.swift +// RUN: %target-swift-frontend -emit-module -o %t -module-name User -I %t %S/Inputs/inherited-conformance-user.swift +// RUN: %target-swift-frontend -parse -I %t %s import User diff --git a/test/Serialization/load-invalid.swift b/test/Serialization/load-invalid.swift index fa57df58fd2b9..c1bbe286562d5 100644 --- a/test/Serialization/load-invalid.swift +++ b/test/Serialization/load-invalid.swift @@ -2,16 +2,16 @@ // RUN: mkdir %t // RUN: touch %t/new_module.swiftmodule -// RUN: %swift %s -parse -I=%t -verify -show-diagnostics-after-fatal +// RUN: %target-swift-frontend %s -parse -I %t -verify -show-diagnostics-after-fatal // RUN: echo -n 'a' > %t/new_module.swiftmodule -// RUN: %swift %s -parse -I=%t -verify -show-diagnostics-after-fatal +// RUN: %target-swift-frontend %s -parse -I %t -verify -show-diagnostics-after-fatal // RUN: echo -n 'abcd' > %t/new_module.swiftmodule -// RUN: %swift %s -parse -I=%t -verify -show-diagnostics-after-fatal +// RUN: %target-swift-frontend %s -parse -I %t -verify -show-diagnostics-after-fatal // RUN: echo -n 'abcde' > %t/new_module.swiftmodule -// RUN: %swift %s -parse -I=%t -verify -show-diagnostics-after-fatal +// RUN: %target-swift-frontend %s -parse -I %t -verify -show-diagnostics-after-fatal import new_module // expected-error{{malformed module file}} diff --git a/test/Serialization/load-missing-dependencies.swift b/test/Serialization/load-missing-dependencies.swift index 671cd366881ec..1eb9a0c35bc0b 100644 --- a/test/Serialization/load-missing-dependencies.swift +++ b/test/Serialization/load-missing-dependencies.swift @@ -1,12 +1,12 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -o %t %S/../Inputs/empty.swift -module-name new_module -// RUN: %swift -emit-module -o %t %S/../Inputs/empty.swift -module-name another_new_module -// RUN: %swift -emit-module -o %t %S/Inputs/depends_on_new_module.swift -I=%t -// RUN: %swift %s -parse -I=%t +// RUN: %target-swift-frontend -emit-module -o %t %S/../Inputs/empty.swift -module-name new_module +// RUN: %target-swift-frontend -emit-module -o %t %S/../Inputs/empty.swift -module-name another_new_module +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/depends_on_new_module.swift -I %t +// RUN: %target-swift-frontend %s -parse -I %t // RUN: rm %t/new_module.swiftmodule // RUN: rm %t/another_new_module.swiftmodule -// RUN: %swift %s -parse -I=%t -verify -show-diagnostics-after-fatal +// RUN: %target-swift-frontend %s -parse -I %t -verify -show-diagnostics-after-fatal // This error should happen after we've deleted the dependency module import depends_on_new_module // expected-error{{missing required modules: 'another_new_module', 'new_module'}} diff --git a/test/Serialization/load-missing-dependency.swift b/test/Serialization/load-missing-dependency.swift index f5e37a08c7f17..be4958b8ea8a3 100644 --- a/test/Serialization/load-missing-dependency.swift +++ b/test/Serialization/load-missing-dependency.swift @@ -1,20 +1,20 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -o %t %S/../Inputs/empty.swift -module-name new_module -// RUN: %swift -emit-module -o %t %S/../Inputs/empty.swift -module-name another_new_module -// RUN: %swift -emit-module -o %t %S/Inputs/depends_on_new_module.swift -I=%t -// RUN: %swift %s -parse -I=%t +// RUN: %target-swift-frontend -emit-module -o %t %S/../Inputs/empty.swift -module-name new_module +// RUN: %target-swift-frontend -emit-module -o %t %S/../Inputs/empty.swift -module-name another_new_module +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/depends_on_new_module.swift -I %t +// RUN: %target-swift-frontend %s -parse -I %t // RUN: rm %t/new_module.swiftmodule -// RUN: %swift %s -parse -I=%t -verify -show-diagnostics-after-fatal +// RUN: %target-swift-frontend %s -parse -I %t -verify -show-diagnostics-after-fatal // Attempt to round-trip dependency information through module merging. -// RUN: %swift -emit-module -o %t %S/../Inputs/empty.swift -module-name new_module +// RUN: %target-swift-frontend -emit-module -o %t %S/../Inputs/empty.swift -module-name new_module // RUN: mv %t/depends_on_new_module.swiftmodule %t/depends2.swiftmodule -// RUN: %swift -emit-module -parse-as-library -o %t %t/depends2.swiftmodule -module-name depends_on_new_module -I=%t -// RUN: %swift %s -parse -I=%t +// RUN: %target-swift-frontend -emit-module -parse-as-library -o %t %t/depends2.swiftmodule -module-name depends_on_new_module -I %t +// RUN: %target-swift-frontend %s -parse -I %t // RUN: rm %t/new_module.swiftmodule -// RUN: %swift %s -parse -I=%t -verify -show-diagnostics-after-fatal +// RUN: %target-swift-frontend %s -parse -I %t -verify -show-diagnostics-after-fatal // This error should happen after we've deleted the dependency module import depends_on_new_module // expected-error{{missing required module 'new_module'}} diff --git a/test/Serialization/load-wrong-name.swift b/test/Serialization/load-wrong-name.swift index ab104cca91d41..007a3f6f1e328 100644 --- a/test/Serialization/load-wrong-name.swift +++ b/test/Serialization/load-wrong-name.swift @@ -1,6 +1,6 @@ // RUN: rm -rf %t && mkdir %t -// RUN: %swift -emit-module -o %t %S/Inputs/def_func.swift -module-name new_module -// RUN: not %swift %s -parse -I %t -show-diagnostics-after-fatal 2>&1 | FileCheck %s +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/def_func.swift -module-name new_module +// RUN: not %target-swift-frontend %s -parse -I %t -show-diagnostics-after-fatal 2>&1 | FileCheck %s import swift // CHECK: error: {{cannot load module 'Swift' as 'swift'|no such module 'swift'}} import NEW_MODULE // CHECK: error: {{cannot load module 'new_module' as 'NEW_MODULE'|no such module 'NEW_MODULE'}} diff --git a/test/Serialization/load.swift b/test/Serialization/load.swift index ba9bc0f6648f5..411c37311ae3d 100644 --- a/test/Serialization/load.swift +++ b/test/Serialization/load.swift @@ -1,8 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift %s -parse -verify -show-diagnostics-after-fatal -// RUN: %swift -emit-module -o %t %S/Inputs/def_func.swift -module-name new_module -// RUN: %swift %s -parse -I=%t +// RUN: %target-swift-frontend %s -parse -verify -show-diagnostics-after-fatal +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/def_func.swift -module-name new_module +// RUN: %target-swift-frontend %s -parse -I %t // These errors should happen before we've built the module to import. import new_module // expected-error{{no such module 'new_module'}} diff --git a/test/Serialization/multi-file.swift b/test/Serialization/multi-file.swift index 8b491bc48cc5b..b1ca4e4dea3d2 100644 --- a/test/Serialization/multi-file.swift +++ b/test/Serialization/multi-file.swift @@ -1,14 +1,14 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -module-name Multi -o %t/multi-file.swiftmodule -primary-file %s %S/Inputs/multi-file-2.swift -// RUN: %swift -emit-module -module-name Multi -o %t/multi-file-2.swiftmodule %s -primary-file %S/Inputs/multi-file-2.swift +// RUN: %target-swift-frontend -emit-module -module-name Multi -o %t/multi-file.swiftmodule -primary-file %s %S/Inputs/multi-file-2.swift +// RUN: %target-swift-frontend -emit-module -module-name Multi -o %t/multi-file-2.swiftmodule %s -primary-file %S/Inputs/multi-file-2.swift // RUN: llvm-bcanalyzer %t/multi-file.swiftmodule | FileCheck %s -check-prefix=THIS-FILE // RUN: llvm-bcanalyzer %t/multi-file.swiftmodule | FileCheck %s -check-prefix=THIS-FILE-NEG // RUN: llvm-bcanalyzer %t/multi-file-2.swiftmodule | FileCheck %s -check-prefix=OTHER-FILE // RUN: llvm-bcanalyzer %t/multi-file-2.swiftmodule | FileCheck %s -check-prefix=OTHER-FILE-NEG -// RUN: %swift -emit-module -module-name Multi %t/multi-file.swiftmodule %t/multi-file-2.swiftmodule -o %t +// RUN: %target-swift-frontend -emit-module -module-name Multi %t/multi-file.swiftmodule %t/multi-file-2.swiftmodule -o %t // RUN: llvm-bcanalyzer %t/Multi.swiftmodule | FileCheck %s -check-prefix=THIS-FILE // RUN: llvm-bcanalyzer %t/Multi.swiftmodule | FileCheck %s -check-prefix=OTHER-FILE diff --git a/test/Serialization/noinline.swift b/test/Serialization/noinline.swift index 828a8ffe9eae5..73ff894caed6a 100644 --- a/test/Serialization/noinline.swift +++ b/test/Serialization/noinline.swift @@ -1,8 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -sil-serialize-all -o %t %S/Inputs/def_noinline.swift +// RUN: %target-swift-frontend -emit-module -sil-serialize-all -o %t %S/Inputs/def_noinline.swift // RUN: llvm-bcanalyzer %t/def_noinline.swiftmodule | FileCheck %s -// RUN: %swift -emit-silgen -sil-link-all -I=%t %s | FileCheck %s -check-prefix=SIL +// RUN: %target-swift-frontend -emit-silgen -sil-link-all -I %t %s | FileCheck %s -check-prefix=SIL // CHECK-NOT: UnknownCode diff --git a/test/Serialization/objc.swift b/test/Serialization/objc.swift index a21295b6fe9f5..ff685ae5ef472 100644 --- a/test/Serialization/objc.swift +++ b/test/Serialization/objc.swift @@ -1,8 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -o %t %S/Inputs/def_objc.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/def_objc.swift -disable-objc-attr-requires-foundation-module // RUN: llvm-bcanalyzer %t/def_objc.swiftmodule | FileCheck %s -// RUN: %swift -emit-silgen -I=%t %s -o - | FileCheck %s -check-prefix=SIL +// RUN: %target-swift-frontend -emit-silgen -I %t %s -o - | FileCheck %s -check-prefix=SIL // CHECK-NOT: UnknownCode diff --git a/test/Serialization/objc_method_table.swift b/test/Serialization/objc_method_table.swift index d764a29e16db8..571497b8b6bd8 100644 --- a/test/Serialization/objc_method_table.swift +++ b/test/Serialization/objc_method_table.swift @@ -1,8 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -disable-objc-attr-requires-foundation-module -o %t %S/Inputs/objc_method_decls.swift +// RUN: %target-swift-frontend -emit-module -disable-objc-attr-requires-foundation-module -o %t %S/Inputs/objc_method_decls.swift // RUN: llvm-bcanalyzer %t/objc_method_decls.swiftmodule | FileCheck %s -// RUN: %swift -parse -disable-objc-attr-requires-foundation-module -I=%t %s -verify +// RUN: %target-swift-frontend -parse -disable-objc-attr-requires-foundation-module -I %t %s -verify import objc_method_decls diff --git a/test/Serialization/objc_xref.swift b/test/Serialization/objc_xref.swift index f50f1c306fdcc..dc675991d0f5f 100644 --- a/test/Serialization/objc_xref.swift +++ b/test/Serialization/objc_xref.swift @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift %clang-importer-sdk -emit-module -o %t %S/Inputs/def_objc_xref.swift -// RUN: %swift %clang-importer-sdk -parse -I=%t %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -emit-module -o %t %S/Inputs/def_objc_xref.swift +// RUN: %target-swift-frontend %clang-importer-sdk -parse -I %t %s -verify import def_objc_xref diff --git a/test/Serialization/operator.swift b/test/Serialization/operator.swift index d5b892565c85f..a7e0df2a3999c 100644 --- a/test/Serialization/operator.swift +++ b/test/Serialization/operator.swift @@ -1,9 +1,10 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -o %t %S/Inputs/def_operator.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/def_operator.swift // RUN: llvm-bcanalyzer %t/def_operator.swiftmodule | FileCheck %s -// RUN: %swift -parse -I%t %s -// RUN: %swift -interpret -I=%t -DINTERP %s | FileCheck --check-prefix=OUTPUT %s +// RUN: %target-swift-frontend -parse -I%t %s +// RUN: %target-swift-frontend -interpret -I %t -DINTERP %s | FileCheck --check-prefix=OUTPUT %s + // REQUIRES: swift_interpreter // FIXME: iOS doesn't work because this test needs the interpreter to handle diff --git a/test/Serialization/optimized.swift b/test/Serialization/optimized.swift index 4b29f4c9a670d..b05ab2889709d 100644 --- a/test/Serialization/optimized.swift +++ b/test/Serialization/optimized.swift @@ -1,8 +1,10 @@ -// RUN: rm -rf %t && mkdir -p %t -// RUN: %swift -O -emit-module -o %t %s +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: %target-swift-frontend -O -emit-module -o %t %s // At one point this triggered deserialization of enough of the stdlib to cause // an assertion failure in serialization. + class Rdar17567391 { let data: [Int] = [] } diff --git a/test/Serialization/override.swift b/test/Serialization/override.swift index bd770f8181271..c940b70065492 100644 --- a/test/Serialization/override.swift +++ b/test/Serialization/override.swift @@ -1,9 +1,9 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -o %t %S/Inputs/def_class.swift -// RUN: %swift -emit-module -o %t -I %t %S/Inputs/def_override.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/def_class.swift -disable-objc-attr-requires-foundation-module +// RUN: %target-swift-frontend -emit-module -o %t -I %t %S/Inputs/def_override.swift // RUN: llvm-bcanalyzer %t/def_override.swiftmodule | FileCheck %s -// RUN: %swift -parse -I %t %s -verify +// RUN: %target-swift-frontend -parse -I %t %s -verify // CHECK-NOT: UnknownCode diff --git a/test/Serialization/print.swift b/test/Serialization/print.swift index e2b4837d7cac3..b8c0a1a6bcc2c 100644 --- a/test/Serialization/print.swift +++ b/test/Serialization/print.swift @@ -1,6 +1,7 @@ -// RUN: rm -rf %t && mkdir %t -// RUN: %swift %clang-importer-sdk -emit-module -o %t %s -// RUN: %swift-ide-test -print-module -module-to-print=print -I %t -source-filename=%s %clang-importer-sdk | FileCheck %s +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: %target-swift-frontend %clang-importer-sdk -emit-module -o %t %s +// RUN: %target-swift-ide-test -print-module -module-to-print=print -I %t -source-filename=%s %clang-importer-sdk | FileCheck %s import Foundation diff --git a/test/Serialization/semantics.swift b/test/Serialization/semantics.swift index 74d389c118ea6..bc3162fd9434e 100644 --- a/test/Serialization/semantics.swift +++ b/test/Serialization/semantics.swift @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift %s -emit-module -parse-as-library -o %t -// RUN: %sil-opt %t/semantics.swiftmodule -o - | FileCheck %s +// RUN: %target-swift-frontend %s -emit-module -parse-as-library -o %t +// RUN: %target-sil-opt %t/semantics.swiftmodule -o - | FileCheck %s //CHECK: @semantics("crazy") func foo() @semantics("crazy") func foo() -> Int { return 5} diff --git a/test/Serialization/struct.swift b/test/Serialization/struct.swift index 26fda700bdb24..1e7e07e86065d 100644 --- a/test/Serialization/struct.swift +++ b/test/Serialization/struct.swift @@ -1,8 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -o %t %S/Inputs/def_struct.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/def_struct.swift // RUN: llvm-bcanalyzer %t/def_struct.swiftmodule | FileCheck %s -// RUN: %swift -emit-silgen -I=%t %s -o /dev/null +// RUN: %target-swift-frontend -emit-silgen -I %t %s -o /dev/null // CHECK-NOT: UnknownCode diff --git a/test/Serialization/target-incompatible.swift b/test/Serialization/target-incompatible.swift index a4ccbcdb256ad..2f8e3fbcc8435 100644 --- a/test/Serialization/target-incompatible.swift +++ b/test/Serialization/target-incompatible.swift @@ -1,6 +1,6 @@ // RUN: rm -rf %t && mkdir -p %t -// RUN: not %swift -I %S/Inputs -parse %s -DMIPS 2>&1 | FileCheck -check-prefix=CHECK-MIPS %s -// RUN: not %swift -I %S/Inputs -parse %s -DSOLARIS 2>&1 | FileCheck -check-prefix=CHECK-SOLARIS %s +// RUN: not %target-swift-frontend -I %S/Inputs -parse %s -DMIPS 2>&1 | FileCheck -check-prefix=CHECK-MIPS %s +// RUN: not %target-swift-frontend -I %S/Inputs -parse %s -DSOLARIS 2>&1 | FileCheck -check-prefix=CHECK-SOLARIS %s #if MIPS // CHECK-MIPS: :[[@LINE+1]]:8: error: module file was created for incompatible target mips64-unknown-darwin14: {{.*}}mips.swiftmodule{{$}} diff --git a/test/Serialization/target-too-new.swift b/test/Serialization/target-too-new.swift index 7d7efad86e366..e6396f401fd48 100644 --- a/test/Serialization/target-too-new.swift +++ b/test/Serialization/target-too-new.swift @@ -1,8 +1,10 @@ // RUN: rm -rf %t && mkdir -p %t -// RUN: %swift -target x86_64-apple-macosx10.10 -emit-module -parse-stdlib %S/../Inputs/empty.swift -o %t -// RUN: not %swift -target x86_64-apple-macosx10.9 -I %t -parse %s 2>&1 | FileCheck %s -// RUN: %swift -target x86_64-apple-macosx10.10 -I %t -parse %s -// RUN: %swift -target x86_64-apple-macosx10.10.1 -I %t -parse %s +// RUN: %target-swift-frontend -target x86_64-apple-macosx10.10 -emit-module -parse-stdlib %S/../Inputs/empty.swift -o %t +// RUN: not %target-swift-frontend -target x86_64-apple-macosx10.9 -I %t -parse %s 2>&1 | FileCheck %s +// RUN: %target-swift-frontend -target x86_64-apple-macosx10.10 -I %t -parse %s +// RUN: %target-swift-frontend -target x86_64-apple-macosx10.10.1 -I %t -parse %s + +// REQUIRES: OS=macosx // CHECK: :[[@LINE+1]]:8: error: module file's minimum deployment target is OS X v10.10: {{.*}}empty.swiftmodule{{$}} import empty diff --git a/test/Serialization/too-new.swift b/test/Serialization/too-new.swift index bf89981303492..7ae53a42921a3 100644 --- a/test/Serialization/too-new.swift +++ b/test/Serialization/too-new.swift @@ -1,4 +1,4 @@ -// RUN: not %swift %s -parse -I=%S/Inputs -show-diagnostics-after-fatal 2>&1 | FileCheck %s +// RUN: not %target-swift-frontend %s -parse -I %S/Inputs -show-diagnostics-after-fatal 2>&1 | FileCheck %s // CHECK: :[[@LINE+1]]:8: error: module file was created by a newer version of the compiler: {{.*}}too_new.swiftmodule{{$}} import too_new diff --git a/test/Serialization/transparent-std.swift b/test/Serialization/transparent-std.swift index 35d66a38a5046..44b467a42a3f7 100644 --- a/test/Serialization/transparent-std.swift +++ b/test/Serialization/transparent-std.swift @@ -1,8 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -parse-stdlib -o %t %S/Inputs/def_transparent_std.swift +// RUN: %target-swift-frontend -emit-module -parse-stdlib -o %t %S/Inputs/def_transparent_std.swift // RUN: llvm-bcanalyzer %t/def_transparent_std.swiftmodule | FileCheck %s -// RUN: %swift -emit-sil -sil-debug-serialization -parse-stdlib -I=%t %s | FileCheck %s -check-prefix=SIL +// RUN: %target-swift-frontend -emit-sil -sil-debug-serialization -parse-stdlib -I %t %s | FileCheck %s -check-prefix=SIL // CHECK-NOT: UnknownCode diff --git a/test/Serialization/transparent.swift b/test/Serialization/transparent.swift index cde37f3d049c8..78468d281f2e5 100644 --- a/test/Serialization/transparent.swift +++ b/test/Serialization/transparent.swift @@ -1,8 +1,8 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -sil-serialize-all -o %t %S/Inputs/def_transparent.swift +// RUN: %target-swift-frontend -emit-module -sil-serialize-all -o %t %S/Inputs/def_transparent.swift // RUN: llvm-bcanalyzer %t/def_transparent.swiftmodule | FileCheck %s -// RUN: %swift -emit-silgen -sil-link-all -I=%t %s | FileCheck %s -check-prefix=SIL +// RUN: %target-swift-frontend -emit-silgen -sil-link-all -I %t %s | FileCheck %s -check-prefix=SIL // CHECK-NOT: UnknownCode diff --git a/test/Serialization/union.swift b/test/Serialization/union.swift index cf1fa75b651dd..596bfc19d15af 100644 --- a/test/Serialization/union.swift +++ b/test/Serialization/union.swift @@ -1,9 +1,9 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -o %t %S/Inputs/def_union.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/def_union.swift // RUN: llvm-bcanalyzer %t/def_union.swiftmodule | FileCheck %s -// RUN: %swift -parse -I=%t %s -o /dev/null -// RUN: %swift -emit-sil -I=%t %s -o /dev/null +// RUN: %target-swift-frontend -parse -I %t %s -o /dev/null +// RUN: %target-swift-frontend -emit-sil -I %t %s -o /dev/null // CHECK-NOT: UnknownCode diff --git a/test/Serialization/vtable-function-deserialization.swift b/test/Serialization/vtable-function-deserialization.swift index 1ce7f3d5f4c07..8e98a3fa277b0 100644 --- a/test/Serialization/vtable-function-deserialization.swift +++ b/test/Serialization/vtable-function-deserialization.swift @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -o Swift.swiftmodule -O -sil-inline-threshold 0 -module-name Swift -module-link-name swiftCore -parse-as-library -parse-stdlib -emit-module -sil-serialize-all %S/Inputs/vtable-function-deserialization-input.swift -o %t/Swift.swiftmodule -// RUN: %swift -I=%t %s -emit-sil -o - -O -sil-link-all +// RUN: %target-swift-frontend -emit-module -o Swift.swiftmodule -O -sil-inline-threshold 0 -module-name Swift -module-link-name swiftCore -parse-as-library -parse-stdlib -emit-module -sil-serialize-all %S/Inputs/vtable-function-deserialization-input.swift -o %t/Swift.swiftmodule +// RUN: %target-swift-frontend -I %t %s -emit-sil -o - -O -sil-link-all import Swift diff --git a/test/Serialization/witnesstable-function-deserialization.swift b/test/Serialization/witnesstable-function-deserialization.swift index 9078845087a1d..7c370dc33f454 100644 --- a/test/Serialization/witnesstable-function-deserialization.swift +++ b/test/Serialization/witnesstable-function-deserialization.swift @@ -1,7 +1,7 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -O -module-name Swift -module-link-name swiftCore -parse-as-library -parse-stdlib -emit-module -sil-serialize-all %S/Inputs/witnesstable-function-deserialization-input.swift -o %t/Swift.swiftmodule -sil-devirt-threshold 100 -sil-inline-threshold 10 -// RUN: %swift -I=%t %s -emit-sil -o - -O -sil-link-all +// RUN: %target-swift-frontend -emit-module -O -module-name Swift -module-link-name swiftCore -parse-as-library -parse-stdlib -emit-module -sil-serialize-all %S/Inputs/witnesstable-function-deserialization-input.swift -o %t/Swift.swiftmodule -sil-devirt-threshold 100 -sil-inline-threshold 10 +// RUN: %target-swift-frontend -I %t %s -emit-sil -o - -O -sil-link-all import Swift diff --git a/test/Serialization/xref.swift b/test/Serialization/xref.swift index a03250ab82b63..5955da1eac5fb 100644 --- a/test/Serialization/xref.swift +++ b/test/Serialization/xref.swift @@ -1,11 +1,11 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: %swift -emit-module -o %t %S/Inputs/struct_with_operators.swift -// RUN: %swift -emit-module -o %t %S/Inputs/alias.swift -module-name has_alias -// RUN: %swift -emit-module -o %t %S/Inputs/xref_distraction.swift -// RUN: %swift -emit-module -o %t -I=%t %S/Inputs/has_xref.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/struct_with_operators.swift +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/alias.swift -module-name has_alias +// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/xref_distraction.swift +// RUN: %target-swift-frontend -emit-module -o %t -I %t %S/Inputs/has_xref.swift // RUN: llvm-bcanalyzer %t/has_xref.swiftmodule | FileCheck %s -// RUN: %swift -emit-silgen -I=%t %s > /dev/null +// RUN: %target-swift-frontend -emit-silgen -I %t %s > /dev/null // CHECK-NOT: UnknownCode diff --git a/test/TypeCoercion/constructor_return.swift b/test/TypeCoercion/constructor_return.swift index 5611b13ee2327..08338bef17756 100644 --- a/test/TypeCoercion/constructor_return.swift +++ b/test/TypeCoercion/constructor_return.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift func foo() {} func bar() {} diff --git a/test/TypeCoercion/constructor_return_type.swift b/test/TypeCoercion/constructor_return_type.swift index 597ba408a7fb5..87ba5c2b3e065 100644 --- a/test/TypeCoercion/constructor_return_type.swift +++ b/test/TypeCoercion/constructor_return_type.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift struct S { init(a:Bool) { diff --git a/test/TypeCoercion/integer_literals.swift b/test/TypeCoercion/integer_literals.swift index 0dddd3fbeb246..050aecfb3ffd3 100644 --- a/test/TypeCoercion/integer_literals.swift +++ b/test/TypeCoercion/integer_literals.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift typealias IntegerLiteralType = Int32 diff --git a/test/TypeCoercion/interpolation.swift b/test/TypeCoercion/interpolation.swift index bea068c70f278..882dce5474ab3 100644 --- a/test/TypeCoercion/interpolation.swift +++ b/test/TypeCoercion/interpolation.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift func simple_ret(s: String, i: Int) -> String { return "A string \"\(s)\" and an int \(i)" diff --git a/test/TypeCoercion/overload_member.swift b/test/TypeCoercion/overload_member.swift index 19f6d0931993e..6ee2ba09c9430 100644 --- a/test/TypeCoercion/overload_member.swift +++ b/test/TypeCoercion/overload_member.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift struct X { } struct Y { } diff --git a/test/TypeCoercion/overload_noncall.swift b/test/TypeCoercion/overload_noncall.swift index 052d11598e553..e19732fc5201d 100644 --- a/test/TypeCoercion/overload_noncall.swift +++ b/test/TypeCoercion/overload_noncall.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift struct X { } struct Y { } diff --git a/test/TypeCoercion/overload_parens.swift b/test/TypeCoercion/overload_parens.swift index 626d9358d29e7..137b08a4067ba 100644 --- a/test/TypeCoercion/overload_parens.swift +++ b/test/TypeCoercion/overload_parens.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift func f0(x: Int) -> Int { return 0 } func f0(x: Float) -> Float { return 0.0 } diff --git a/test/TypeCoercion/protocols.swift b/test/TypeCoercion/protocols.swift index a805dda2cc2de..793a1a47ac340 100644 --- a/test/TypeCoercion/protocols.swift +++ b/test/TypeCoercion/protocols.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol MyPrintable { func print() diff --git a/test/TypeCoercion/return_coercion.swift b/test/TypeCoercion/return_coercion.swift index f9d2de6d33301..35589f6e46579 100644 --- a/test/TypeCoercion/return_coercion.swift +++ b/test/TypeCoercion/return_coercion.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift func f1() -> (Int, Int) { return (1, 2) } func f2() -> (Int, Int) { return (1, 2) } diff --git a/test/TypeCoercion/subtyping.swift b/test/TypeCoercion/subtyping.swift index 8e11cb799af62..f409cd234e236 100644 --- a/test/TypeCoercion/subtyping.swift +++ b/test/TypeCoercion/subtyping.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol Printable { func print() diff --git a/test/TypeCoercion/unknowable.swift b/test/TypeCoercion/unknowable.swift index 0199c64e06ac9..2240763847e57 100644 --- a/test/TypeCoercion/unknowable.swift +++ b/test/TypeCoercion/unknowable.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift //===----------------------------------------------------------------------===// // Refer to members of literals diff --git a/test/UpdateCode/fixits-apply.swift b/test/UpdateCode/fixits-apply.swift index 0da1d6bc67fe0..c14805824faa7 100644 --- a/test/UpdateCode/fixits-apply.swift +++ b/test/UpdateCode/fixits-apply.swift @@ -1,4 +1,4 @@ -// RUN: %swift-update %s -o %t.remap -serialize-diagnostics-path %t.dia +// RUN: %swift-update -target %target-triple %s -o %t.remap -serialize-diagnostics-path %t.dia // RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %s.result // RUN: c-index-test -read-diagnostics %t.dia > %t.deserialized_diagnostics.txt 2>&1 // RUN: FileCheck --input-file=%t.deserialized_diagnostics.txt %s diff --git a/test/UpdateCode/fixits-apply.swift.result b/test/UpdateCode/fixits-apply.swift.result index cb9e2be150c20..7a91e394088c1 100644 --- a/test/UpdateCode/fixits-apply.swift.result +++ b/test/UpdateCode/fixits-apply.swift.result @@ -1,4 +1,4 @@ -// RUN: %swift-update %s -o %t.remap -serialize-diagnostics-path %t.dia +// RUN: %swift-update -target %target-triple %s -o %t.remap -serialize-diagnostics-path %t.dia // RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %s.result // RUN: c-index-test -read-diagnostics %t.dia > %t.deserialized_diagnostics.txt 2>&1 // RUN: FileCheck --input-file=%t.deserialized_diagnostics.txt %s diff --git a/test/UpdateCode/unfixed.swift b/test/UpdateCode/unfixed.swift index e704c8835ef07..870b448b14592 100644 --- a/test/UpdateCode/unfixed.swift +++ b/test/UpdateCode/unfixed.swift @@ -1,4 +1,4 @@ -// RUN: not %swift-update %s -o %t.remap -serialize-diagnostics-path %t.dia +// RUN: not %swift-update -target %target-triple %s -o %t.remap -serialize-diagnostics-path %t.dia // RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %s.result // RUN: c-index-test -read-diagnostics %t.dia > %t.deserialized_diagnostics.txt 2>&1 // RUN: FileCheck --input-file=%t.deserialized_diagnostics.txt %s diff --git a/test/UpdateCode/unfixed.swift.result b/test/UpdateCode/unfixed.swift.result index 3e55bc162e219..b5e92eb4a9d30 100644 --- a/test/UpdateCode/unfixed.swift.result +++ b/test/UpdateCode/unfixed.swift.result @@ -1,4 +1,4 @@ -// RUN: not %swift-update %s -o %t.remap -serialize-diagnostics-path %t.dia +// RUN: not %swift-update -target %target-triple %s -o %t.remap -serialize-diagnostics-path %t.dia // RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %s.result // RUN: c-index-test -read-diagnostics %t.dia > %t.deserialized_diagnostics.txt 2>&1 // RUN: FileCheck --input-file=%t.deserialized_diagnostics.txt %s diff --git a/test/attr/accessibility.swift b/test/attr/accessibility.swift index ce1bb6f1539dc..25ab5078fc13e 100644 --- a/test/attr/accessibility.swift +++ b/test/attr/accessibility.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift // CHECK PARSING private // expected-note {{modifier already specified here}} diff --git a/test/attr/accessibility_print.swift b/test/attr/accessibility_print.swift index 4f22675962dde..077c970a50cc2 100644 --- a/test/attr/accessibility_print.swift +++ b/test/attr/accessibility_print.swift @@ -1,7 +1,7 @@ // RUN: rm -rf %t && mkdir -p %t -// RUN: %swift-ide-test -print-ast-typechecked -print-accessibility -source-filename=%s | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-SRC -// RUN: %swift -emit-module-path %t/accessibility_print.swiftmodule %s -// RUN: %swift-ide-test -print-module -print-accessibility -module-to-print=accessibility_print -I %t -source-filename=%s | FileCheck %s +// RUN: %target-swift-ide-test -print-ast-typechecked -print-accessibility -source-filename=%s | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-SRC +// RUN: %target-swift-frontend -emit-module-path %t/accessibility_print.swiftmodule %s +// RUN: %target-swift-ide-test -print-module -print-accessibility -module-to-print=accessibility_print -I %t -source-filename=%s | FileCheck %s // This file uses alphabetic prefixes on its declarations because swift-ide-test // sorts decls in a module before printing them. diff --git a/test/attr/attr_NSApplicationMain.swift b/test/attr/attr_NSApplicationMain.swift index d2d2dca2af2a0..740466bca554f 100644 --- a/test/attr/attr_NSApplicationMain.swift +++ b/test/attr/attr_NSApplicationMain.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -parse-as-library -verify %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -parse-as-library -verify %s import AppKit diff --git a/test/attr/attr_NSApplicationMain_generic.swift b/test/attr/attr_NSApplicationMain_generic.swift index 818c6151284a8..7304494390b77 100644 --- a/test/attr/attr_NSApplicationMain_generic.swift +++ b/test/attr/attr_NSApplicationMain_generic.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -parse-as-library -verify %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -parse-as-library -verify %s import AppKit diff --git a/test/attr/attr_NSApplicationMain_inherited.swift b/test/attr/attr_NSApplicationMain_inherited.swift index d431e171d2f4c..6ca621f914c1c 100644 --- a/test/attr/attr_NSApplicationMain_inherited.swift +++ b/test/attr/attr_NSApplicationMain_inherited.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -parse-as-library -verify %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -parse-as-library -verify %s import AppKit diff --git a/test/attr/attr_NSApplicationMain_multiple.swift b/test/attr/attr_NSApplicationMain_multiple.swift index 16d0b8cac4b19..c2895461985db 100644 --- a/test/attr/attr_NSApplicationMain_multiple.swift +++ b/test/attr/attr_NSApplicationMain_multiple.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -parse-as-library -verify %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -parse-as-library -verify %s import AppKit diff --git a/test/attr/attr_NSApplicationMain_not_NSApplicationDelegate.swift b/test/attr/attr_NSApplicationMain_not_NSApplicationDelegate.swift index 30711837e92a8..13af35fc00102 100644 --- a/test/attr/attr_NSApplicationMain_not_NSApplicationDelegate.swift +++ b/test/attr/attr_NSApplicationMain_not_NSApplicationDelegate.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -parse-as-library -verify %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -parse-as-library -verify %s import AppKit diff --git a/test/attr/attr_NSApplicationMain_with_main/delegate.swift b/test/attr/attr_NSApplicationMain_with_main/delegate.swift index f2df4ea53bf56..0651b17c2c51f 100644 --- a/test/attr/attr_NSApplicationMain_with_main/delegate.swift +++ b/test/attr/attr_NSApplicationMain_with_main/delegate.swift @@ -1,7 +1,7 @@ // This file is a part of the multi-file test driven by 'main.swift'. // NB: No "-verify"--this file should parse successfully on its own. -// RUN: %swift %clang-importer-sdk -parse -parse-as-library %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -parse-as-library %s import AppKit diff --git a/test/attr/attr_NSApplicationMain_with_main/main.swift b/test/attr/attr_NSApplicationMain_with_main/main.swift index a217b67f98903..f0a3e0569ad28 100644 --- a/test/attr/attr_NSApplicationMain_with_main/main.swift +++ b/test/attr/attr_NSApplicationMain_with_main/main.swift @@ -1,4 +1,4 @@ // expected-note{{top-level code defined in this source file}} -// RUN: %swift %clang-importer-sdk -parse -verify %s %S/delegate.swift +// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify %s %S/delegate.swift hi() diff --git a/test/attr/attr_NSManaged.swift b/test/attr/attr_NSManaged.swift index e2b7ea87916f5..122a0901fb45d 100644 --- a/test/attr/attr_NSManaged.swift +++ b/test/attr/attr_NSManaged.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -disable-objc-attr-requires-foundation-module %s -verify +// RUN: %target-parse-verify-swift protocol SwiftProto { } diff --git a/test/attr/attr_UIApplicationMain.swift b/test/attr/attr_UIApplicationMain.swift index 39a03a5e1712c..6f766796509a3 100644 --- a/test/attr/attr_UIApplicationMain.swift +++ b/test/attr/attr_UIApplicationMain.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -parse-as-library -verify %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -parse-as-library -verify %s import UIKit diff --git a/test/attr/attr_UIApplicationMain_generic.swift b/test/attr/attr_UIApplicationMain_generic.swift index a96f8acbcddbb..5ce064b502560 100644 --- a/test/attr/attr_UIApplicationMain_generic.swift +++ b/test/attr/attr_UIApplicationMain_generic.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -parse-as-library -verify %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -parse-as-library -verify %s import UIKit diff --git a/test/attr/attr_UIApplicationMain_inherited.swift b/test/attr/attr_UIApplicationMain_inherited.swift index 5ea0f5b3643fd..467c15f2f2af8 100644 --- a/test/attr/attr_UIApplicationMain_inherited.swift +++ b/test/attr/attr_UIApplicationMain_inherited.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -parse-as-library -verify %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -parse-as-library -verify %s import UIKit diff --git a/test/attr/attr_UIApplicationMain_multiple.swift b/test/attr/attr_UIApplicationMain_multiple.swift index 671d720c2238c..e45c832408e48 100644 --- a/test/attr/attr_UIApplicationMain_multiple.swift +++ b/test/attr/attr_UIApplicationMain_multiple.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -parse-as-library -verify %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -parse-as-library -verify %s import UIKit diff --git a/test/attr/attr_UIApplicationMain_not_UIApplicationDelegate.swift b/test/attr/attr_UIApplicationMain_not_UIApplicationDelegate.swift index be2c6961f225c..b08695015c215 100644 --- a/test/attr/attr_UIApplicationMain_not_UIApplicationDelegate.swift +++ b/test/attr/attr_UIApplicationMain_not_UIApplicationDelegate.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse -parse-as-library -verify %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -parse-as-library -verify %s import UIKit diff --git a/test/attr/attr_UIApplicationMain_with_main/delegate.swift b/test/attr/attr_UIApplicationMain_with_main/delegate.swift index b9a4dd619aa86..6c9c809f96cdc 100644 --- a/test/attr/attr_UIApplicationMain_with_main/delegate.swift +++ b/test/attr/attr_UIApplicationMain_with_main/delegate.swift @@ -1,7 +1,7 @@ // This file is a part of the multi-file test driven by 'main.swift'. // NB: No "-verify"--this file should parse successfully on its own. -// RUN: %swift %clang-importer-sdk -parse -parse-as-library %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -parse-as-library %s import UIKit diff --git a/test/attr/attr_UIApplicationMain_with_main/main.swift b/test/attr/attr_UIApplicationMain_with_main/main.swift index a217b67f98903..f0a3e0569ad28 100644 --- a/test/attr/attr_UIApplicationMain_with_main/main.swift +++ b/test/attr/attr_UIApplicationMain_with_main/main.swift @@ -1,4 +1,4 @@ // expected-note{{top-level code defined in this source file}} -// RUN: %swift %clang-importer-sdk -parse -verify %s %S/delegate.swift +// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify %s %S/delegate.swift hi() diff --git a/test/attr/attr_asmname.swift b/test/attr/attr_asmname.swift index 5466ba960479b..7903e16e9761a 100644 --- a/test/attr/attr_asmname.swift +++ b/test/attr/attr_asmname.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift @asmname("foo") // expected-note {{attribute already specified here}} @asmname("bar") // expected-error {{duplicate attribute}} diff --git a/test/attr/attr_autoclosure.swift b/test/attr/attr_autoclosure.swift index 9e42134bcdd3b..2e4429174ca8c 100644 --- a/test/attr/attr_autoclosure.swift +++ b/test/attr/attr_autoclosure.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Simple case. @autoclosure var fn : () -> Int = 4 diff --git a/test/attr/attr_availability.swift b/test/attr/attr_availability.swift index daa14e4394c7d..365850fe6acf1 100644 --- a/test/attr/attr_availability.swift +++ b/test/attr/attr_availability.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift @availability(*, unavailable) func unavailable_func() {} diff --git a/test/attr/attr_availability_osx.swift b/test/attr/attr_availability_osx.swift index c9050ffd7986b..5fd05642c2bff 100644 --- a/test/attr/attr_availability_osx.swift +++ b/test/attr/attr_availability_osx.swift @@ -1,5 +1,7 @@ // RUN: %swift -parse -target x86_64-apple-macosx10.10 %s -verify +// REQUIRES: OS=macosx + @availability(OSX, introduced=10.5, deprecated=10.8, obsoleted=10.9, message="you don't want to do that anyway") func doSomething() { } diff --git a/test/attr/attr_dynamic.swift b/test/attr/attr_dynamic.swift index a5f11e709e23a..d5691eb258345 100644 --- a/test/attr/attr_dynamic.swift +++ b/test/attr/attr_dynamic.swift @@ -1,5 +1,5 @@ -// RUN: %swift -parse -verify %s -// RUN: %swift-ide-test -print-ast-typechecked -source-filename=%s -print-implicit-attrs +// RUN: %target-parse-verify-swift +// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename=%s -print-implicit-attrs struct NotObjCAble { var c: Foo diff --git a/test/attr/attr_dynamic_infer.swift b/test/attr/attr_dynamic_infer.swift index f477a11e76d61..ad0d54fb193a4 100644 --- a/test/attr/attr_dynamic_infer.swift +++ b/test/attr/attr_dynamic_infer.swift @@ -1,4 +1,4 @@ -// RUN: %swift-ide-test -print-ast-typechecked -source-filename=%s -print-implicit-attrs | FileCheck %s +// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename=%s -print-implicit-attrs | FileCheck %s @objc class Super {} diff --git a/test/attr/attr_final.swift b/test/attr/attr_final.swift index c11d159cd9a6e..a43e9516ffc12 100644 --- a/test/attr/attr_final.swift +++ b/test/attr/attr_final.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class Super { final var i: Int { get { return 5 } } // expected-note{{overridden declaration is here}} diff --git a/test/attr/attr_ibaction.swift b/test/attr/attr_ibaction.swift index 7511c5e64fe9d..7ee2918d44dba 100644 --- a/test/attr/attr_ibaction.swift +++ b/test/attr/attr_ibaction.swift @@ -1,4 +1,4 @@ -// RUN: %target-build-swift -parse %s -Xfrontend -verify +// RUN: %target-parse-verify-swift @IBAction // expected-error {{'IBAction' may only be used on 'func' declarations}} var iboutlet_global: Int diff --git a/test/attr/attr_iboutlet.swift b/test/attr/attr_iboutlet.swift index f348f69c45cd0..5a516ba9fc720 100644 --- a/test/attr/attr_iboutlet.swift +++ b/test/attr/attr_iboutlet.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift @IBOutlet // expected-error {{only instance properties can be declared 'IBOutlet'}} var iboutlet_global: Int diff --git a/test/attr/attr_inout.swift b/test/attr/attr_inout.swift index ccff67cd89a68..25bf71fcc51b0 100644 --- a/test/attr/attr_inout.swift +++ b/test/attr/attr_inout.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift func f(inout x : Int) { } // okay diff --git a/test/attr/attr_noescape.swift b/test/attr/attr_noescape.swift index ae2e3f2a01e68..4469a1da8e3c8 100644 --- a/test/attr/attr_noescape.swift +++ b/test/attr/attr_noescape.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift @noescape var fn : () -> Int = { 4 } // expected-error {{'noescape' may only be used on 'parameter' declarations}} diff --git a/test/attr/attr_noreturn.swift b/test/attr/attr_noreturn.swift index 663cfffd5c91f..0287dcdfd71b5 100644 --- a/test/attr/attr_noreturn.swift +++ b/test/attr/attr_noreturn.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift @noreturn func exit(_: Int) {} diff --git a/test/attr/attr_objc.swift b/test/attr/attr_objc.swift index de74e206cdd1e..faa765db914b0 100644 --- a/test/attr/attr_objc.swift +++ b/test/attr/attr_objc.swift @@ -1,5 +1,5 @@ -// RUN: %swift %s -verify -parse -// RUN: %swift-ide-test -print-ast-typechecked -source-filename %s -target x86_64-apple-macosx10.9 -function-definitions=true -prefer-type-repr=false -print-implicit-attrs=true -explode-pattern-binding-decls=true | FileCheck %s +// RUN: %target-parse-verify-swift +// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -function-definitions=true -prefer-type-repr=false -print-implicit-attrs=true -explode-pattern-binding-decls=true | FileCheck %s class PlainClass {} struct PlainStruct {} diff --git a/test/attr/attr_objc_clang.swift b/test/attr/attr_objc_clang.swift index 4a8c1f2b87c9f..37af1313e4a24 100644 --- a/test/attr/attr_objc_clang.swift +++ b/test/attr/attr_objc_clang.swift @@ -1,5 +1,5 @@ -// RUN: %swift %s -parse -verify -sdk %S/Inputs -I %S/Inputs/custom-modules -// RUN: %swift-ide-test -print-ast-typechecked -source-filename %s -sdk %S/Inputs -I %S/Inputs/custom-modules -function-definitions=true -prefer-type-repr=false -print-implicit-attrs=true -explode-pattern-binding-decls=true | FileCheck %s +// RUN: %target-parse-verify-swift -sdk %S/Inputs -I %S/Inputs/custom-modules +// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -sdk %S/Inputs -I %S/Inputs/custom-modules -function-definitions=true -prefer-type-repr=false -print-implicit-attrs=true -explode-pattern-binding-decls=true | FileCheck %s import AttrObjc_FooClangModule diff --git a/test/attr/attr_objc_foreign.swift b/test/attr/attr_objc_foreign.swift index e243884f0751e..31a8958210aa2 100644 --- a/test/attr/attr_objc_foreign.swift +++ b/test/attr/attr_objc_foreign.swift @@ -1,5 +1,9 @@ -// RUN: %swift %clang-importer-sdk -parse -verify -target x86_64-apple-macosx10.9 %s -// RUN: %swift-ide-test %clang-importer-sdk -print-ast-typechecked -source-filename %s -target x86_64-apple-macosx10.9 -function-definitions=true -prefer-type-repr=false -print-implicit-attrs=true -explode-pattern-binding-decls=true | FileCheck %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse -verify %s +// RUN: %target-swift-ide-test %clang-importer-sdk -print-ast-typechecked -source-filename %s -function-definitions=true -prefer-type-repr=false -print-implicit-attrs=true -explode-pattern-binding-decls=true | FileCheck %s + +#if os(iOS) +import Foundation +#endif import CoreGraphics diff --git a/test/attr/attr_objc_overlays.swift b/test/attr/attr_objc_overlays.swift index 106f768e2e1ec..b18739d457037 100644 --- a/test/attr/attr_objc_overlays.swift +++ b/test/attr/attr_objc_overlays.swift @@ -1,6 +1,6 @@ -// RUN: %swift -parse %s %clang-importer-sdk -verify +// RUN: %target-swift-frontend -parse %s %clang-importer-sdk -verify -import ObjectiveC +import Foundation struct NativeStruct {} diff --git a/test/attr/attr_override.swift b/test/attr/attr_override.swift index b5d937076aa60..f1ddac3219230 100644 --- a/test/attr/attr_override.swift +++ b/test/attr/attr_override.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift @override // expected-error {{'override' can only be specified on class members}} expected-error {{'override' is a declaration modifier, not an attribute}} func virtualAttributeCanNotBeUsedInSource() {} diff --git a/test/attr/attr_required.swift b/test/attr/attr_required.swift index 0d0f6552c997a..113be3a831921 100644 --- a/test/attr/attr_required.swift +++ b/test/attr/attr_required.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // ------------------------------------------------------------------------- // Restrictions on where required can appear diff --git a/test/attr/attr_requires_stored_property_inits.swift b/test/attr/attr_requires_stored_property_inits.swift index 0ec483dfacd54..ec7fbbfb53c02 100644 --- a/test/attr/attr_requires_stored_property_inits.swift +++ b/test/attr/attr_requires_stored_property_inits.swift @@ -1,4 +1,5 @@ -// RUN: %swift -parse %clang-importer-sdk %s -verify +// RUN: %target-swift-frontend -parse %clang-importer-sdk %s -verify + import ObjectiveC // Attribute requires that all stored properties have in-class diff --git a/test/attr/attr_semantics.swift b/test/attr/attr_semantics.swift index fd0c9330af05f..b1c80a5dc087d 100644 --- a/test/attr/attr_semantics.swift +++ b/test/attr/attr_semantics.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift @semantics("foo") // expected-note {{attribute already specified here}} @semantics("bar") // expected-error {{duplicate attribute}} diff --git a/test/attr/attributes.swift b/test/attr/attributes.swift index 1ccb024c7f664..dc5c7effa9a75 100644 --- a/test/attr/attributes.swift +++ b/test/attr/attributes.swift @@ -1,5 +1,4 @@ -// RUN: %swift -parse %s -verify - +// RUN: %target-parse-verify-swift @unknown func f0() {} // expected-error{{unknown attribute 'unknown'}} diff --git a/test/decl/class/circular_inheritance.swift b/test/decl/class/circular_inheritance.swift index 8eb711697bc39..614724b13ecaf 100644 --- a/test/decl/class/circular_inheritance.swift +++ b/test/decl/class/circular_inheritance.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class C : B { } // expected-error{{circular class inheritance 'C' -> 'B' -> 'A' -> 'C'}} class B : A { } // expected-note{{class 'B' declared here}} diff --git a/test/decl/class/classes.swift b/test/decl/class/classes.swift index 81b6d4b4b6913..71d1e639b80ae 100644 --- a/test/decl/class/classes.swift +++ b/test/decl/class/classes.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify -parse-as-library +// RUN: %target-parse-verify-swift -parse-as-library class B : A { override init() { super.init() } diff --git a/test/decl/class/override.swift b/test/decl/class/override.swift index 6d21cf47f996d..0b27a61ac41be 100644 --- a/test/decl/class/override.swift +++ b/test/decl/class/override.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify -parse-as-library +// RUN: %target-parse-verify-swift -parse-as-library class A { func ret_sametype() -> Int { return 0 } diff --git a/test/decl/enumtest.swift b/test/decl/enumtest.swift index ba2229c3afac7..b5bb368088c01 100644 --- a/test/decl/enumtest.swift +++ b/test/decl/enumtest.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift //===----------------------------------------------------------------------===// // Tests for various simple enum constructs diff --git a/test/decl/ext/extensions.swift b/test/decl/ext/extensions.swift index d8b1651dffce4..59dbc24fa6f89 100644 --- a/test/decl/ext/extensions.swift +++ b/test/decl/ext/extensions.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift extension extension_for_invalid_type_1 { // expected-error {{use of undeclared type 'extension_for_invalid_type_1'}} func f() { } diff --git a/test/decl/ext/forward_references.swift b/test/decl/ext/forward_references.swift index 07ac9ef7d6f5b..47f7608f59e2b 100644 --- a/test/decl/ext/forward_references.swift +++ b/test/decl/ext/forward_references.swift @@ -1,5 +1,5 @@ -// RUN: %swift -primary-file %s %S/../../Inputs/forward_extension_reference.swift -target x86_64-apple-macosx10.9 -emit-ir -g -module-name fref -// RUN: %swift %S/../../Inputs/forward_extension_reference.swift -primary-file %s -target x86_64-apple-macosx10.9 -emit-ir -g -module-name fref +// RUN: %target-swift-frontend -primary-file %s %S/../../Inputs/forward_extension_reference.swift -emit-ir -g -module-name fref +// RUN: %target-swift-frontend %S/../../Inputs/forward_extension_reference.swift -primary-file %s -emit-ir -g -module-name fref struct Foo { func foo(t: T) -> T { diff --git a/test/decl/ext/generic.swift b/test/decl/ext/generic.swift index 714314e2d8c58..a4250a8924f69 100644 --- a/test/decl/ext/generic.swift +++ b/test/decl/ext/generic.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -module-name generics %s -verify +// RUN: %target-parse-verify-swift protocol P1 { typealias AssocType } protocol P2 : P1 { } diff --git a/test/decl/ext/generic_restrictions.swift b/test/decl/ext/generic_restrictions.swift index c4676ffa9e95e..e5311b4800504 100644 --- a/test/decl/ext/generic_restrictions.swift +++ b/test/decl/ext/generic_restrictions.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift extension Array { public func foo() { } // expected-error{{extension of generic type 'Array' from a different module cannot provide public declarations}} diff --git a/test/decl/func/arg_rename.swift b/test/decl/func/arg_rename.swift index a57e9a695ea94..c494d37604630 100644 --- a/test/decl/func/arg_rename.swift +++ b/test/decl/func/arg_rename.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Renaming of arguments. func foo(a x: Int, b y: Int) { } diff --git a/test/decl/func/complete_object_init.swift b/test/decl/func/complete_object_init.swift index aab43bc9856c1..e289f9490527e 100644 --- a/test/decl/func/complete_object_init.swift +++ b/test/decl/func/complete_object_init.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // --------------------------------------------------------------------------- // Declaration of complete object initializers and basic semantic checking diff --git a/test/decl/func/constructor.swift b/test/decl/func/constructor.swift index 60223849faafc..a5a7d3c2d9f3e 100644 --- a/test/decl/func/constructor.swift +++ b/test/decl/func/constructor.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // User-written default constructor struct X { diff --git a/test/decl/func/default-values.swift b/test/decl/func/default-values.swift index a3bc2804f64ed..cd293845c26c8 100644 --- a/test/decl/func/default-values.swift +++ b/test/decl/func/default-values.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift var func5 : (fn : (Int,Int) -> ()) -> () diff --git a/test/decl/func/dynamic_self.swift b/test/decl/func/dynamic_self.swift index bbb92a7cb722c..147fc39717b79 100644 --- a/test/decl/func/dynamic_self.swift +++ b/test/decl/func/dynamic_self.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // ---------------------------------------------------------------------------- // DynamicSelf is only allowed on the return type of class and diff --git a/test/decl/func/functions.swift b/test/decl/func/functions.swift index 7a04e646acdb9..71c59d4c0a94d 100644 --- a/test/decl/func/functions.swift +++ b/test/decl/func/functions.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift infix operator ==== {} infix operator <<<< {} diff --git a/test/decl/func/keyword-argument-defaults.swift b/test/decl/func/keyword-argument-defaults.swift index f19321bc5834d..27ce7275cfada 100644 --- a/test/decl/func/keyword-argument-defaults.swift +++ b/test/decl/func/keyword-argument-defaults.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Function arguments are not API by default, so this is okay. func f1(a: Int, b: Int) { } diff --git a/test/decl/func/static_func.swift b/test/decl/func/static_func.swift index dee4a7235d29d..1ecc6e4d0b65d 100644 --- a/test/decl/func/static_func.swift +++ b/test/decl/func/static_func.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift static func gf1() {} // expected-error {{static methods may only be declared on a type}}{{1-7=}} class func gf2() {} // expected-error {{class methods may only be declared on a type}}{{1-6=}} diff --git a/test/decl/func/vararg.swift b/test/decl/func/vararg.swift index 59c451b8b45a5..ac1c4b20e67b3 100644 --- a/test/decl/func/vararg.swift +++ b/test/decl/func/vararg.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift var t1a: (Int...) = (1) // expected-error{{cannot create a variadic tuple}} var t2d: (Double = 0.0) = 1 // expected-error {{default argument not permitted in a tuple type}} diff --git a/test/decl/import/import.swift b/test/decl/import/import.swift index 2ed7b20b9e30a..c9046eafbb5c8 100644 --- a/test/decl/import/import.swift +++ b/test/decl/import/import.swift @@ -1,9 +1,9 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: echo "public struct X {}; public var x = X()" | %swift -module-name import_builtin -parse-stdlib -emit-module -o %t - +// RUN: echo "public struct X {}; public var x = X()" | %target-swift-frontend -module-name import_builtin -parse-stdlib -emit-module -o %t - // RUN: echo "public func foo() -> Int { return false }" > %t/import_text.swift // RUN: echo "public func pho$(printf '\xC3\xBB')x() -> Int { return false }" > %t/fran$(printf '\xC3\xA7')ais.swift -// RUN: %swift -parse %s -I=%t -sdk "" -enable-source-import -verify -show-diagnostics-after-fatal +// RUN: %target-swift-frontend -parse %s -I %t -sdk "" -enable-source-import -verify -show-diagnostics-after-fatal import Builtin // expected-error {{no such module 'Builtin'}} diff --git a/test/decl/inherit/inherit.swift b/test/decl/inherit/inherit.swift index 0939f10c5cdbf..3f3e9a19c8757 100644 --- a/test/decl/inherit/inherit.swift +++ b/test/decl/inherit/inherit.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class A { } protocol P { } diff --git a/test/decl/inherit/initializer.swift b/test/decl/inherit/initializer.swift index 9d98a91f88470..af2475f4cd84a 100644 --- a/test/decl/inherit/initializer.swift +++ b/test/decl/inherit/initializer.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class A { init(int i: Int) { } diff --git a/test/decl/inherit/override.swift b/test/decl/inherit/override.swift index 9e62917a79d02..5c7065e0963ad 100644 --- a/test/decl/inherit/override.swift +++ b/test/decl/inherit/override.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify -parse-as-library +// RUN: %target-parse-verify-swift -parse-as-library @objc class ObjCClassA {} @objc class ObjCClassB : ObjCClassA {} diff --git a/test/decl/init/default-initialization.swift b/test/decl/init/default-initialization.swift index 7304fd46db7d3..dd36b7c26d718 100644 --- a/test/decl/init/default-initialization.swift +++ b/test/decl/init/default-initialization.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -emit-sil -verify +// RUN: %target-swift-frontend -emit-sil -verify %s struct A { var i : Int diff --git a/test/decl/init/failable.swift b/test/decl/init/failable.swift index d71b35e499bbd..767ce12d32e93 100644 --- a/test/decl/init/failable.swift +++ b/test/decl/init/failable.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift struct S0 { init!(int: Int) { } diff --git a/test/decl/init/recursive_references.swift b/test/decl/init/recursive_references.swift index 092c6dcf80ba5..2540a3f3be1a8 100644 --- a/test/decl/init/recursive_references.swift +++ b/test/decl/init/recursive_references.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift class Foo { func bar(bar) {} // expected-error{{use of undeclared type 'bar'}} diff --git a/test/decl/objc_override.swift b/test/decl/objc_override.swift index 9df37a336e0f4..d3824f8b825d5 100644 --- a/test/decl/objc_override.swift +++ b/test/decl/objc_override.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -disable-objc-attr-requires-foundation-module %s -verify +// RUN: %target-parse-verify-swift class A { @objc func a() { } // expected-note{{Objective-C method 'a' defined by method 'a()' here}} diff --git a/test/decl/objc_override_multi.swift b/test/decl/objc_override_multi.swift index 21e347f7cdc90..3dd2b7abbc6f0 100644 --- a/test/decl/objc_override_multi.swift +++ b/test/decl/objc_override_multi.swift @@ -1,6 +1,6 @@ -// RUN: %swift -parse -disable-objc-attr-requires-foundation-module -primary-file %s %S/Inputs/objc_override_multi_2.swift %S/Inputs/objc_override_multi_3.swift -verify +// RUN: %target-swift-frontend -parse -disable-objc-attr-requires-foundation-module -primary-file %s %S/Inputs/objc_override_multi_2.swift %S/Inputs/objc_override_multi_3.swift -verify -// RUN: %swift -emit-module -emit-module-path=%t -module-name=foo -disable-objc-attr-requires-foundation-module %s %S/Inputs/objc_override_multi_2.swift %S/Inputs/objc_override_multi_3.swift -verify +// RUN: %target-swift-frontend -emit-module -emit-module-path=%t -module-name=foo -disable-objc-attr-requires-foundation-module %s %S/Inputs/objc_override_multi_2.swift %S/Inputs/objc_override_multi_3.swift -verify class SubSub1 : Sub1 { @objc func a() { } // expected-error{{method 'a()' overrides Objective-C method 'a' from superclass 'Super1'}} diff --git a/test/decl/objc_redeclaration.swift b/test/decl/objc_redeclaration.swift index b74d2967ef10c..5ff2851661936 100644 --- a/test/decl/objc_redeclaration.swift +++ b/test/decl/objc_redeclaration.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -disable-objc-attr-requires-foundation-module %s -verify +// RUN: %target-parse-verify-swift @objc class Redecl1 { // expected-note{{Objective-C method 'dealloc' previously declared by implicit deinitializer here}} @objc init() { } // expected-note{{Objective-C method 'init' previously declared by initializer 'init()' here}} diff --git a/test/decl/objc_redeclaration_multi.swift b/test/decl/objc_redeclaration_multi.swift index f42745079ded7..a53aed83de4f2 100644 --- a/test/decl/objc_redeclaration_multi.swift +++ b/test/decl/objc_redeclaration_multi.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -disable-objc-attr-requires-foundation-module %s %S/Inputs/objc_redeclaration_multi_2.swift -verify +// RUN: %target-swift-frontend -parse -disable-objc-attr-requires-foundation-module %s %S/Inputs/objc_redeclaration_multi_2.swift -verify @objc class Redecl1 { @objc init() { } // expected-note{{Objective-C method 'init' previously declared by initializer 'init()' here}} diff --git a/test/decl/operators.swift b/test/decl/operators.swift index f65453949c0d4..ba05769e28b43 100644 --- a/test/decl/operators.swift +++ b/test/decl/operators.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift infix operator %%% {} infix operator %%%% {} diff --git a/test/decl/overload.swift b/test/decl/overload.swift index 19d675ee77a70..8aea68d629713 100644 --- a/test/decl/overload.swift +++ b/test/decl/overload.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift var var_redecl1: Int // expected-note {{previously declared here}} var_redecl1 = 0 diff --git a/test/decl/protocol/conforms/inherited.swift b/test/decl/protocol/conforms/inherited.swift index 71fa4a39d06d9..1bbcaf8202917 100644 --- a/test/decl/protocol/conforms/inherited.swift +++ b/test/decl/protocol/conforms/inherited.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Inheritable: method with 'Self' in its signature protocol P1 { diff --git a/test/decl/protocol/conforms/init.swift b/test/decl/protocol/conforms/init.swift index 9776f94787219..c178274a71c6b 100644 --- a/test/decl/protocol/conforms/init.swift +++ b/test/decl/protocol/conforms/init.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol P1 { init() // expected-note{{protocol requires initializer 'init()' with type '()'}} diff --git a/test/decl/protocol/indirectly_recursive_requirement.swift b/test/decl/protocol/indirectly_recursive_requirement.swift index 67675e0480b94..ff08c8a9712d3 100644 --- a/test/decl/protocol/indirectly_recursive_requirement.swift +++ b/test/decl/protocol/indirectly_recursive_requirement.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol Incrementable { func successor() -> Self diff --git a/test/decl/protocol/operators_in_protocols.swift b/test/decl/protocol/operators_in_protocols.swift index 4fd7db0e01275..3de46f3cac664 100644 --- a/test/decl/protocol/operators_in_protocols.swift +++ b/test/decl/protocol/operators_in_protocols.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift protocol P { func << (lhs: Self, rhs: Self) -> Self diff --git a/test/decl/protocol/protocol_overload_selection.swift b/test/decl/protocol/protocol_overload_selection.swift index 7e82afd662f59..11cc8213eeda4 100644 --- a/test/decl/protocol/protocol_overload_selection.swift +++ b/test/decl/protocol/protocol_overload_selection.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol P1 { func foo() -> Int diff --git a/test/decl/protocol/protocol_with_default_args.swift b/test/decl/protocol/protocol_with_default_args.swift index 0e90f2ddb20c8..49a08a9659673 100644 --- a/test/decl/protocol/protocol_with_default_args.swift +++ b/test/decl/protocol/protocol_with_default_args.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift protocol P { func foo(truth: Bool = false) // expected-error{{default argument not permitted in a protocol method}} diff --git a/test/decl/protocol/protocols.swift b/test/decl/protocol/protocols.swift index 5060050708b00..780ac9ac991fb 100644 --- a/test/decl/protocol/protocols.swift +++ b/test/decl/protocol/protocols.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol EmptyProtocol { } diff --git a/test/decl/protocol/protocols_in_library.swift b/test/decl/protocol/protocols_in_library.swift index 3a19222131083..ec13db920fce0 100644 --- a/test/decl/protocol/protocols_in_library.swift +++ b/test/decl/protocol/protocols_in_library.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify -parse-as-library +// RUN: %target-parse-verify-swift -parse-as-library struct X { struct Inner : Proto { diff --git a/test/decl/protocol/recursive_requirement.swift b/test/decl/protocol/recursive_requirement.swift index 4553ccac783d3..f69a522ae6864 100644 --- a/test/decl/protocol/recursive_requirement.swift +++ b/test/decl/protocol/recursive_requirement.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Basic test of requirements protocol Foo { diff --git a/test/decl/protocol/req/associated_type_default.swift b/test/decl/protocol/req/associated_type_default.swift index 0925dc50ba25e..afc35d92f8ed0 100644 --- a/test/decl/protocol/req/associated_type_default.swift +++ b/test/decl/protocol/req/associated_type_default.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift struct X { } diff --git a/test/decl/protocol/req/class.swift b/test/decl/protocol/req/class.swift index 26b321becc885..00a6536344c4c 100644 --- a/test/decl/protocol/req/class.swift +++ b/test/decl/protocol/req/class.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol P1 : class { } diff --git a/test/decl/protocol/req/dynamic_self.swift b/test/decl/protocol/req/dynamic_self.swift index f1449bd458646..3200d24a0e167 100644 --- a/test/decl/protocol/req/dynamic_self.swift +++ b/test/decl/protocol/req/dynamic_self.swift @@ -1,4 +1,5 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift + protocol P { func f() -> Self // expected-note 2{{protocol requires function 'f()' with type '() -> Self'}} } diff --git a/test/decl/protocol/req/func.swift b/test/decl/protocol/req/func.swift index 4a7d2d84c5650..ec809d4aa8bae 100644 --- a/test/decl/protocol/req/func.swift +++ b/test/decl/protocol/req/func.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Test function requirements within protocols, as well as conformance to // said protocols. diff --git a/test/decl/protocol/req/name_mismatch.swift b/test/decl/protocol/req/name_mismatch.swift index fb8c807e37c4f..98063b1953c6c 100644 --- a/test/decl/protocol/req/name_mismatch.swift +++ b/test/decl/protocol/req/name_mismatch.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol P { func foo(i: Int, x: Float) // expected-note 4{{requirement 'foo(_:x:)' declared here}} diff --git a/test/decl/protocol/req/optional.swift b/test/decl/protocol/req/optional.swift index 201095fde9766..f37d73bc19e48 100644 --- a/test/decl/protocol/req/optional.swift +++ b/test/decl/protocol/req/optional.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // ----------------------------------------------------------------------- // Declaring optional requirements diff --git a/test/decl/protocol/req/subscript.swift b/test/decl/protocol/req/subscript.swift index fcb0621cf7fdc..a51821f5ac5b5 100644 --- a/test/decl/protocol/req/subscript.swift +++ b/test/decl/protocol/req/subscript.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol P1 { subscript (i: Int) -> Int { get } // expected-note{{protocol requires subscript with type '(Int) -> Int'}} diff --git a/test/decl/protocol/req/unavailable.swift b/test/decl/protocol/req/unavailable.swift index aee0b95e42035..beed89eaec1b4 100644 --- a/test/decl/protocol/req/unavailable.swift +++ b/test/decl/protocol/req/unavailable.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // An @objc protocol can have 'unavailable' // methods. They are treated as if they diff --git a/test/decl/protocol/substituted_aliases.swift b/test/decl/protocol/substituted_aliases.swift index 9f170ef118839..6a6b5da5e78d9 100644 --- a/test/decl/protocol/substituted_aliases.swift +++ b/test/decl/protocol/substituted_aliases.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift struct Q : SequenceType { func generate() -> T.Generator { diff --git a/test/decl/recursive_enum_declaration.swift b/test/decl/recursive_enum_declaration.swift index fcbc8038ae592..802635e5a54d5 100644 --- a/test/decl/recursive_enum_declaration.swift +++ b/test/decl/recursive_enum_declaration.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -verify -parse +// RUN: %target-parse-verify-swift // FIXME: When we can IRGen recursively specified enums, remove the '-parse' flag from this test enum E { diff --git a/test/decl/subscript/addressors.swift b/test/decl/subscript/addressors.swift index fe4c125eaf11e..1fbb449c25653 100644 --- a/test/decl/subscript/addressors.swift +++ b/test/decl/subscript/addressors.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse-stdlib -parse %s -verify +// RUN: %target-parse-verify-swift -parse-stdlib import Swift diff --git a/test/decl/subscript/subscripting.swift b/test/decl/subscript/subscripting.swift index 44a8d2a22336b..65f154bb09033 100644 --- a/test/decl/subscript/subscripting.swift +++ b/test/decl/subscript/subscripting.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift struct X { } diff --git a/test/decl/typealias/associated_types.swift b/test/decl/typealias/associated_types.swift index 6c9529127f7fe..36dac5ac952b7 100644 --- a/test/decl/typealias/associated_types.swift +++ b/test/decl/typealias/associated_types.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -parse-as-library %s -verify +// RUN: %target-parse-verify-swift -parse-as-library protocol BaseProto { typealias AssocTy diff --git a/test/decl/typealias/dependent_types.swift b/test/decl/typealias/dependent_types.swift index 2698ed2b2671a..0d81d0de5ad04 100644 --- a/test/decl/typealias/dependent_types.swift +++ b/test/decl/typealias/dependent_types.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift protocol P { typealias Assoc = Self diff --git a/test/decl/var/NSCopying.swift b/test/decl/var/NSCopying.swift index e0886eae1bb6a..db99d0c31bcd8 100644 --- a/test/decl/var/NSCopying.swift +++ b/test/decl/var/NSCopying.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk %s -parse -verify +// RUN: %target-swift-frontend %clang-importer-sdk %s -parse -verify import Foundation diff --git a/test/decl/var/NSManaged_properties.swift b/test/decl/var/NSManaged_properties.swift index 8625ebd3f79c7..23f475cd20620 100644 --- a/test/decl/var/NSManaged_properties.swift +++ b/test/decl/var/NSManaged_properties.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -parse %s -verify import Foundation diff --git a/test/decl/var/default_init.swift b/test/decl/var/default_init.swift index b161dd6c65c8d..76edf3d7e16e3 100644 --- a/test/decl/var/default_init.swift +++ b/test/decl/var/default_init.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -parse-as-library %s -verify +// RUN: %target-swift-frontend -parse -parse-as-library %s -verify // Default initialization of variables. diff --git a/test/decl/var/lazy_properties.swift b/test/decl/var/lazy_properties.swift index dffe84cca377b..892358ee52e5e 100644 --- a/test/decl/var/lazy_properties.swift +++ b/test/decl/var/lazy_properties.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -parse-as-library %s -verify +// RUN: %target-parse-verify-swift -parse-as-library lazy func lazy_func() {} // expected-error {{'lazy' may only be used on 'var' declarations}} diff --git a/test/decl/var/properties.swift b/test/decl/var/properties.swift index 5c681b411c061..cd5cb6ead7be1 100644 --- a/test/decl/var/properties.swift +++ b/test/decl/var/properties.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift struct X { } var _x: X diff --git a/test/decl/var/static_var.swift b/test/decl/var/static_var.swift index 10fd9aad0d4ea..0aee0cd0b59fc 100644 --- a/test/decl/var/static_var.swift +++ b/test/decl/var/static_var.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -parse-as-library %s -verify +// RUN: %target-parse-verify-swift -parse-as-library // See also rdar://15626843. static var gvu1: Int // expected-error {{static properties may only be declared on a type}}{{1-7=}} diff --git a/test/decl/var/variables.swift b/test/decl/var/variables.swift index ad0ae04b96f8a..bcbc96ab741ef 100644 --- a/test/decl/var/variables.swift +++ b/test/decl/var/variables.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift var t1 : Int var t2 = 10 diff --git a/test/expr/capture/inout.swift b/test/expr/capture/inout.swift index bae43d7151f6e..36ab642fb0e41 100644 --- a/test/expr/capture/inout.swift +++ b/test/expr/capture/inout.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // An inout parameter can be captured. func foo(inout x: Int) { diff --git a/test/expr/capture/nested.swift b/test/expr/capture/nested.swift index 52c80cb4e255c..da420c997e0d4 100644 --- a/test/expr/capture/nested.swift +++ b/test/expr/capture/nested.swift @@ -1,4 +1,4 @@ -// RUN: %swift -dump-ast %s 2>&1 | FileCheck %s +// RUN: %target-swift-frontend -dump-ast %s 2>&1 | FileCheck %s // CHECK: func_decl "foo2(_:)" func foo2(x: Int) -> (Int) -> (Int) -> Int { diff --git a/test/expr/capture/nested_class.swift b/test/expr/capture/nested_class.swift index f592658d15997..a53bf2fd78bca 100644 --- a/test/expr/capture/nested_class.swift +++ b/test/expr/capture/nested_class.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift func capture_nested_class() { var a = 5 diff --git a/test/expr/capture/order.swift b/test/expr/capture/order.swift index b476df951897e..440605d2568fa 100644 --- a/test/expr/capture/order.swift +++ b/test/expr/capture/order.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift func makeIncrementor(amount: Int) -> () -> Int { func incrementor() -> Int { diff --git a/test/expr/cast/CoreFoundation.swift b/test/expr/cast/CoreFoundation.swift index c164dae5927a1..e6194906f3311 100644 --- a/test/expr/cast/CoreFoundation.swift +++ b/test/expr/cast/CoreFoundation.swift @@ -1,4 +1,4 @@ -// RUN: %swift %clang-importer-sdk -parse %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk -parse %s -verify import CoreFoundation import Foundation diff --git a/test/expr/cast/array_bridge.swift b/test/expr/cast/array_bridge.swift index 2de7f6bebec5e..349e7bd63980d 100644 --- a/test/expr/cast/array_bridge.swift +++ b/test/expr/cast/array_bridge.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class A { var x = 0 diff --git a/test/expr/cast/array_coerce.swift b/test/expr/cast/array_coerce.swift index 36cd9d7949556..5e89a5141a29b 100644 --- a/test/expr/cast/array_coerce.swift +++ b/test/expr/cast/array_coerce.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class C { var x = 0; diff --git a/test/expr/cast/array_downcast.swift b/test/expr/cast/array_downcast.swift index 1930ad1857495..da508848257fa 100644 --- a/test/expr/cast/array_downcast.swift +++ b/test/expr/cast/array_downcast.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class V {} class U : V {} diff --git a/test/expr/cast/array_downcast_Foundation.swift b/test/expr/cast/array_downcast_Foundation.swift index d9c383dc51054..df00930d6066f 100644 --- a/test/expr/cast/array_downcast_Foundation.swift +++ b/test/expr/cast/array_downcast_Foundation.swift @@ -1,7 +1,5 @@ -// RUN: rm -rf %t && mkdir %t -// RUN: %target-swift-frontend %s -parse -verify -// REQUIRES: OS=macosx -// RUN: %target-swift-frontend %s -dump-ast -verify 2>&1 | FileCheck %s +// RUN: %target-swift-frontend %clang-importer-sdk -parse %s -verify +// RUN: %target-swift-frontend %clang-importer-sdk %s -dump-ast -verify 2>&1 | FileCheck %s import Foundation diff --git a/test/expr/cast/array_iteration.swift b/test/expr/cast/array_iteration.swift index 58a3d4698905a..db7dfba755c85 100644 --- a/test/expr/cast/array_iteration.swift +++ b/test/expr/cast/array_iteration.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class View { var subviews: Array! = [] diff --git a/test/expr/cast/as_coerce.swift b/test/expr/cast/as_coerce.swift index ef96713f201b8..6723910105081 100644 --- a/test/expr/cast/as_coerce.swift +++ b/test/expr/cast/as_coerce.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Test the use of 'as' for type coercion (which requires no checking). @objc protocol P1 { diff --git a/test/expr/cast/bridged.swift b/test/expr/cast/bridged.swift index f6f40cf3473a6..ee42279a2516c 100644 --- a/test/expr/cast/bridged.swift +++ b/test/expr/cast/bridged.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Test casting through a class type to a bridged value type. diff --git a/test/expr/cast/chains.swift b/test/expr/cast/chains.swift index 626aa0d1dabc3..5e104df224e82 100644 --- a/test/expr/cast/chains.swift +++ b/test/expr/cast/chains.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class B { } class D: B { } diff --git a/test/expr/cast/dictionary_bridge.swift b/test/expr/cast/dictionary_bridge.swift index 4643799969321..08100cfeaa3d3 100644 --- a/test/expr/cast/dictionary_bridge.swift +++ b/test/expr/cast/dictionary_bridge.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class Root : Hashable { var hashValue: Int { diff --git a/test/expr/cast/dictionary_coerce.swift b/test/expr/cast/dictionary_coerce.swift index eff79ca9a89a8..433179342c22c 100644 --- a/test/expr/cast/dictionary_coerce.swift +++ b/test/expr/cast/dictionary_coerce.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class C : Hashable { var x = 0 diff --git a/test/expr/cast/dictionary_downcast.swift b/test/expr/cast/dictionary_downcast.swift index 9117d8df31622..4d6143ec4e30e 100644 --- a/test/expr/cast/dictionary_downcast.swift +++ b/test/expr/cast/dictionary_downcast.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class C : Hashable { var x = 0 diff --git a/test/expr/cast/metatype_casts.swift b/test/expr/cast/metatype_casts.swift index 2df380b656ead..c0b99d791162b 100644 --- a/test/expr/cast/metatype_casts.swift +++ b/test/expr/cast/metatype_casts.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift func use(_: T) {} diff --git a/test/expr/cast/nil_value_to_optional.swift b/test/expr/cast/nil_value_to_optional.swift index 8491e8f139ec2..6d67a7f8b5ec1 100644 --- a/test/expr/cast/nil_value_to_optional.swift +++ b/test/expr/cast/nil_value_to_optional.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift var t = true var f = false diff --git a/test/expr/cast/optional.swift b/test/expr/cast/optional.swift index 637d8884ef311..cd3715ee34ca0 100644 --- a/test/expr/cast/optional.swift +++ b/test/expr/cast/optional.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class Base : Hashable { var hashValue: Int { return 0 } diff --git a/test/expr/cast/precedence.swift b/test/expr/cast/precedence.swift index cf23e3996e8f4..171a7e22d4439 100644 --- a/test/expr/cast/precedence.swift +++ b/test/expr/cast/precedence.swift @@ -1,3 +1,3 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift let x: Bool = 3/4 as Float > 1/2 as Float diff --git a/test/expr/cast/set_bridge.swift b/test/expr/cast/set_bridge.swift index 93a4c75933dc0..fb6fc0d176be9 100644 --- a/test/expr/cast/set_bridge.swift +++ b/test/expr/cast/set_bridge.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class Root : Hashable { var hashValue: Int { diff --git a/test/expr/cast/set_coerce.swift b/test/expr/cast/set_coerce.swift index 603981aa015b7..9c76c6a6a0113 100644 --- a/test/expr/cast/set_coerce.swift +++ b/test/expr/cast/set_coerce.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class C : Hashable { var x = 0 diff --git a/test/expr/cast/set_downcast.swift b/test/expr/cast/set_downcast.swift index b1b904ec44a6f..9cf8c60df5ae0 100644 --- a/test/expr/cast/set_downcast.swift +++ b/test/expr/cast/set_downcast.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift class C : Hashable { var x = 0 diff --git a/test/expr/character_literals.swift b/test/expr/character_literals.swift index fc4d15899d6aa..77c4c1bf92a78 100644 --- a/test/expr/character_literals.swift +++ b/test/expr/character_literals.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify -parse-stdlib -disable-access-control -enable-character-literals +// RUN: %target-parse-verify-swift -parse-stdlib -disable-access-control -enable-character-literals import Swift diff --git a/test/expr/closure/anonymous.swift b/test/expr/closure/anonymous.swift index 58fc1a14763d4..5520d72b67bd5 100644 --- a/test/expr/closure/anonymous.swift +++ b/test/expr/closure/anonymous.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift func takeIntToInt(f: (Int) -> Int) { } func takeIntIntToInt(f: (Int, Int) -> Int) { } diff --git a/test/expr/closure/basic.swift b/test/expr/closure/basic.swift index b9d25f6f006dc..3fc423aa3fae8 100644 --- a/test/expr/closure/basic.swift +++ b/test/expr/closure/basic.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift func takeIntToInt(f: (Int) -> Int) { } func takeIntIntToInt(f: (Int, Int) -> Int) { } diff --git a/test/expr/closure/closures.swift b/test/expr/closure/closures.swift index e1262a177e3f1..b39f1e1f80524 100644 --- a/test/expr/closure/closures.swift +++ b/test/expr/closure/closures.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift var func6 : (fn : (Int,Int) -> Int) -> () var func6a : ((Int, Int) -> Int) -> () diff --git a/test/expr/closure/default_args.swift b/test/expr/closure/default_args.swift index da34980467eb4..2e36a2d7a34dd 100644 --- a/test/expr/closure/default_args.swift +++ b/test/expr/closure/default_args.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift func simple_default_args() { var f1 : (Int) -> Int = {(x : Int = 1) in x+1} // expected-error{{default argument is only permitted for a non-curried function parameter}} diff --git a/test/expr/closure/inference.swift b/test/expr/closure/inference.swift index 3114156c92192..107400cd4b65e 100644 --- a/test/expr/closure/inference.swift +++ b/test/expr/closure/inference.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift func takeIntToInt(f: (Int) -> Int) { } func takeIntIntToInt(f: (Int, Int) -> Int) { } diff --git a/test/expr/closure/invalid_parameter_type.swift b/test/expr/closure/invalid_parameter_type.swift index 6168300504bd3..b6e0b6b5266cc 100644 --- a/test/expr/closure/invalid_parameter_type.swift +++ b/test/expr/closure/invalid_parameter_type.swift @@ -1,3 +1,3 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift var f = { (s: Undeclared)-> Int in 0 } // expected-error {{use of undeclared type 'Undeclared'}} diff --git a/test/expr/closure/nested_inner_closures.swift b/test/expr/closure/nested_inner_closures.swift index 9a0292410d4e0..f6af707718dde 100644 --- a/test/expr/closure/nested_inner_closures.swift +++ b/test/expr/closure/nested_inner_closures.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift assert({ () -> Bool in return true diff --git a/test/expr/closure/single_expr.swift b/test/expr/closure/single_expr.swift index 26ff783c760c6..e716430051e7d 100644 --- a/test/expr/closure/single_expr.swift +++ b/test/expr/closure/single_expr.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift func takeIntToInt(f: (Int) -> Int) { } func takeIntIntToInt(f: (Int, Int) -> Int) { } diff --git a/test/expr/closure/trailing.swift b/test/expr/closure/trailing.swift index 8e282edefd39b..731285ef52fbf 100644 --- a/test/expr/closure/trailing.swift +++ b/test/expr/closure/trailing.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift func takeFunc(f: (Int) -> Int) -> Int {} func takeValueAndFunc(value: Int, f: (Int) -> Int) {} diff --git a/test/expr/delayed-ident/enum.swift b/test/expr/delayed-ident/enum.swift index f1c20a067064a..a95108808ae36 100644 --- a/test/expr/delayed-ident/enum.swift +++ b/test/expr/delayed-ident/enum.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Simple enumeration type enum E1 { diff --git a/test/expr/delayed-ident/static_func.swift b/test/expr/delayed-ident/static_func.swift index b8a8759fe67da..8d025c54805ca 100644 --- a/test/expr/delayed-ident/static_func.swift +++ b/test/expr/delayed-ident/static_func.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Simple struct types struct X1 { diff --git a/test/expr/delayed-ident/static_var.swift b/test/expr/delayed-ident/static_var.swift index bc28a819d202d..c4a8f583bf82a 100644 --- a/test/expr/delayed-ident/static_var.swift +++ b/test/expr/delayed-ident/static_var.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Simple struct types struct X1 { diff --git a/test/expr/dynamic_lookup.swift b/test/expr/dynamic_lookup.swift index 201e806735504..577c3b87c4d6f 100644 --- a/test/expr/dynamic_lookup.swift +++ b/test/expr/dynamic_lookup.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift @objc class HasStaticProperties { class var staticVar1: Int { return 4 } diff --git a/test/expr/expressions.swift b/test/expr/expressions.swift index 2221e871887f1..8f91ef785246b 100644 --- a/test/expr/expressions.swift +++ b/test/expr/expressions.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify -enable-character-literals +// RUN: %target-parse-verify-swift -enable-character-literals //===----------------------------------------------------------------------===// // Tests and samples. diff --git a/test/expr/postfix/call/construction.swift b/test/expr/postfix/call/construction.swift index 8f35a0d2da90c..c3729c0bf6e0b 100644 --- a/test/expr/postfix/call/construction.swift +++ b/test/expr/postfix/call/construction.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift struct S { init(i: Int) { } diff --git a/test/expr/postfix/dot/init_ref_delegation.swift b/test/expr/postfix/dot/init_ref_delegation.swift index 0b9c67d18c72c..8c739d1f4a437 100644 --- a/test/expr/postfix/dot/init_ref_delegation.swift +++ b/test/expr/postfix/dot/init_ref_delegation.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Tests for initializer delegation via self.init(...). diff --git a/test/expr/postfix/dot/optional_context_member.swift b/test/expr/postfix/dot/optional_context_member.swift index 5f3469b74d7da..8353454cd69a3 100644 --- a/test/expr/postfix/dot/optional_context_member.swift +++ b/test/expr/postfix/dot/optional_context_member.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift struct Foo { static var someVar: Foo = Foo() diff --git a/test/expr/postfix/dot/optional_context_member_enum.swift b/test/expr/postfix/dot/optional_context_member_enum.swift index 5a436be9afcb5..a3155e0c45c72 100644 --- a/test/expr/postfix/dot/optional_context_member_enum.swift +++ b/test/expr/postfix/dot/optional_context_member_enum.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift enum Bar { case Simple diff --git a/test/expr/postfix/dot/selector.swift b/test/expr/postfix/dot/selector.swift index 58ac6fc5ab7f6..927ddf237224b 100644 --- a/test/expr/postfix/dot/selector.swift +++ b/test/expr/postfix/dot/selector.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift class C { class func classMethod(Int) {} diff --git a/test/expr/postfix/dot/self.swift b/test/expr/postfix/dot/self.swift index 2a3a791a256bb..ca7dcac64f50b 100644 --- a/test/expr/postfix/dot/self.swift +++ b/test/expr/postfix/dot/self.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift let x: Int = 1 let y: Int = x.self diff --git a/test/expr/primary/literal/boolean.swift b/test/expr/primary/literal/boolean.swift index 29060554bedee..85bc77a7051d3 100644 --- a/test/expr/primary/literal/boolean.swift +++ b/test/expr/primary/literal/boolean.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift func boolLiterals() { var b: Bool = false diff --git a/test/multifile/protocol-conformance.swift b/test/multifile/protocol-conformance.swift index 35d645e509c1b..e952b6d8b3ebb 100644 --- a/test/multifile/protocol-conformance.swift +++ b/test/multifile/protocol-conformance.swift @@ -1,5 +1,6 @@ +// RUN: %target-swift-frontend -emit-ir -verify %s %S/Inputs/protocol-conformance/A.swift + // https://devforums.apple.com/thread/254807?tstart=0 -// RUN: %swift -emit-ir -verify %s %S/Inputs/protocol-conformance/A.swift class Implementation: A { var aValue: Int = 1 diff --git a/test/sil-extract/basic.sil b/test/sil-extract/basic.sil index 0f335e1af41c9..e0ffe004588dc 100644 --- a/test/sil-extract/basic.sil +++ b/test/sil-extract/basic.sil @@ -1,4 +1,4 @@ -// RUN: %sil-extract %s -func=use_before_init | FileCheck %s +// RUN: %target-sil-extract %s -func=use_before_init | FileCheck %s import Builtin import Swift diff --git a/test/sil-extract/load-serialized-sil.swift b/test/sil-extract/load-serialized-sil.swift index e863f404bd823..d80b0d354d584 100644 --- a/test/sil-extract/load-serialized-sil.swift +++ b/test/sil-extract/load-serialized-sil.swift @@ -1,4 +1,4 @@ -// RUN: %swift -primary-file %s -module-name Swift -g -sil-serialize-all -module-link-name swiftCore -O -parse-as-library -parse-stdlib -emit-module -emit-module-path - -o /dev/null | %sil-extract -module-name="Swift" -func="_TFVSs1X4testfS_FT_T_" | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -module-name Swift -g -sil-serialize-all -module-link-name swiftCore -O -parse-as-library -parse-stdlib -emit-module -emit-module-path - -o /dev/null | %target-sil-extract -module-name="Swift" -func="_TFVSs1X4testfS_FT_T_" | FileCheck %s // CHECK: import Builtin // CHECK: import Swift diff --git a/test/sil-opt/sil-opt.swift b/test/sil-opt/sil-opt.swift index 0d34a1bb07a51..3a91eb4fb585e 100644 --- a/test/sil-opt/sil-opt.swift +++ b/test/sil-opt/sil-opt.swift @@ -1,4 +1,4 @@ -// RUN: %swift -primary-file %s -module-name Swift -g -sil-serialize-all -module-link-name swiftCore -O -parse-as-library -parse-stdlib -emit-module -emit-module-path - -o /dev/null | %sil-opt -verify -module-name="Swift" | FileCheck %s +// RUN: %target-swift-frontend -primary-file %s -module-name Swift -g -sil-serialize-all -module-link-name swiftCore -O -parse-as-library -parse-stdlib -emit-module -emit-module-path - -o /dev/null | %target-sil-opt -verify -module-name="Swift" | FileCheck %s // CHECK: import Builtin // CHECK: import Swift diff --git a/test/stmt/foreach.swift b/test/stmt/foreach.swift index fbe18875a10c8..3b635e8733b55 100644 --- a/test/stmt/foreach.swift +++ b/test/stmt/foreach.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Bad containers and ranges struct BadContainer1 { diff --git a/test/stmt/if_while_var.swift b/test/stmt/if_while_var.swift index b0f218b2700bd..16f34329f8905 100644 --- a/test/stmt/if_while_var.swift +++ b/test/stmt/if_while_var.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift func foo() -> Int? { return .None } func nonOptional() -> Int { return 0 } diff --git a/test/stmt/statements.swift b/test/stmt/statements.swift index 0e4749f4b0a3e..68e9684d91d12 100644 --- a/test/stmt/statements.swift +++ b/test/stmt/statements.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify -enable-character-literals +// RUN: %target-parse-verify-swift -enable-character-literals /* block comments */ /* /* nested too */ */ diff --git a/test/type/array.swift b/test/type/array.swift index 766a16af6b8f9..b55a81da59c37 100644 --- a/test/type/array.swift +++ b/test/type/array.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Array types. class Base1 { diff --git a/test/type/dictionary.swift b/test/type/dictionary.swift index 4a2d7a4b89b1c..19a1ac9fa3218 100644 --- a/test/type/dictionary.swift +++ b/test/type/dictionary.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift // Dictionary types. class Base { diff --git a/test/type/infer/closures.swift b/test/type/infer/closures.swift index 32fab0a8bcf6f..b90f9c87dc682 100644 --- a/test/type/infer/closures.swift +++ b/test/type/infer/closures.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift // Infer bound generic types in closures func dict_int_string_indexer(getElement: (Dictionary) -> String) -> String { diff --git a/test/type/infer/global_variables.swift b/test/type/infer/global_variables.swift index 0408b556ca1fc..b708e470b67c8 100644 --- a/test/type/infer/global_variables.swift +++ b/test/type/infer/global_variables.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift var b = true, i = 17 diff --git a/test/type/infer/instance_variables.swift b/test/type/infer/instance_variables.swift index 5557b9c3b2884..3b6fcde19c862 100644 --- a/test/type/infer/instance_variables.swift +++ b/test/type/infer/instance_variables.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift struct X { var b = true, i = 17 diff --git a/test/type/infer/local_variables.swift b/test/type/infer/local_variables.swift index 67a2f165c5d79..9805cde28bc42 100644 --- a/test/type/infer/local_variables.swift +++ b/test/type/infer/local_variables.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift func dict_to_array(_: Dictionary) -> [(String, Int)] { return Array<(String, Int)>() diff --git a/test/type/metatype/metatypes.swift b/test/type/metatype/metatypes.swift index 0489bf7ae22a2..6917a792565c7 100644 --- a/test/type/metatype/metatypes.swift +++ b/test/type/metatype/metatypes.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift struct Test0 {} diff --git a/test/type/nested_types.swift b/test/type/nested_types.swift index e3cdba44f1f91..dd646b9bc83a3 100644 --- a/test/type/nested_types.swift +++ b/test/type/nested_types.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift struct X { typealias MyInt = Int diff --git a/test/type/protocol_composition.swift b/test/type/protocol_composition.swift index 51f832e711470..6822c78c942bc 100644 --- a/test/type/protocol_composition.swift +++ b/test/type/protocol_composition.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift func canonical_empty_protocol() -> protocol<> { return 1 diff --git a/test/type/protocol_types.swift b/test/type/protocol_types.swift index 27abc7e3c3732..2a832c9877b33 100644 --- a/test/type/protocol_types.swift +++ b/test/type/protocol_types.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse -verify %s +// RUN: %target-parse-verify-swift protocol HasSelfRequirements { func foo(x: Self) diff --git a/test/type/self.swift b/test/type/self.swift index 9db2c46b4ba7b..04b1a2b1b6c70 100644 --- a/test/type/self.swift +++ b/test/type/self.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift struct S0 { func foo(other: Self) { } // expected-error{{'Self' is only available in a protocol or as the result of a class method; did you mean 'S0'?}}{{19-23=S0}} diff --git a/test/type/types.swift b/test/type/types.swift index de2ce1317cffa..56785d7103cd3 100644 --- a/test/type/types.swift +++ b/test/type/types.swift @@ -1,4 +1,4 @@ -// RUN: %swift -parse %s -verify +// RUN: %target-parse-verify-swift var a : Int diff --git a/tools/sil-extract/SILExtract.cpp b/tools/sil-extract/SILExtract.cpp index c6179ac7da59a..c59388c9c8880 100644 --- a/tools/sil-extract/SILExtract.cpp +++ b/tools/sil-extract/SILExtract.cpp @@ -68,6 +68,9 @@ SDKPath("sdk", llvm::cl::desc("The path to the SDK for use with the clang " "importer."), llvm::cl::init("")); +static llvm::cl::opt +Triple("target", llvm::cl::desc("target triple")); + // This function isn't referenced outside its translation unit, but it // can't use the "static" keyword because its address is used for // getMainExecutable (since some platforms don't support taking the @@ -139,6 +142,8 @@ int main(int argc, char **argv) { } if (!SDKPath.empty()) Invocation.setSDKPath(SDKPath); + if (!Triple.empty()) + Invocation.setTargetTriple(Triple); if (!ResourceDir.empty()) Invocation.setRuntimeResourcePath(ResourceDir); Invocation.getClangImporterOptions().ModuleCachePath = ModuleCachePath; diff --git a/validation-test/compiler_crashers/035-multiple-typecheck-segfault.swift b/validation-test/compiler_crashers/035-multiple-typecheck-segfault.swift index c2cc7ac795639..c650511ac1d0e 100644 --- a/validation-test/compiler_crashers/035-multiple-typecheck-segfault.swift +++ b/validation-test/compiler_crashers/035-multiple-typecheck-segfault.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift // rdar://17242486 protocol a { typealias d // expected-note{{protocol requires nested type 'd'}} @@ -11,4 +11,4 @@ class b { // expected-error {{invalid redeclaration of 'b'}} } protocol c { typealias g -} \ No newline at end of file +} diff --git a/validation-test/parser/parse_stdlib.sil b/validation-test/parser/parse_stdlib.sil index d63136575c46b..4416625a84e8b 100644 --- a/validation-test/parser/parse_stdlib.sil +++ b/validation-test/parser/parse_stdlib.sil @@ -1,5 +1,5 @@ // Make sure that we can parse the stdlib.sil deserialized from Swift.swiftmodule. // RUN: rm -f %t.* -// RUN: %sil-opt -sil-disable-ast-dump -verify %libdir/swift/%target-sdk-name/$(test "%target-ptrsize" == "64" || echo %target-ptrsize)/Swift.swiftmodule -module-name=Swift -target=%target-triple -o %t.sil -// RUN: %sil-opt -verify %t.sil > /dev/null +// RUN: %target-sil-opt -sil-disable-ast-dump -verify %libdir/swift/%target-sdk-name/$(test "%target-ptrsize" == "64" || echo %target-ptrsize)/Swift.swiftmodule -module-name=Swift -o %t.sil +// RUN: %target-sil-opt -verify %t.sil > /dev/null diff --git a/validation-test/stdlib/AssertDiagnostics.swift b/validation-test/stdlib/AssertDiagnostics.swift index 330354d4e63f5..1a24627afa863 100644 --- a/validation-test/stdlib/AssertDiagnostics.swift +++ b/validation-test/stdlib/AssertDiagnostics.swift @@ -1,4 +1,4 @@ -// RUN: %swift -verify -parse %s +// RUN: %target-parse-verify-swift func rejectsStringLiteral() { assert("foo") // expected-error {{cannot invoke 'assert' with an argument list of type '(String)'}} expected-note{{expected an argument list of type '(@autoclosure () -> Bool, @autoclosure () -> String, StaticString, UWord)'}} diff --git a/validation-test/stdlib/AtomicsDiagnostics.swift b/validation-test/stdlib/AtomicsDiagnostics.swift index 5394b922e9c1f..917d4fdf1343c 100644 --- a/validation-test/stdlib/AtomicsDiagnostics.swift +++ b/validation-test/stdlib/AtomicsDiagnostics.swift @@ -1,4 +1,4 @@ -// RUN: %swift %s -parse -verify +// RUN: %target-parse-verify-swift class AtomicIntSubclass : _stdlib_AtomicInt {} // expected-error {{inheritance from a final class '_stdlib_AtomicInt'}} diff --git a/validation-test/stdlib/FixedPointDiagnostics.swift.gyb b/validation-test/stdlib/FixedPointDiagnostics.swift.gyb index 66b61855c0b59..551a11950753b 100644 --- a/validation-test/stdlib/FixedPointDiagnostics.swift.gyb +++ b/validation-test/stdlib/FixedPointDiagnostics.swift.gyb @@ -1,5 +1,5 @@ // RUN: rm -rf %t && mkdir -p %t && %S/../../utils/gyb %s -o %t/main.swift -// RUN: %S/../../utils/line-directive %t/main.swift -- %swift -verify -parse %t/main.swift +// RUN: %S/../../utils/line-directive %t/main.swift -- %target-swift-frontend -parse -verify %t/main.swift func testUnaryMinusInUnsigned() { var a: UInt8 = -(1) // expected-error {{unary operator '-' cannot be applied to an operand of type '(Int)'}}