Files
swift-mirror/test/ClangModules/simd_sans_simd.swift
Joe Groff d0473756ec ClangImporter etc.: Remap C vector types to nested BaseType.VectorN types.
The design we landed on for SIMD is to define the vector types as nested types of their element, e.g. Float.Vector4, Int32.Vector2, etc. Update the Clang importer and other mapping facilities to match.

Swift SVN r28087
2015-05-02 15:04:43 +00:00

25 lines
1.4 KiB
Swift

// RUN: rm -rf %t
// RUN: mkdir %t
// FIXME: BEGIN -enable-source-import hackaround
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/../Inputs/clang-importer-sdk -I %t) -emit-module -o %t %S/../Inputs/clang-importer-sdk/swift-modules/ObjectiveC.swift
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/../Inputs/clang-importer-sdk -I %t) -emit-module -o %t %S/../Inputs/clang-importer-sdk/swift-modules/CoreGraphics.swift
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/../Inputs/clang-importer-sdk -I %t) -emit-module -o %t %S/../Inputs/clang-importer-sdk/swift-modules/Foundation.swift
// RUN: %target-swift-frontend(mock-sdk: -sdk %S/../Inputs/clang-importer-sdk -I %t) -emit-module -o %t %S/../Inputs/clang-importer-sdk/swift-modules/simd.swift
// FIXME: END -enable-source-import hackaround
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk-nosource) -I %t -module-name main -parse -verify -enable-simd-import %s
import c_simd
// Ensure that the SIMD types from the imported module get mapped into the
// SIMD Swift module, even if we in the importing module don't import SIMD.
takes_float4(makes_float4())
takes_int3(makes_int3())
takes_double2(makes_double2())
// FIXME: Float.Vector4 should not have been transitively imported.
// rdar://problem/20787803
// let x: Float.Vector4 = makes_float4() // expected-fixme-error{{'Vector4' is not a member type of 'Float'}}