Use FindProgramByName instead of FindExecutable.
authorDevang Patel <dpatel@apple.com>
Mon, 9 Oct 2006 21:16:05 +0000 (21:16 +0000)
committerDevang Patel <dpatel@apple.com>
Mon, 9 Oct 2006 21:16:05 +0000 (21:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30846 91177308-0d34-0410-b5e6-96231b3b80d8

tools/lto/lto.cpp

index a64130dc7ad730fd6137f4adf7eaab550b281ea9..c4face2712abe163c71a25012719daa41bbefea8 100644 (file)
@@ -386,7 +386,7 @@ LTO::optimizeModules(const std::string &OutputFilename,
   //  We can't just assemble and link the file with the system assembler
   //  and linker because we don't know where to put the _start symbol.
   //  GCC mysteriously knows how to do it.
-  const sys::Path gcc = FindExecutable("gcc", "/");
+  const sys::Path gcc = sys::Program::FindProgramByName("gcc");
   if (gcc.isEmpty()) {
     tmpAsmFilePath.eraseFromDisk();
     TempDir.eraseFromDisk(true);