[cfe-commits] r72418 - /cfe/trunk/tools/driver/driver.cpp
Fariborz Jahanian
fjahanian at apple.com
Tue May 26 09:27:03 PDT 2009
On May 26, 2009, at 9:15 AM, Daniel Dunbar wrote:
> Author: ddunbar
> Date: Tue May 26 11:15:44 2009
> New Revision: 72418
>
> URL: http://llvm.org/viewvc/llvm-project?rev=72418&view=rev
> Log:
> The driver/diagnostic client don't need to be on the heap.
>
> Modified:
> cfe/trunk/tools/driver/driver.cpp
>
> Modified: cfe/trunk/tools/driver/driver.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/driver.cpp?rev=72418&r1=72417&r2=72418&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/tools/driver/driver.cpp (original)
> +++ cfe/trunk/tools/driver/driver.cpp Tue May 26 11:15:44 2009
> @@ -169,15 +169,13 @@
> 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;
>
> @@ -190,8 +188,8 @@
>
> ApplyQAOverride(StringPointers, OverrideStr, SavedStrings);
>
> - C.reset(TheDriver->BuildCompilation(StringPointers.size(),
> - &StringPointers[0]));
> + C.reset(TheDriver.BuildCompilation(StringPointers.size(),
> + &StringPointers[0]));
Is this a candidate to change to StringPointers.data()?
- Fariborz
More information about the cfe-commits
mailing list