9#ifndef LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_FORMULA_H
10#define LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_FORMULA_H
13#include "llvm/ADT/ArrayRef.h"
14#include "llvm/ADT/DenseMap.h"
15#include "llvm/ADT/DenseMapInfo.h"
16#include "llvm/Support/Allocator.h"
17#include "llvm/Support/raw_ostream.h"
34enum class Atom :
unsigned {};
49class alignas(const Formula *) Formula {
70 return static_cast<Atom>(Value);
75 return static_cast<bool>(Value);
79 return kind() ==
Literal &&
static_cast<bool>(Value) ==
b;
83 return ArrayRef(
reinterpret_cast<Formula *
const *
>(
this + 1),
87 using AtomNames = llvm::DenseMap<Atom, std::string>;
91 void print(llvm::raw_ostream &OS,
const AtomNames * =
nullptr)
const;
94 static const Formula &
create(llvm::BumpPtrAllocator &Alloc,
Kind K,
112 llvm_unreachable(
"Unhandled Formula::Kind enum");
127 return OS << 'V' << static_cast<unsigned>(A);
136template <>
struct DenseMapInfo<
clang::dataflow::Atom> {
143 return DenseMapInfo<Underlying>::getHashValue(
Underlying(Val));
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Base class for all values computed by abstract interpretation.
Dataflow Directional Tag Classes.
Atom
Identifies an atomic boolean variable such as "V1".
llvm::raw_ostream & operator<<(llvm::raw_ostream &OS, Atom A)
The JSON file list parser is used to communicate input to InstallAPI.
Diagnostic wrappers for TextAPI types for error reporting.
static bool isEqual(const Atom &LHS, const Atom &RHS)
static unsigned getHashValue(const Atom &Val)
std::underlying_type_t< Atom > Underlying
clang::dataflow::Atom Atom
static Atom getTombstoneKey()
static Atom getEmptyKey()