This is an archive of the discontinued LLVM Phabricator instance.

Try to unbreak Win build differently after 973519826edb76
ClosedPublic

Authored by thakis on Sep 2 2021, 9:44 AM.

Details

Summary

Looks like the MS STL wants StringMapKeyIterator::operator*() to be const.
Return the result by copy instead of reference to do that.
Assigning to a hash map key iterator doesn't make sense anyways.

Also reverts 123f811fe5b0b which is now hopefully no longer needed.

Diff Detail

Event Timeline

thakis created this revision.Sep 2 2021, 9:44 AM
thakis requested review of this revision.Sep 2 2021, 9:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 2 2021, 9:44 AM
hans accepted this revision.Sep 2 2021, 9:57 AM
This revision is now accepted and ready to land.Sep 2 2021, 9:57 AM
This revision was landed with ongoing or failed builds.Sep 2 2021, 11:46 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 2 2021, 11:46 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

I'm seeing a build failure coming out of this:

llvm-project/lld/wasm/Writer.cpp:521:16: error: non-const lvalue reference to type 'llvm::StringRef' cannot bind to a temporary of type 'llvm::StringRef'

for (auto &feature : used.keys()) {

Looks like pre-merge checks failed with the same error: https://buildkite.com/llvm-project/premerge-checks/builds/54930#07373971-3d37-49cf-9def-22c0d724ee23

I'm seeing a build failure coming out of this:

llvm-project/lld/wasm/Writer.cpp:521:16: error: non-const lvalue reference to type 'llvm::StringRef' cannot bind to a temporary of type 'llvm::StringRef'

for (auto &feature : used.keys()) {

Looks like pre-merge checks failed with the same error: https://buildkite.com/llvm-project/premerge-checks/builds/54930#07373971-3d37-49cf-9def-22c0d724ee23

I had fixed this in https://github.com/llvm/llvm-project/commit/9d227543890e721b95303430ee1427ce5aa7292f . Precommit bot on this change was green though as far as I can tell.

I had fixed this in https://github.com/llvm/llvm-project/commit/9d227543890e721b95303430ee1427ce5aa7292f . Precommit bot on this change was green though as far as I can tell.

Harbormaster comments with a green check mark that build has completed, but if you look at the top of the revision it has the build results. For some reason that I don't understand, the actual status at the top disappears as soon as the commit has landed, which is... very unhelpful. If you click on the Harbormaster comment now, you can see that they failed. I've reopened a diff with https://reviews.llvm.org/D109181 and will reland if premerge checks pass. Sorry that my revert went past the fix. AFAIU, I was following the guidelines in https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy. I think it would be nice to comment on the review that you are already preparing a fix (but I have no idea what the standard practice is). If I had known you were then I wouldn't have reverted.

I had fixed this in https://github.com/llvm/llvm-project/commit/9d227543890e721b95303430ee1427ce5aa7292f . Precommit bot on this change was green though as far as I can tell.

Harbormaster comments with a green check mark that build has completed, but if you look at the top of the revision it has the build results. For some reason that I don't understand, the actual status at the top disappears as soon as the commit has landed, which is... very unhelpful. If you click on the Harbormaster comment now, you can see that they failed. I've reopened a diff with https://reviews.llvm.org/D109181 and will reland if premerge checks pass. Sorry that my revert went past the fix. AFAIU, I was following the guidelines in https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy. I think it would be nice to comment on the review that you are already preparing a fix (but I have no idea what the standard practice is). If I had known you were then I wouldn't have reverted.

@goncharov @mehdi_amini is there a way to change the way the phab UI or the pre-merge checks work here to make failing pre-merge checks clearer? This isn't the first time I've seen someone be very confused about this UI

I had fixed this in https://github.com/llvm/llvm-project/commit/9d227543890e721b95303430ee1427ce5aa7292f . Precommit bot on this change was green though as far as I can tell.

Harbormaster comments with a green check mark that build has completed, but if you look at the top of the revision it has the build results.

Thanks, I didn't realize this. I thought this passed precommit, else I wouldn't have landed it.

Perfectly fine to revert things that break the build of course. Timing was a bit unfortunate, but reverting broken things is of course A-ok (especially with failing pre-merge testing). Thanks for relanding :)

For some reason that I don't understand, the actual status at the top disappears as soon as the commit has landed, which is... very unhelpful. If you click on the Harbormaster comment now, you can see that they failed. I've reopened a diff with https://reviews.llvm.org/D109181 and will reland if premerge checks pass. Sorry that my revert went past the fix. AFAIU, I was following the guidelines in https://llvm.org/docs/DeveloperPolicy.html#patch-reversion-policy. I think it would be nice to comment on the review that you are already preparing a fix (but I have no idea what the standard practice is). If I had known you were then I wouldn't have reverted.

@goncharov @mehdi_amini is there a way to change the way the phab UI or the pre-merge checks work here to make failing pre-merge checks clearer? This isn't the first time I've seen someone be very confused about this UI

I asked the same thing a few days ago and @goncharov said something was cooking in this area!