mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Parser: Accept @cdecl with an indentifier for the C name
Begin accepting the attribute in the form of `@cdecl(cName)`, using an identifier instead of a string. For ease of landing this change we still accept the string form. We should stop accepting it before making this feature available in production.
This commit is contained in:
@@ -28,8 +28,8 @@
|
||||
// CHECK: #endif
|
||||
|
||||
/// My documentation
|
||||
@cdecl("simple")
|
||||
func a_simple(x: Int, bar y: Int) -> Int { return x }
|
||||
@cdecl(simple)
|
||||
func a0_simple(x: Int, bar y: Int) -> Int { return x }
|
||||
// CHECK-LABEL: // My documentation
|
||||
// CHECK-LABEL: SWIFT_EXTERN ptrdiff_t simple(ptrdiff_t x, ptrdiff_t y) SWIFT_NOEXCEPT SWIFT_WARN_UNUSED_RESULT;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user