r180658 - Fix the dangling pointer.
Jordan Rose
jordan_rose at apple.com
Fri Apr 26 18:16:43 PDT 2013
Actually, this should probably get off PathV1.h altogether, and just use llvm::sys::fs::current_path in FileSystem.h.
Sorry for asking you to change this again...
On Apr 26, 2013, at 17:57 , Chad Rosier <mcrosier at apple.com> wrote:
> Author: mcrosier
> Date: Fri Apr 26 19:57:18 2013
> New Revision: 180658
>
> URL: http://llvm.org/viewvc/llvm-project?rev=180658&view=rev
> Log:
> Fix the dangling pointer.
>
> Modified:
> cfe/trunk/lib/Driver/Tools.cpp
>
> Modified: cfe/trunk/lib/Driver/Tools.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=180658&r1=180657&r2=180658&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/Tools.cpp (original)
> +++ cfe/trunk/lib/Driver/Tools.cpp Fri Apr 26 19:57:18 2013
> @@ -1792,8 +1792,8 @@ static void addDebugCompDirArg(const Arg
> return;
> }
> // Fall back to using getcwd.
> - const char *cwd = llvm::sys::Path::GetCurrentDirectory().c_str();
> - if (pwd && cwd) {
> + std::string cwd = llvm::sys::Path::GetCurrentDirectory().str();
> + if (pwd && !cwd.empty()) {
> CmdArgs.push_back("-fdebug-compilation-dir");
> CmdArgs.push_back(Args.MakeArgString(cwd));
> }
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130426/e30d0b0d/attachment.html>
More information about the cfe-commits
mailing list