#include "CFGBuilder.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "gtest/gtest.h"
#define DEBUG_TYPE …
usingnamespacellvm;
CFGHolder::CFGHolder(StringRef ModuleName, StringRef FunctionName)
: … { … }
CFGHolder::~CFGHolder() = default;
CFGBuilder::CFGBuilder(Function *F, const std::vector<Arc> &InitialArcs,
std::vector<Update> Updates)
: … { … }
static void ConnectBlocks(BasicBlock *From, BasicBlock *To) { … }
static void DisconnectBlocks(BasicBlock *From, BasicBlock *To) { … }
BasicBlock *CFGBuilder::getOrAddBlock(StringRef BlockName) { … }
bool CFGBuilder::connect(const Arc &A) { … }
bool CFGBuilder::disconnect(const Arc &A) { … }
void CFGBuilder::buildCFG(const std::vector<Arc> &NewArcs) { … }
std::optional<CFGBuilder::Update> CFGBuilder::getNextUpdate() const { … }
std::optional<CFGBuilder::Update> CFGBuilder::applyUpdate() { … }
void CFGBuilder::dump(raw_ostream &OS) const { … }
TEST(CFGBuilder, Construction) { … }
TEST(CFGBuilder, Insertions) { … }
TEST(CFGBuilder, Deletions) { … }
TEST(CFGBuilder, Rebuild) { … }
static_assert …;
static_assert …;
static_assert …;
static_assert …;