r176876 - Revert "Disallow using -fmodules with -no-integrated-as."

Ted Kremenek kremenek at apple.com
Tue Mar 12 10:02:12 PDT 2013


Author: kremenek
Date: Tue Mar 12 12:02:12 2013
New Revision: 176876

URL: http://llvm.org/viewvc/llvm-project?rev=176876&view=rev
Log:
Revert "Disallow using -fmodules with -no-integrated-as."

Per comment from Benjamin Kramer, this isn't portable (yet).  I'll come up
with a better fix.

Removed:
    cfe/trunk/test/Driver/modules_integrated_as.c
Modified:
    cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td?rev=176876&r1=176875&r2=176876&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td Tue Mar 12 12:02:12 2013
@@ -75,7 +75,7 @@ def err_drv_invalid_libcxx_deployment :
   "invalid deployment target for -stdlib=libc++ (requires %0 or later)">;
 def err_drv_invalid_feature : Error<
   "invalid feature '%0' for CPU '%1'">;
-  
+
 def err_drv_I_dash_not_supported : Error<
   "'%0' not supported, please use -iquote instead">;
 def err_drv_unknown_argument : Error<"unknown argument: '%0'">;
@@ -150,9 +150,4 @@ def err_analyzer_config_no_value : Error
   "analyzer-config option '%0' has a key but no value">;
 def err_analyzer_config_multiple_values : Error<
   "analyzer-config option '%0' should contain only one '='">;
-  
-def err_drv_modules_integrated_as : Error<
-  "modules can only be used with the compiler's integrated assembler">;
-def note_drv_modules_integrated_as : Note<
-  "'-no-integrated-as' cannot be used with '-fmodules'">;
 }

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=176876&r1=176875&r2=176876&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Mar 12 12:02:12 2013
@@ -1429,18 +1429,12 @@ static bool ShouldDisableCFI(const ArgLi
                        Default);
 }
 
-static bool ShouldUseIntegratedAssembler(const ArgList &Args,
-                                         const ToolChain &TC) {
+static bool ShouldDisableDwarfDirectory(const ArgList &Args,
+                                        const ToolChain &TC) {
   bool IsIADefault = TC.IsIntegratedAssemblerDefault();
   bool UseIntegratedAs = Args.hasFlag(options::OPT_integrated_as,
                                       options::OPT_no_integrated_as,
                                       IsIADefault);
-  return UseIntegratedAs;
-}
-
-static bool ShouldDisableDwarfDirectory(const ArgList &Args,
-                                        const ToolChain &TC) {
-  bool UseIntegratedAs = ShouldUseIntegratedAssembler(Args, TC);
   bool UseDwarfDirectory = Args.hasFlag(options::OPT_fdwarf_directory_asm,
                                         options::OPT_fno_dwarf_directory_asm,
                                         UseIntegratedAs);
@@ -2784,12 +2778,6 @@ void Clang::ConstructJob(Compilation &C,
       CmdArgs.push_back("-fmodules");
       HaveModules = true;
     }
-
-    if (HaveModules && !ShouldUseIntegratedAssembler(Args, getToolChain())) {
-      D.Diag(diag::err_drv_modules_integrated_as);
-      D.Diag(diag::note_drv_modules_integrated_as);
-      return;
-    }
   }
 
   // If a module path was provided, pass it along. Otherwise, use a temporary

Removed: cfe/trunk/test/Driver/modules_integrated_as.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/modules_integrated_as.c?rev=176875&view=auto
==============================================================================
--- cfe/trunk/test/Driver/modules_integrated_as.c (original)
+++ cfe/trunk/test/Driver/modules_integrated_as.c (removed)
@@ -1,4 +0,0 @@
-// RUN: %clang -fmodules -no-integrated-as -fsyntax-only %s 2>&1 | FileCheck %s
-
-// CHECK: error: modules can only be used with the compiler's integrated assembler
-// CHECK note: '-no-integrated-as' cannot be used with '-fmodules'





More information about the cfe-commits mailing list