Remove FindProgramByName. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221258 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2014-11-04 12:35:47 +00:00
parent 3f4bf44b1c
commit 5dac5bd225
4 changed files with 5 additions and 100 deletions

View File

@@ -328,9 +328,11 @@ static bool printSymbolizedStackTrace(void **StackTrace, int Depth, FILE *FD) {
// FIXME: Subtract necessary number from StackTrace entries to turn return addresses
// into actual instruction addresses.
// Use llvm-symbolizer tool to symbolize the stack traces.
std::string LLVMSymbolizerPath = sys::FindProgramByName("llvm-symbolizer");
if (LLVMSymbolizerPath.empty())
ErrorOr<std::string> LLVMSymbolizerPathOrErr =
sys::findProgramByName("llvm-symbolizer");
if (!LLVMSymbolizerPathOrErr)
return false;
const std::string &LLVMSymbolizerPath = *LLVMSymbolizerPathOrErr;
// We don't know argv0 or the address of main() at this point, but try
// to guess it anyway (it's possible on some platforms).
std::string MainExecutableName = sys::fs::getMainExecutable(nullptr, nullptr);