Page MenuHomePhabricator

[ThinLTO] Make ValueInfo::operator bool() explicit
ClosedPublic

Authored by evgeny777 on Nov 18 2019, 3:25 AM.

Details

Summary

This prevents two bad things from happening:

  • implicit conversion to GUID
  • comparison (VI1 == VI2) based on implicit bool conversion

This change immediately uncovered bug in stats printing, so I fixed it as well

Diff Detail

Event Timeline

evgeny777 created this revision.Nov 18 2019, 3:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 18 2019, 3:25 AM
This revision is now accepted and ready to land.Nov 18 2019, 8:31 AM
tejohnson added inline comments.Nov 18 2019, 8:35 AM
llvm/lib/LTO/LTO.cpp
426 ↗(On Diff #229789)

Is this a bug fix exposed by your change or just unrelated cleanup? If the latter please commit separately.

This revision was automatically updated to reflect the committed changes.