[PATCH] Move InterlockedBitTestAndSet into its own test file
Ehsan Akhgari
ehsan.akhgari at gmail.com
Sun Jul 6 08:23:38 PDT 2014
Hi majnemer,
This gives us back the test coverage we lost when I made
MicrosoftExtensions.c x86-only.
http://reviews.llvm.org/D4401
Files:
test/Parser/MicrosoftExtensions.c
test/Parser/MicrosoftExtensionsInlineAsm.c
Index: test/Parser/MicrosoftExtensions.c
===================================================================
--- test/Parser/MicrosoftExtensions.c
+++ test/Parser/MicrosoftExtensions.c
@@ -1,4 +1,3 @@
-// REQUIRES: x86-registered-target
// RUN: %clang_cc1 -triple i386-mingw32 -fsyntax-only -verify -fms-extensions -Wno-missing-declarations -x objective-c++ %s
__stdcall int func0();
int __stdcall func();
@@ -19,16 +18,6 @@
return((void * __ptr32) (unsigned __int32) (ULONG_PTR)p );
}
-void __forceinline InterlockedBitTestAndSet (long *Base, long Bit)
-{
- __asm {
- mov eax, Bit
- mov ecx, Base
- lock bts [ecx], eax
- setc al
- };
-}
-
// Both inline and __forceinline is OK.
inline void __forceinline pr8264() {
}
Index: test/Parser/MicrosoftExtensionsInlineAsm.c
===================================================================
--- /dev/null
+++ test/Parser/MicrosoftExtensionsInlineAsm.c
@@ -0,0 +1,13 @@
+// REQUIRES: x86-registered-target
+// RUN: %clang_cc1 -triple i386-mingw32 -fsyntax-only -verify -fms-extensions -Wno-missing-declarations -x objective-c++ %s
+// expected-no-diagnostics
+
+void __forceinline InterlockedBitTestAndSet (long *Base, long Bit)
+{
+ __asm {
+ mov eax, Bit
+ mov ecx, Base
+ lock bts [ecx], eax
+ setc al
+ };
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4401.11105.patch
Type: text/x-patch
Size: 1300 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140706/eb12b91f/attachment.bin>
More information about the cfe-commits
mailing list