#include "llvm/Transforms/Utils/ModuleUtils.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/AsmParser/Parser.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/SourceMgr.h"
#include "gtest/gtest.h"
usingnamespacellvm;
static std::unique_ptr<Module> parseIR(LLVMContext &C, StringRef IR) { … }
static int getListSize(Module &M, StringRef Name) { … }
TEST(ModuleUtils, AppendToUsedList1) { … }
TEST(ModuleUtils, AppendToUsedList2) { … }
AppendFnType;
TransformFnType;
ParamType;
class ModuleUtilsTest : public testing::TestWithParam<ParamType> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(ModuleUtilsTest, AppendToMissingArray) { … }
TEST_P(ModuleUtilsTest, AppendToArray) { … }
TEST_P(ModuleUtilsTest, UpdateArray) { … }