[llvm] r203976 - Use DiagnosticInfo facility.

Diego Novillo dnovillo at google.com
Mon Mar 17 06:58:23 PDT 2014


On Fri, Mar 14, 2014 at 8:25 PM, NAKAMURA Takumi <geek4civic at gmail.com> wrote:
> The life of Twine is too short. Tweaked in r203990. For example,
>
> +  if (EC) {
> +    std::string Msg(EC.message());
> +    DiagnosticInfoSampleProfile Diag(Filename.data(), Msg);
> +    M.getContext().diagnose(Diag);
> +    return false;
> +  }
>
> A temporary Twine(Msg) is created on Diag(Msg), ... and Twine would
> not live in the next statement.

Oops, thanks. I missed that.


Diego.



More information about the llvm-commits mailing list