forked from OSchip/llvm-project
[PM] (NFC) Split the IR parsing into a fixture so that I can split out
more testing into other test routines while using the same core module. llvm-svn: 280446
This commit is contained in:
parent
1a4398a198
commit
4f83742ab6
|
@ -158,8 +158,14 @@ std::unique_ptr<Module> parseIR(const char *IR) {
|
|||
return parseAssemblyString(IR, Err, C);
|
||||
}
|
||||
|
||||
TEST(CGSCCPassManagerTest, Basic) {
|
||||
auto M = parseIR("define void @f() {\n"
|
||||
class CGSCCPassManagerTest : public ::testing::Test {
|
||||
protected:
|
||||
LLVMContext Context;
|
||||
std::unique_ptr<Module> M;
|
||||
|
||||
public:
|
||||
CGSCCPassManagerTest()
|
||||
: M(parseIR("define void @f() {\n"
|
||||
"entry:\n"
|
||||
" call void @g()\n"
|
||||
" call void @h1()\n"
|
||||
|
@ -190,7 +196,10 @@ TEST(CGSCCPassManagerTest, Basic) {
|
|||
"define void @x() {\n"
|
||||
"entry:\n"
|
||||
" ret void\n"
|
||||
"}\n");
|
||||
"}\n")) {}
|
||||
};
|
||||
|
||||
TEST_F(CGSCCPassManagerTest, Basic) {
|
||||
FunctionAnalysisManager FAM(/*DebugLogging*/ true);
|
||||
int FunctionAnalysisRuns = 0;
|
||||
FAM.registerPass([&] { return TestFunctionAnalysis(FunctionAnalysisRuns); });
|
||||
|
|
Loading…
Reference in New Issue