[cfe-commits] r118386 - /cfe/trunk/lib/Driver/ToolChains.cpp

Rafael Espindola rafael.espindola at gmail.com
Sun Nov 7 15:13:01 PST 2010


Author: rafael
Date: Sun Nov  7 17:13:01 2010
New Revision: 118386

URL: http://llvm.org/viewvc/llvm-project?rev=118386&view=rev
Log:
Use the integrated assembler when procession .s files on OpenBSD and Linux.
Original patch for OpenBSD by Vladimir Kirillov.

Modified:
    cfe/trunk/lib/Driver/ToolChains.cpp

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=118386&r1=118385&r2=118386&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Sun Nov  7 17:13:01 2010
@@ -1044,11 +1044,20 @@
   else
     Key = JA.getKind();
 
+  bool UseIntegratedAs = C.getArgs().hasFlag(options::OPT_integrated_as,
+                                             options::OPT_no_integrated_as,
+                                             IsIntegratedAssemblerDefault());
+
   Tool *&T = Tools[Key];
   if (!T) {
     switch (Key) {
-    case Action::AssembleJobClass:
-      T = new tools::openbsd::Assemble(*this); break;
+    case Action::AssembleJobClass: {
+      if (UseIntegratedAs)
+        T = new tools::ClangAs(*this);
+      else
+        T = new tools::openbsd::Assemble(*this);
+      break;
+    }
     case Action::LinkJobClass:
       T = new tools::openbsd::Link(*this); break;
     default:
@@ -1398,11 +1407,19 @@
   else
     Key = JA.getKind();
 
+  bool UseIntegratedAs = C.getArgs().hasFlag(options::OPT_integrated_as,
+                                             options::OPT_no_integrated_as,
+                                             IsIntegratedAssemblerDefault());
+
   Tool *&T = Tools[Key];
   if (!T) {
     switch (Key) {
     case Action::AssembleJobClass:
-      T = new tools::linuxtools::Assemble(*this); break;
+      if (UseIntegratedAs)
+        T = new tools::ClangAs(*this);
+      else
+        T = new tools::linuxtools::Assemble(*this);
+      break;
     case Action::LinkJobClass:
       T = new tools::linuxtools::Link(*this); break;
     default:





More information about the cfe-commits mailing list