diff --git a/clang/lib/Headers/Intrin.h b/clang/lib/Headers/Intrin.h index b80fa1e4cb98..a2c361c0288a 100644 --- a/clang/lib/Headers/Intrin.h +++ b/clang/lib/Headers/Intrin.h @@ -341,9 +341,11 @@ void __cdecl _xrstor64(void const *, unsigned __int64); void __cdecl _xsave64(void *, unsigned __int64); void __cdecl _xsaveopt64(void *, unsigned __int64); +#endif /* __X86_64__ */ + #ifdef __cplusplus } #endif -#endif -#endif -#endif + +#endif /* __INTRIN_H */ +#endif /* _MSC_VER */ diff --git a/clang/test/Headers/ms-intrin.cpp b/clang/test/Headers/ms-intrin.cpp new file mode 100644 index 000000000000..d44fc4849304 --- /dev/null +++ b/clang/test/Headers/ms-intrin.cpp @@ -0,0 +1,6 @@ +// RUN: %clang -target i386-pc-win32 -fms-extensions -fsyntax-only %s + +#include + +template +void foo(T V) {}