Driver: Lookup program names using llvm::sys::Program::FindProgramByName 
if our usual methods fail. This isn't necessary for running the tool,
but improves the accuracy of logging output.

Also, have GCC tools lookup gcc program path.

llvm-svn: 67243
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 6c0668b..85debe8 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -26,6 +26,7 @@
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/System/Path.h"
+#include "llvm/System/Program.h"
 
 #include "InputInfo.h"
 
@@ -879,6 +880,11 @@
   if (P.exists())
     return P;
 
+  // Search path to increase accuracy of logging output.
+  P = llvm::sys::Program::FindProgramByName(Name);
+  if (!P.empty())
+    return P;
+
   return llvm::sys::Path(Name);
 }