[Attributor][NFC][AAPotentialValues] Change interface of PotentialValuesState
authorShinji Okumura <okuraofvegetable@gmail.com>
Mon, 10 Aug 2020 00:18:10 +0000 (09:18 +0900)
committerShinji Okumura <okuraofvegetable@gmail.com>
Mon, 10 Aug 2020 00:18:10 +0000 (09:18 +0900)
commitff1002aab0911c585a9850fe7315b1e604c271f9
treeafc6d56e2a50812778699a51525c800b913f0219
parent92e82a2890c38bbb158cbf9dd592328b4c383696
[Attributor][NFC][AAPotentialValues] Change interface of PotentialValuesState

Previously `PotentialValuesState` inherited `BooleanState`.
We have to add `getAssumed` to the state in order to use `clampStateAndIndicateChange` (which will be used in `AAPotentialValuesArgument`).
However `BooleanState::getAssumed` is not a virtual function and we cannot override it.
Therefore, I changed the state not to inherit `BooleanState` and add `getAssumed` to it.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D85610
llvm/include/llvm/Transforms/IPO/Attributor.h