[cfe-commits] r169445 - in /cfe/trunk: lib/Frontend/CompilerInvocation.cpp test/Parser/MicrosoftExtensions.c
Chad Rosier
mcrosier at apple.com
Wed Dec 5 15:08:09 PST 2012
Author: mcrosier
Date: Wed Dec 5 17:08:09 2012
New Revision: 169445
URL: http://llvm.org/viewvc/llvm-project?rev=169445&view=rev
Log:
[driver, ms-inline asm] Have -fms-extensions enable the AsmBlocks language
option. MS-style inline asm can now be enabled by either -fasm-blocks or
-fms-extensions.
rdar://12808010
Modified:
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
cfe/trunk/test/Parser/MicrosoftExtensions.c
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=169445&r1=169444&r2=169445&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Wed Dec 5 17:08:09 2012
@@ -1172,7 +1172,7 @@
Opts.MicrosoftExt
= Args.hasArg(OPT_fms_extensions) || Args.hasArg(OPT_fms_compatibility);
Opts.MicrosoftMode = Args.hasArg(OPT_fms_compatibility);
- Opts.AsmBlocks = Args.hasArg(OPT_fasm_blocks);
+ Opts.AsmBlocks = Args.hasArg(OPT_fasm_blocks) || Args.hasArg(OPT_fms_extensions);
Opts.MSCVersion = Args.getLastArgIntValue(OPT_fmsc_version, 0, Diags);
Opts.Borland = Args.hasArg(OPT_fborland_extensions);
Opts.WritableStrings = Args.hasArg(OPT_fwritable_strings);
Modified: cfe/trunk/test/Parser/MicrosoftExtensions.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/MicrosoftExtensions.c?rev=169445&r1=169444&r2=169445&view=diff
==============================================================================
--- cfe/trunk/test/Parser/MicrosoftExtensions.c (original)
+++ cfe/trunk/test/Parser/MicrosoftExtensions.c Wed Dec 5 17:08:09 2012
@@ -18,6 +18,15 @@
return((void * __ptr32) (unsigned __int32) (ULONG_PTR)p );
}
+void __forceinline InterlockedBitTestAndSet (long *Base, long Bit)
+{
+ __asm { // expected-warning {{MS-style inline assembly is not supported}}
+ mov eax, Bit
+ mov ecx, Base
+ lock bts [ecx], eax
+ setc al
+ };
+}
_inline int foo99() { return 99; }
void test_ms_alignof_alias() {
More information about the cfe-commits
mailing list