r201709 - Only print the selected multilib when something is actually found on the host.

Yunzhong Gao Yunzhong_Gao at playstation.sony.com
Wed Feb 19 11:06:58 PST 2014


Author: ygao
Date: Wed Feb 19 13:06:58 2014
New Revision: 201709

URL: http://llvm.org/viewvc/llvm-project?rev=201709&view=rev
Log:
Only print the selected multilib when something is actually found on the host.


Modified:
    cfe/trunk/include/clang/Driver/Multilib.h
    cfe/trunk/lib/Driver/ToolChains.cpp

Modified: cfe/trunk/include/clang/Driver/Multilib.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Multilib.h?rev=201709&r1=201708&r2=201709&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Multilib.h (original)
+++ cfe/trunk/include/clang/Driver/Multilib.h Wed Feb 19 13:06:58 2014
@@ -82,6 +82,10 @@ public:
   /// Check whether any of the 'against' flags contradict the 'for' flags.
   bool isValid() const;
 
+  /// Check whether the default is selected
+  bool isDefault() const
+  { return GCCSuffix.empty() && OSSuffix.empty() && IncludeSuffix.empty(); }
+
   bool operator==(const Multilib &Other) const;
 };
 

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=201709&r1=201708&r2=201709&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Wed Feb 19 13:06:58 2014
@@ -1263,12 +1263,16 @@ void Generic_GCC::GCCInstallationDetecto
        I != E; ++I)
     OS << "Found candidate GCC installation: " << *I << "\n";
 
-  OS << "Selected GCC installation: " << GCCInstallPath << "\n";
+  if (!GCCInstallPath.empty())
+    OS << "Selected GCC installation: " << GCCInstallPath << "\n";
+
   for (MultilibSet::const_iterator I = Multilibs.begin(), E = Multilibs.end();
        I != E; ++I) {
     OS << "Candidate multiilb: " << *I << "\n";
   }
-  OS << "Selected multilib: " << SelectedMultilib << "\n";
+
+  if (Multilibs.size() != 0 || !SelectedMultilib.isDefault())
+    OS << "Selected multilib: " << SelectedMultilib << "\n";
 }
 
 bool Generic_GCC::GCCInstallationDetector::getBiarchSibling(Multilib &M) const {





More information about the cfe-commits mailing list