[llvm] 81143b6 - [Attributor][FIX] Use AttributorConfig in the unit tests too

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 15 16:37:00 PDT 2022


Author: Johannes Doerfert
Date: 2022-04-15T18:36:38-05:00
New Revision: 81143b69dd832da189b1c875fd8a94b288c486c6

URL: https://github.com/llvm/llvm-project/commit/81143b69dd832da189b1c875fd8a94b288c486c6
DIFF: https://github.com/llvm/llvm-project/commit/81143b69dd832da189b1c875fd8a94b288c486c6.diff

LOG: [Attributor][FIX] Use AttributorConfig in the unit tests too

Added: 
    

Modified: 
    llvm/unittests/Transforms/IPO/AttributorTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Transforms/IPO/AttributorTest.cpp b/llvm/unittests/Transforms/IPO/AttributorTest.cpp
index d7c456c51473a..18c7730708b4d 100644
--- a/llvm/unittests/Transforms/IPO/AttributorTest.cpp
+++ b/llvm/unittests/Transforms/IPO/AttributorTest.cpp
@@ -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");


        


More information about the llvm-commits mailing list