Very nice, thanks for keeping to work on this.<br><br><div class="gmail_quote">On Tue, Jan 22, 2013 at 7:38 PM, Chad Rosier <span dir="ltr"><<a href="mailto:mcrosier@apple.com" target="_blank">mcrosier@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: mcrosier<br>
Date: Tue Jan 22 13:38:32 2013<br>
New Revision: 173186<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=173186&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=173186&view=rev</a><br>
Log:<br>
[ms-inline asm] Remove the -fenable-experimental-ms-inline-asm flag. MS-style<br>
inline assembly can be enable with -fasm-blocks or -fms-extensions alone.<br>
<br>
Modified:<br>
cfe/trunk/include/clang/Basic/LangOptions.def<br>
cfe/trunk/include/clang/Driver/Options.td<br>
cfe/trunk/lib/Driver/Tools.cpp<br>
cfe/trunk/lib/Frontend/CompilerInvocation.cpp<br>
cfe/trunk/lib/Parse/ParseStmt.cpp<br>
cfe/trunk/test/CodeGen/ms-inline-asm-64.c<br>
cfe/trunk/test/CodeGen/ms-inline-asm.c<br>
cfe/trunk/test/Driver/clang_f_opts.c<br>
cfe/trunk/test/Sema/ms-inline-asm.c<br>
<br>
Modified: cfe/trunk/include/clang/Basic/LangOptions.def<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/LangOptions.def?rev=173186&r1=173185&r2=173186&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/LangOptions.def?rev=173186&r1=173185&r2=173186&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Basic/LangOptions.def (original)<br>
+++ cfe/trunk/include/clang/Basic/LangOptions.def Tue Jan 22 13:38:32 2013<br>
@@ -164,10 +164,6 @@<br>
<br>
LANGOPT(ApplePragmaPack, 1, 0, "Apple gcc-compatible #pragma pack handling")<br>
<br>
-BENIGN_LANGOPT(EmitMicrosoftInlineAsm , 1, 0,<br>
- "Enable emission of MS-style inline assembly.")<br>
-<br>
-<br>
BENIGN_LANGOPT(RetainCommentsFromSystemHeaders, 1, 0, "retain documentation comments from system headers in the AST")<br>
<br>
#undef LANGOPT<br>
<br>
Modified: cfe/trunk/include/clang/Driver/Options.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=173186&r1=173185&r2=173186&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=173186&r1=173185&r2=173186&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/include/clang/Driver/Options.td (original)<br>
+++ cfe/trunk/include/clang/Driver/Options.td Tue Jan 22 13:38:32 2013<br>
@@ -476,8 +476,6 @@<br>
def fmessage_length_EQ : Joined<["-"], "fmessage-length=">, Group<f_Group>;<br>
def fms_extensions : Flag<["-"], "fms-extensions">, Group<f_Group>, Flags<[CC1Option]>,<br>
HelpText<"Accept some non-standard constructs supported by the Microsoft compiler">;<br>
-def fenable_experimental_ms_inline_asm : Flag<["-"], "fenable-experimental-ms-inline-asm">, Group<f_Group>, Flags<[CC1Option]>,<br>
- HelpText<"Enable support for Microsoft style inine assembly">;<br>
def fms_compatibility : Flag<["-"], "fms-compatibility">, Group<f_Group>, Flags<[CC1Option]>,<br>
HelpText<"Enable Microsoft compatibility mode">;<br>
def fmsc_version : Joined<["-"], "fmsc-version=">, Group<f_Group>, Flags<[CC1Option]>,<br>
<br>
Modified: cfe/trunk/lib/Driver/Tools.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=173186&r1=173185&r2=173186&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=173186&r1=173185&r2=173186&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Driver/Tools.cpp (original)<br>
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Jan 22 13:38:32 2013<br>
@@ -2715,10 +2715,6 @@<br>
getToolChain().getTriple().getOS() == llvm::Triple::Win32))<br>
CmdArgs.push_back("-fms-extensions");<br>
<br>
- // -fms-inline-asm.<br>
- if (Args.hasArg(options::OPT_fenable_experimental_ms_inline_asm))<br>
- CmdArgs.push_back("-fenable-experimental-ms-inline-asm");<br>
-<br>
// -fms-compatibility=0 is default.<br>
if (Args.hasFlag(options::OPT_fms_compatibility,<br>
options::OPT_fno_ms_compatibility,<br>
<br>
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=173186&r1=173185&r2=173186&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=173186&r1=173185&r2=173186&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)<br>
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Tue Jan 22 13:38:32 2013<br>
@@ -1265,8 +1265,6 @@<br>
Opts.FastMath = Args.hasArg(OPT_ffast_math);<br>
Opts.FiniteMathOnly = Args.hasArg(OPT_ffinite_math_only);<br>
<br>
- Opts.EmitMicrosoftInlineAsm = Args.hasArg(OPT_fenable_experimental_ms_inline_asm);<br>
-<br>
Opts.RetainCommentsFromSystemHeaders =<br>
Args.hasArg(OPT_fretain_comments_from_system_headers);<br>
<br>
<br>
Modified: cfe/trunk/lib/Parse/ParseStmt.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseStmt.cpp?rev=173186&r1=173185&r2=173186&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseStmt.cpp?rev=173186&r1=173185&r2=173186&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Parse/ParseStmt.cpp (original)<br>
+++ cfe/trunk/lib/Parse/ParseStmt.cpp Tue Jan 22 13:38:32 2013<br>
@@ -1771,21 +1771,6 @@<br>
return StmtError();<br>
}<br>
<br>
- // If MS-style inline assembly is disabled, then build an empty asm.<br>
- if (!getLangOpts().EmitMicrosoftInlineAsm) {<br>
- Token t;<br>
- t.setKind(tok::string_literal);<br>
- t.setLiteralData("\"/*FIXME: not done*/\"");<br>
- t.clearFlag(Token::NeedsCleaning);<br>
- t.setLength(21);<br>
- ExprResult AsmString(Actions.ActOnStringLiteral(&t, 1));<br>
- ExprVector Constraints;<br>
- ExprVector Exprs;<br>
- ExprVector Clobbers;<br>
- return Actions.ActOnGCCAsmStmt(AsmLoc, true, true, 0, 0, 0, Constraints,<br>
- Exprs, AsmString.take(), Clobbers, EndLoc);<br>
- }<br>
-<br>
// FIXME: We should be passing source locations for better diagnostics.<br>
return Actions.ActOnMSAsmStmt(AsmLoc, LBraceLoc,<br>
llvm::makeArrayRef(AsmToks), EndLoc);<br>
<br>
Modified: cfe/trunk/test/CodeGen/ms-inline-asm-64.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-inline-asm-64.c?rev=173186&r1=173185&r2=173186&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-inline-asm-64.c?rev=173186&r1=173185&r2=173186&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGen/ms-inline-asm-64.c (original)<br>
+++ cfe/trunk/test/CodeGen/ms-inline-asm-64.c Tue Jan 22 13:38:32 2013<br>
@@ -1,5 +1,5 @@<br>
// REQUIRES: x86-64-registered-target<br>
-// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -O0 -fasm-blocks -fenable-experimental-ms-inline-asm -w -emit-llvm -o - | FileCheck %s<br>
+// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -O0 -fasm-blocks -emit-llvm -o - | FileCheck %s<br>
<br>
void t1() {<br>
int var = 10;<br>
<br>
Modified: cfe/trunk/test/CodeGen/ms-inline-asm.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-inline-asm.c?rev=173186&r1=173185&r2=173186&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-inline-asm.c?rev=173186&r1=173185&r2=173186&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/CodeGen/ms-inline-asm.c (original)<br>
+++ cfe/trunk/test/CodeGen/ms-inline-asm.c Tue Jan 22 13:38:32 2013<br>
@@ -1,5 +1,5 @@<br>
// REQUIRES: x86-64-registered-target<br>
-// RUN: %clang_cc1 %s -triple i386-apple-darwin10 -O0 -fasm-blocks -fenable-experimental-ms-inline-asm -w -emit-llvm -o - | FileCheck %s<br>
+// RUN: %clang_cc1 %s -triple i386-apple-darwin10 -O0 -fasm-blocks -emit-llvm -o - | FileCheck %s<br>
<br>
void t1() {<br>
// CHECK: @t1<br>
<br>
Modified: cfe/trunk/test/Driver/clang_f_opts.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang_f_opts.c?rev=173186&r1=173185&r2=173186&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang_f_opts.c?rev=173186&r1=173185&r2=173186&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Driver/clang_f_opts.c (original)<br>
+++ cfe/trunk/test/Driver/clang_f_opts.c Tue Jan 22 13:38:32 2013<br>
@@ -36,9 +36,6 @@<br>
// FP-CONTRACT-FAST-CHECK: -ffp-contract=fast<br>
// FP-CONTRACT-OFF-CHECK: -ffp-contract=off<br>
<br>
-// RUN: %clang -fms-extensions -fenable-experimental-ms-inline-asm %s -### 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS3 %s<br>
-// CHECK-OPTIONS3: -fenable-experimental-ms-inline-asm<br>
-<br>
// RUN: %clang -### -S -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s<br>
// RUN: %clang -### -S -fno-vectorize -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s<br>
// RUN: %clang -### -S -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s<br>
<br>
Modified: cfe/trunk/test/Sema/ms-inline-asm.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/ms-inline-asm.c?rev=173186&r1=173185&r2=173186&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/ms-inline-asm.c?rev=173186&r1=173185&r2=173186&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/test/Sema/ms-inline-asm.c (original)<br>
+++ cfe/trunk/test/Sema/ms-inline-asm.c Tue Jan 22 13:38:32 2013<br>
@@ -1,5 +1,5 @@<br>
// REQUIRES: x86-64-registered-target<br>
-// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -fasm-blocks -fenable-experimental-ms-inline-asm -Wno-microsoft -verify -fsyntax-only<br>
+// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -fasm-blocks -Wno-microsoft -verify -fsyntax-only<br>
<br>
void t1(void) {<br>
__asm __asm // expected-error {{__asm used with no assembly instructions}}<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>João Matos