15#include "llvm/Support/Casting.h"
22 if (
auto *IndVal1 = dyn_cast<ReferenceValue>(&Val1)) {
23 auto *IndVal2 = cast<ReferenceValue>(&Val2);
24 return &IndVal1->getReferentLoc() == &IndVal2->getReferentLoc();
26 if (
auto *IndVal1 = dyn_cast<PointerValue>(&Val1)) {
27 auto *IndVal2 = cast<PointerValue>(&Val2);
28 return &IndVal1->getPointeeLoc() == &IndVal2->getPointeeLoc();
35 (isa<TopBoolValue>(&Val1) ||
42 const auto *RV = cast<ReferenceValue>(&Val);
43 return OS <<
"Reference(" << &RV->getReferentLoc() <<
")";
46 const auto *PV = dyn_cast<PointerValue>(&Val);
47 return OS <<
"Pointer(" << &PV->getPointeeLoc() <<
")";
Base class for all values computed by abstract interpretation.
llvm::StringRef debugString(Value::Kind Kind)
Returns a string representation of a value kind.
bool areEquivalentValues(const Value &Val1, const Value &Val2)
An equivalence relation for values.
static bool areEquivalentIndirectionValues(const Value &Val1, const Value &Val2)
std::ostream & operator<<(std::ostream &Os, const clang::dataflow::MapLattice< Key, ElementLattice > &M)