This is an archive of the discontinued LLVM Phabricator instance.

Use std::make_tuple instead initializer list
ClosedPublic

Authored by antiagainst on Jun 22 2020, 12:34 PM.

Details

Summary

Hopefully this pleases GCC-5 and fixes the build error:

LowerExpectIntrinsic.cpp:62:53: error: converting to
'std::tuple<unsigned int, unsigned int>' from initializer list would use
explicit constructor 'constexpr std::tuple<_T1, _T2>::tuple(_U1&&,
_U2&&) [with _U1 = llvm:๐Ÿ†‘:opt<unsigned int>&; _U2 =
llvm:๐Ÿ†‘:opt<unsigned int>&; <template-parameter-2-3> = void; _T1 =
unsigned int; _T2 = unsigned int]'

return {LikelyBranchWeight, UnlikelyBranchWeight};

Diff Detail

Event Timeline

antiagainst created this revision.Jun 22 2020, 12:34 PM
Herald added a project: Restricted Project. ยท View Herald TranscriptJun 22 2020, 12:34 PM
antiagainst retitled this revision from Use stdd::make_tuple instead initializer list to Use std::make_tuple instead initializer list.Jun 22 2020, 12:37 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jun 22 2020, 12:55 PM
This revision was automatically updated to reflect the committed changes.

Thank you very much for fixing! It looks good to me, while it seems to fail build for some other reason..