mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Clang mangling] Don't mangle when Clang says not to
We have been mangling extern "C" symbols when building with C++ interoperability, leading to incorrectly-mangled names such as _Z6memset that should have been unmangled "memset". Fix this so we get consistent mangling between C and C++ interoperability modes. Fixes rdar://164495210.
This commit is contained in:
@@ -7,6 +7,12 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
typedef __SIZE_TYPE__ size_t;
|
||||
#endif
|
||||
|
||||
void* memcpy(void* s1, const void* s2, size_t n);
|
||||
void* memmove(void* s1, const void* s2, size_t n);
|
||||
char* strcpy (char* s1, const char* s2);
|
||||
@@ -30,4 +36,8 @@ void* memset(void* s, int c, size_t n);
|
||||
char* strerror(int errnum);
|
||||
size_t strlen(const char* s);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // SDK_STRING_H
|
||||
|
||||
Reference in New Issue
Block a user