[Attributor][FIX] Use AttributorConfig in the unit tests too
authorJohannes Doerfert <johannes@jdoerfert.de>
Fri, 15 Apr 2022 23:29:22 +0000 (18:29 -0500)
committerJohannes Doerfert <johannes@jdoerfert.de>
Fri, 15 Apr 2022 23:36:38 +0000 (18:36 -0500)
llvm/unittests/Transforms/IPO/AttributorTest.cpp

index d7c456c..18c7730 100644 (file)
@@ -57,7 +57,8 @@ TEST_F(AttributorTestBase, TestCast) {
   CallGraphUpdater CGUpdater;
   BumpPtrAllocator Allocator;
   InformationCache InfoCache(M, AG, Allocator, nullptr);
-  Attributor A(Functions, InfoCache, CGUpdater);
+  AttributorConfig AC(CGUpdater);
+  Attributor A(Functions, InfoCache, AC);
 
   Function *F = M.getFunction("foo");
 
@@ -150,8 +151,9 @@ TEST_F(AttributorTestBase, AAReachabilityTest) {
   CallGraphUpdater CGUpdater;
   BumpPtrAllocator Allocator;
   InformationCache InfoCache(M, AG, Allocator, nullptr);
-  Attributor A(Functions, InfoCache, CGUpdater, /* Allowed */ nullptr,
-               /*DeleteFns*/ false);
+  AttributorConfig AC(CGUpdater);
+  AC.DeleteFns = false;
+  Attributor A(Functions, InfoCache, AC);
 
   Function &F1 = *M.getFunction("func1");
   Function &F3 = *M.getFunction("func3");