This is an archive of the discontinued LLVM Phabricator instance.

[clang][cli] Ensure plugin args are generated in deterministic order
ClosedPublic

Authored by jansvoboda11 on Apr 5 2021, 3:18 AM.

Details

Summary

The '-plugin-arg' command-line arguments are not being generated in deterministic order.

This patch changes the storage from std::unordered_map to std::map to enforce ordering.

Diff Detail

Event Timeline

jansvoboda11 created this revision.Apr 5 2021, 3:18 AM
jansvoboda11 requested review of this revision.Apr 5 2021, 3:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 5 2021, 3:18 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
dexonsmith accepted this revision.Apr 5 2021, 11:20 AM

LGTM. Based on git-blame, this was added in 6c78974b298d619ec11e243fb6fdea0b16f87a66 (https://reviews.llvm.org/D17959) and the choice of unordered vs. ordered looks incidental (not motivated by performance).

This revision is now accepted and ready to land.Apr 5 2021, 11:20 AM

also just confirming that this fixes the issue we were seeing in Chrome