[cfe-commits] r160580 - in /cfe/trunk: include/clang/Frontend/CodeGenOptions.h lib/CodeGen/CGStmt.cpp lib/Frontend/CompilerInvocation.cpp

Chad Rosier mcrosier at apple.com
Fri Jul 20 14:44:43 PDT 2012


Author: mcrosier
Date: Fri Jul 20 16:44:43 2012
New Revision: 160580

URL: http://llvm.org/viewvc/llvm-project?rev=160580&view=rev
Log:
Add the mechanics for -fms-inline-asm.  No easy way to test at this time.

Modified:
    cfe/trunk/include/clang/Frontend/CodeGenOptions.h
    cfe/trunk/lib/CodeGen/CGStmt.cpp
    cfe/trunk/lib/Frontend/CompilerInvocation.cpp

Modified: cfe/trunk/include/clang/Frontend/CodeGenOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Frontend/CodeGenOptions.h?rev=160580&r1=160579&r2=160580&view=diff
==============================================================================
--- cfe/trunk/include/clang/Frontend/CodeGenOptions.h (original)
+++ cfe/trunk/include/clang/Frontend/CodeGenOptions.h Fri Jul 20 16:44:43 2012
@@ -72,6 +72,8 @@
   unsigned EmitGcovArcs      : 1; ///< Emit coverage data files, aka. GCDA.
   unsigned EmitGcovNotes     : 1; ///< Emit coverage "notes" files, aka GCNO.
   unsigned EmitOpenCLArgMetadata : 1; /// Emit OpenCL kernel arg metadata.
+  unsigned EmitMicrosoftInlineAsm : 1; ///< Enable emission of MS-style inline
+                                       ///< assembly.
   unsigned ForbidGuardVariables : 1; ///< Issue errors if C++ guard variables
                                      ///< are required
   unsigned FunctionSections  : 1; ///< Set when -ffunction-sections is enabled
@@ -201,6 +203,7 @@
     EmitGcovArcs = 0;
     EmitGcovNotes = 0;
     EmitOpenCLArgMetadata = 0;
+    EmitMicrosoftInlineAsm = 0;
     ForbidGuardVariables = 0;
     FunctionSections = 0;
     HiddenWeakTemplateVTables = 0;

Modified: cfe/trunk/lib/CodeGen/CGStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmt.cpp?rev=160580&r1=160579&r2=160580&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGStmt.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGStmt.cpp Fri Jul 20 16:44:43 2012
@@ -1684,4 +1684,6 @@
 
 void CodeGenFunction::EmitMSAsmStmt(const MSAsmStmt &S) {
   // MS-style inline assembly is not fully supported, so sema emits a warning.
+  if (!CGM.getCodeGenOpts().EmitMicrosoftInlineAsm)
+    return;
 }

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=160580&r1=160579&r2=160580&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Fri Jul 20 16:44:43 2012
@@ -1261,6 +1261,7 @@
   Opts.EmitGcovArcs = Args.hasArg(OPT_femit_coverage_data);
   Opts.EmitGcovNotes = Args.hasArg(OPT_femit_coverage_notes);
   Opts.EmitOpenCLArgMetadata = Args.hasArg(OPT_cl_kernel_arg_info);
+  Opts.EmitMicrosoftInlineAsm = Args.hasArg(OPT_fms_inline_asm);
   Opts.CoverageFile = Args.getLastArgValue(OPT_coverage_file);
   Opts.DebugCompilationDir = Args.getLastArgValue(OPT_fdebug_compilation_dir);
   Opts.LinkBitcodeFile = Args.getLastArgValue(OPT_mlink_bitcode_file);





More information about the cfe-commits mailing list