r190963 - The intrinsics should all have C linkage.

Hans Wennborg hans at chromium.org
Wed Sep 18 15:39:20 PDT 2013


On Wed, Sep 18, 2013 at 3:24 PM, Eric Christopher <echristo at gmail.com> wrote:
> Author: echristo
> Date: Wed Sep 18 17:24:01 2013
> New Revision: 190963
>
> URL: http://llvm.org/viewvc/llvm-project?rev=190963&view=rev
> Log:
> The intrinsics should all have C linkage.
>
> Modified:
>     cfe/trunk/lib/Headers/Intrin.h
>
> Modified: cfe/trunk/lib/Headers/Intrin.h
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/Intrin.h?rev=190963&r1=190962&r2=190963&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Headers/Intrin.h (original)
> +++ cfe/trunk/lib/Headers/Intrin.h Wed Sep 18 17:24:01 2013
> @@ -32,6 +32,10 @@
>  /* First include the standard intrinsics. */
>  #include <x86intrin.h>
>
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
>  /* And the random ones that aren't in those files. */
>  __m64 _m_from_float(float);
>  __m64 _m_from_int(int _l);
> @@ -46,10 +50,10 @@ void __addfsword(unsigned long, unsigned
>  void __code_seg(const char *);
>  void __cpuid(int[4], int);
>  void __cpuidex(int[4], int, int);
> -void __cdecl __debugbreak(void);
> +void __debugbreak(void);
>  __int64 __emul(int, int);
>  unsigned __int64 __emulu(unsigned int, unsigned int);
> -void __fastfail(unsigned int);
> +void __cdecl __fastfail(unsigned int);
>  unsigned int __getcallerseflags(void);
>  void __halt(void);
>  unsigned char __inbyte(unsigned short);
> @@ -336,6 +340,8 @@ void __cdecl _writegsbase_u64(unsigned _
>  void __cdecl _xrstor64(void const *, unsigned __int64);
>  void __cdecl _xsave64(void *, unsigned __int64);
>  void __cdecl _xsaveopt64(void *, unsigned __int64);
> +
> +}

Shouldn't the closing brace also be guarded by #ifdef __cplusplus?



More information about the cfe-commits mailing list