Have sys::FindProgramByName return a std::string.
[oota-llvm.git] / utils / not / not.cpp
index bb2d87bb44d4dcb59dad48dbe7ca250a8756d268..45322ecffc3544f912a5c51f7abc70e0504abd62 100644 (file)
 using namespace llvm;
 
 int main(int argc, const char **argv) {
-  sys::Path Program = sys::FindProgramByName(argv[1]);
+  std::string Program = sys::FindProgramByName(argv[1]);
 
   std::string ErrMsg;
-  int Result = sys::ExecuteAndWait(Program, argv + 1, 0, 0, 0, 0, &ErrMsg);
+  int Result =
+      sys::ExecuteAndWait(sys::Path(Program), argv + 1, 0, 0, 0, 0, &ErrMsg);
   if (Result < 0) {
     errs() << "Error: " << ErrMsg << "\n";
     return 1;