[PATCH] D70383: [ThinLTO] Make ValueInfo::operator bool() explicit

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 03:25:41 PST 2019


evgeny777 created this revision.
evgeny777 added reviewers: tejohnson, steven_wu.
Herald added subscribers: dang, arphaman, dexonsmith, hiraditya, inglorion, mehdi_amini.
Herald added a project: LLVM.

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


https://reviews.llvm.org/D70383

Files:
  llvm/include/llvm/IR/ModuleSummaryIndex.h
  llvm/lib/LTO/LTO.cpp
  llvm/lib/Transforms/IPO/FunctionImport.cpp
  llvm/test/ThinLTO/X86/funcimport-stats.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70383.229789.patch
Type: text/x-patch
Size: 4448 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191118/ef97529e/attachment.bin>


More information about the llvm-commits mailing list