[llvm] r291786 - Avoid std::errc::protocol_* to appease mingw

NAKAMURA Takumi via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 16:30:57 PST 2017


Dean, tweaked in r291863.

I think std::errc may be OS-oriented errors.

On Fri, Jan 13, 2017 at 8:46 AM Dean Michael Berris <dberris at google.com>
wrote:

> Thanks Hans -- I'll let you decide what to use instead of `bad_message`
> here that's potentially appropriate for some of the errors.
>
> On Fri, Jan 13, 2017 at 5:54 AM Hans Wennborg <hans at chromium.org> wrote:
>
> Now it's failing with xray-account.cc:466:34: error: ‘bad_message’ is
> not a member of ‘std::errc’ instead.
>
> Takumi: I'm planning on creating the 4.0.0 branch soon. Let me know if
> any fixes for this need to be merged.
>
> Thanks,
> Hans
>
> On Thu, Jan 12, 2017 at 10:45 AM, Hans Wennborg <hans at chromium.org> wrote:
> > dberris, takumi: fyi.
> >
> > On Thu, Jan 12, 2017 at 10:33 AM, Hans Wennborg via llvm-commits
> > <llvm-commits at lists.llvm.org> wrote:
> >> Author: hans
> >> Date: Thu Jan 12 12:33:14 2017
> >> New Revision: 291786
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=291786&view=rev
> >> Log:
> >> Avoid std::errc::protocol_* to appease mingw
> >>
> >> Like r291636 and r285261.
> >>
> >> Modified:
> >>     llvm/trunk/lib/XRay/Trace.cpp
> >>     llvm/trunk/tools/llvm-xray/xray-account.cc
> >>     llvm/trunk/tools/llvm-xray/xray-converter.cc
> >>
> >> Modified: llvm/trunk/lib/XRay/Trace.cpp
> >> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/XRay/Trace.cpp?rev=291786&r1=291785&r2=291786&view=diff
> >>
> ==============================================================================
> >> --- llvm/trunk/lib/XRay/Trace.cpp (original)
> >> +++ llvm/trunk/lib/XRay/Trace.cpp Thu Jan 12 12:33:14 2017
> >> @@ -144,7 +144,7 @@ Expected<Trace> llvm::xray::loadTraceFil
> >>    if (FileSize < 4) {
> >>      return make_error<StringError>(
> >>          Twine("File '") + Filename + "' too small for XRay.",
> >> -        std::make_error_code(std::errc::protocol_error));
> >> +        std::make_error_code(std::errc::executable_format_error));
> >>    }
> >>
> >>    // Attempt to mmap the file.
> >>
> >> Modified: llvm/trunk/tools/llvm-xray/xray-account.cc
> >> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-xray/xray-account.cc?rev=291786&r1=291785&r2=291786&view=diff
> >>
> ==============================================================================
> >> --- llvm/trunk/tools/llvm-xray/xray-account.cc (original)
> >> +++ llvm/trunk/tools/llvm-xray/xray-account.cc Thu Jan 12 12:33:14 2017
> >> @@ -477,7 +477,7 @@ static CommandRegistration Unused(&Accou
> >>      return joinErrors(
> >>          make_error<StringError>(
> >>              Twine("Failed loading input file '") + AccountInput + "'",
> >> -            std::make_error_code(std::errc::protocol_error)),
> >> +            std::make_error_code(std::errc::executable_format_error)),
> >>          TraceOrErr.takeError());
> >>    }
> >>
> >>
> >> Modified: llvm/trunk/tools/llvm-xray/xray-converter.cc
> >> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-xray/xray-converter.cc?rev=291786&r1=291785&r2=291786&view=diff
> >>
> ==============================================================================
> >> --- llvm/trunk/tools/llvm-xray/xray-converter.cc (original)
> >> +++ llvm/trunk/tools/llvm-xray/xray-converter.cc Thu Jan 12 12:33:14
> 2017
> >> @@ -192,7 +192,7 @@ static CommandRegistration Unused(&Conve
> >>      return joinErrors(
> >>          make_error<StringError>(
> >>              Twine("Failed loading input file '") + ConvertInput + "'.",
> >> -            std::make_error_code(std::errc::protocol_error)),
> >> +            std::make_error_code(std::errc::executable_format_error)),
> >>          TraceOrErr.takeError());
> >>    }
> >>    return Error::success();
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170113/47dc2607/attachment.html>


More information about the llvm-commits mailing list