[llvm] r220918 - Fix Twine corruption problem with diagnostics.

Eric Christopher echristo at gmail.com
Thu Oct 30 13:59:30 PDT 2014


FWIW I'd rather we not store the Twine in the class...

-eric

On Thu Oct 30 2014 at 12:01:57 PM Diego Novillo <dnovillo at google.com> wrote:

> Author: dnovillo
> Date: Thu Oct 30 13:48:41 2014
> New Revision: 220918
>
> URL: http://llvm.org/viewvc/llvm-project?rev=220918&view=rev
> Log:
> Fix Twine corruption problem with diagnostics.
>
> This fixes the autobuilders I broke with a recent patch. Thanks echristo
> and dblaikie for beating me with a clue stick.
>
> Modified:
>     llvm/trunk/lib/Transforms/Scalar/SampleProfile.cpp
>
> Modified: llvm/trunk/lib/Transforms/Scalar/SampleProfile.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/
> SampleProfile.cpp?rev=220918&r1=220917&r2=220918&view=diff
> ============================================================
> ==================
> --- llvm/trunk/lib/Transforms/Scalar/SampleProfile.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/SampleProfile.cpp Thu Oct 30
> 13:48:41 2014
> @@ -740,8 +740,7 @@ bool SampleProfileLoader::doInitializati
>    if (std::error_code EC =
>            SampleProfileReader::create(Filename, Reader, M.getContext()))
> {
>      std::string Msg = "Could not open profile: " + EC.message();
> -    DiagnosticInfoSampleProfile Diag(Filename.data(), Msg);
> -    M.getContext().diagnose(Diag);
> +    M.getContext().diagnose(DiagnosticInfoSampleProfile(Filename.data(),
> Msg));
>      return false;
>    }
>    ProfileIsValid = (Reader->read() == sampleprof_error::success);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141030/c192742f/attachment.html>


More information about the llvm-commits mailing list