14#ifndef LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_VALUE_H
15#define LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_VALUE_H
19#include "llvm/ADT/DenseMap.h"
20#include "llvm/ADT/StringMap.h"
21#include "llvm/ADT/StringRef.h"
22#include "llvm/Support/raw_ostream.h"
66 auto It = Properties.find(Name);
67 return It == Properties.end() ? nullptr : It->second;
73 Properties.insert_or_assign(Name, &Val);
78 llvm::StringMap<Value *> Properties;
137 RightSubVal(RightSubVal) {}
159 RightSubVal(RightSubVal) {}
200 RightSubVal(RightSubVal) {}
224 RightSubVal(RightSubVal) {}
291 explicit StructValue(llvm::DenseMap<const ValueDecl *, Value *> Children)
301 auto It = Children.find(&D);
302 if (It == Children.end())
311 llvm::DenseMap<const ValueDecl *, Value *> Children;
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Models an atomic boolean.
static bool classof(const Value *Val)
Models a boolean biconditional.
BiconditionalValue(BoolValue &LeftSubVal, BoolValue &RightSubVal)
static bool classof(const Value *Val)
BoolValue & getLeftSubValue() const
Returns the left sub-value of the biconditional.
BoolValue & getRightSubValue() const
Returns the right sub-value of the biconditional.
BoolValue(Kind ValueKind)
static bool classof(const Value *Val)
Models a boolean conjunction.
BoolValue & getLeftSubValue() const
Returns the left sub-value of the conjunction.
static bool classof(const Value *Val)
ConjunctionValue(BoolValue &LeftSubVal, BoolValue &RightSubVal)
BoolValue & getRightSubValue() const
Returns the right sub-value of the conjunction.
Models a boolean disjunction.
BoolValue & getLeftSubValue() const
Returns the left sub-value of the disjunction.
DisjunctionValue(BoolValue &LeftSubVal, BoolValue &RightSubVal)
BoolValue & getRightSubValue() const
Returns the right sub-value of the disjunction.
static bool classof(const Value *Val)
Models a boolean implication.
static bool classof(const Value *Val)
BoolValue & getLeftSubValue() const
Returns the left sub-value of the implication.
BoolValue & getRightSubValue() const
Returns the right sub-value of the implication.
ImplicationValue(BoolValue &LeftSubVal, BoolValue &RightSubVal)
static bool classof(const Value *Val)
Models a boolean negation.
static bool classof(const Value *Val)
NegationValue(BoolValue &SubVal)
BoolValue & getSubVal() const
Returns the sub-value of the negation.
Models a symbolic pointer. Specifically, any value of type T*.
PointerValue(StorageLocation &PointeeLoc)
StorageLocation & getPointeeLoc() const
static bool classof(const Value *Val)
Models a dereferenced pointer.
ReferenceValue(StorageLocation &ReferentLoc)
static bool classof(const Value *Val)
StorageLocation & getReferentLoc() const
Base class for elements of the local variable store and of the heap.
Models a value of struct or class type, with a flat map of fields to child storage locations,...
void setChild(const ValueDecl &D, Value &Val)
Assigns Val as the child value for D.
Value * getChild(const ValueDecl &D) const
Returns the child value that is assigned for D or null if the child is not initialized.
StructValue(llvm::DenseMap< const ValueDecl *, Value * > Children)
static bool classof(const Value *Val)
Models the trivially true formula, which is Top in the lattice of boolean formulas.
static bool classof(const Value *Val)
Base class for all values computed by abstract interpretation.
Value(const Value &)=delete
Value * getProperty(llvm::StringRef Name) const
Returns the value of the synthetic property with the given Name or null if the property isn't assigne...
void setProperty(llvm::StringRef Name, Value &Val)
Assigns Val as the value of the synthetic property with the given Name.
Value & operator=(const Value &)=delete
bool areEquivalentValues(const Value &Val1, const Value &Val2)
An equivalence relation for values.
std::ostream & operator<<(std::ostream &Os, const clang::dataflow::MapLattice< Key, ElementLattice > &M)
YAML serialization mapping.