llvm::PrettyStackTraceProgram X(argc, argv);
llvm::sys::Path Path = GetExecutablePath(argv[0]);
- llvm::OwningPtr<DiagnosticClient>
- DiagClient(new DriverDiagnosticPrinter(Path.getBasename(), llvm::errs()));
+ DriverDiagnosticPrinter DiagClient(Path.getBasename(), llvm::errs());
- Diagnostic Diags(DiagClient.get());
+ Diagnostic Diags(&DiagClient);
- llvm::OwningPtr<Driver>
- TheDriver(new Driver(Path.getBasename().c_str(), Path.getDirname().c_str(),
- llvm::sys::getHostTriple().c_str(),
- "a.out", Diags));
+ Driver TheDriver(Path.getBasename().c_str(), Path.getDirname().c_str(),
+ llvm::sys::getHostTriple().c_str(),
+ "a.out", Diags);
llvm::OwningPtr<Compilation> C;
ApplyQAOverride(StringPointers, OverrideStr, SavedStrings);
- C.reset(TheDriver->BuildCompilation(StringPointers.size(),
- &StringPointers[0]));
+ C.reset(TheDriver.BuildCompilation(StringPointers.size(),
+ &StringPointers[0]));
} else if (const char *Cur = ::getenv("CCC_ADD_ARGS")) {
std::vector<const char*> StringPointers;
StringPointers.insert(StringPointers.end(), argv + 1, argv + argc);
- C.reset(TheDriver->BuildCompilation(StringPointers.size(),
- &StringPointers[0]));
+ C.reset(TheDriver.BuildCompilation(StringPointers.size(),
+ &StringPointers[0]));
} else
- C.reset(TheDriver->BuildCompilation(argc, argv));
+ C.reset(TheDriver.BuildCompilation(argc, argv));
int Res = 0;
if (C.get())