[Attributor] Properly repair broken unittest
authorJohannes Doerfert <johannes@jdoerfert.de>
Thu, 12 Jan 2023 10:20:50 +0000 (02:20 -0800)
committerJohannes Doerfert <johannes@jdoerfert.de>
Thu, 12 Jan 2023 10:23:59 +0000 (02:23 -0800)
commitd987fe67adb71ac30261fe5b4fe82bdad9405b7a
tree276bd8be608037e94f49c825cee3cc81ac3ff115
parentaa2134cdecf363070579524887c6ffac0fa5f849
[Attributor] Properly repair broken unittest

Reverts 2dc7c7095153822ecd1a8f43aa4c185f9e80cc00 and instead repairs the
unittest properly. The test was broken as that it used references to
dead functions, assumed dead functions could reach code, assumed code
would not be deleted, and did not pre-query all assertion queries.
Arguably, the querry AAs don't make it easy to use them outside the
attributor pipeline, maybe we just should not (or should fix them
pessimistically). For now, the unittest is fixed.
llvm/unittests/Transforms/IPO/AttributorTest.cpp