#include "llvm/Analysis/LazyCallGraph.h"
#include "llvm/AsmParser/Parser.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/TargetParser/Triple.h"
#include "gtest/gtest.h"
#include <memory>
usingnamespacellvm;
namespace {
std::unique_ptr<Module> parseAssembly(LLVMContext &Context,
const char *Assembly) { … }
static const char DiamondOfTriangles[] = …;
static const char DiamondOfTrianglesRefGraph[] = …;
static LazyCallGraph buildCG(Module &M) { … }
TEST(LazyCallGraphTest, BasicGraphFormation) { … }
static Function &lookupFunction(Module &M, StringRef Name) { … }
TEST(LazyCallGraphTest, BasicGraphMutation) { … }
TEST(LazyCallGraphTest, InnerSCCFormation) { … }
TEST(LazyCallGraphTest, MultiArmSCC) { … }
TEST(LazyCallGraphTest, OutgoingEdgeMutation) { … }
TEST(LazyCallGraphTest, IncomingEdgeInsertion) { … }
TEST(LazyCallGraphTest, IncomingEdgeInsertionRefGraph) { … }
TEST(LazyCallGraphTest, IncomingEdgeInsertionLargeCallCycle) { … }
TEST(LazyCallGraphTest, IncomingEdgeInsertionLargeRefCycle) { … }
TEST(LazyCallGraphTest, InlineAndDeleteFunction) { … }
TEST(LazyCallGraphTest, InternalEdgeMutation) { … }
TEST(LazyCallGraphTest, InternalEdgeRemoval) { … }
TEST(LazyCallGraphTest, InternalMultiEdgeRemoval) { … }
TEST(LazyCallGraphTest, InternalNoOpEdgeRemoval) { … }
TEST(LazyCallGraphTest, InternalCallEdgeToRef) { … }
TEST(LazyCallGraphTest, InternalRefEdgeToCall) { … }
TEST(LazyCallGraphTest, InternalRefEdgeToCallNoCycleInterleaved) { … }
TEST(LazyCallGraphTest, InternalRefEdgeToCallBothPartitionAndMerge) { … }
TEST(LazyCallGraphTest, HandleBlockAddress) { … }
TEST(LazyCallGraphTest, HandleBlockAddress2) { … }
TEST(LazyCallGraphTest, ReplaceNodeFunction) { … }
TEST(LazyCallGraphTest, RemoveFunctionWithSpuriousRef) { … }
TEST(LazyCallGraphTest, RemoveFunctionWithSpuriousRefRecursive) { … }
TEST(LazyCallGraphTest, RemoveFunctionWithSpuriousRefRecursive2) { … }
TEST(LazyCallGraphTest, RemoveFunctionWithSpuriousRefRecursive3) { … }
TEST(LazyCallGraphTest, AddSplitFunction1) { … }
TEST(LazyCallGraphTest, AddSplitFunction2) { … }
TEST(LazyCallGraphTest, AddSplitFunction3) { … }
TEST(LazyCallGraphTest, AddSplitFunction4) { … }
TEST(LazyCallGraphTest, AddSplitFunction5) { … }
TEST(LazyCallGraphTest, AddSplitFunction6) { … }
TEST(LazyCallGraphTest, AddSplitFunction7) { … }
TEST(LazyCallGraphTest, AddSplitFunction8) { … }
TEST(LazyCallGraphTest, AddSplitFunction9) { … }
TEST(LazyCallGraphTest, AddSplitFunctions1) { … }
TEST(LazyCallGraphTest, AddSplitFunctions2) { … }
TEST(LazyCallGraphTest, AddSplitFunctions3) { … }
TEST(LazyCallGraphTest, AddSplitFunctions4) { … }
TEST(LazyCallGraphTest, AddSplitFunctions5) { … }
}