Skip to content

Commit 23d41ed

Browse files
JOE1994nikic
andauthored
[CGSCCPassManagerTest] Replace no-op bitcast to create constant using the old function (#72460)
With opaque pointers enabled, the existing ptr-to-ptr bitcast is a no-op and no longer creates a constant that references the old function. Replace the no-op bitcast with code that creates a constant that references the old function. The test now fails if the 1 new line of code added to `CallGraphUpdater::replaceFunctionWith()` in cb0ecc5 is removed (test passes if kept intact). --------- Co-authored-by: Nikita Popov <[email protected]>
1 parent 24c3cd1 commit 23d41ed

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/unittests/Analysis/CGSCCPassManagerTest.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,10 +1631,9 @@ TEST_F(CGSCCPassManagerTest, TestUpdateCGAndAnalysisManagerForPasses8) {
16311631
FnF->getEntryBlock().front().moveBefore(RI);
16321632
ASSERT_NE(FnF, nullptr);
16331633

1634-
// Create an unsused constant that is referencing the old (=replaced)
1634+
// Create an unused constant that is referencing the old (=replaced)
16351635
// function.
1636-
ConstantExpr::getBitCast(FnF,
1637-
PointerType::getUnqual(FnF->getContext()));
1636+
ConstantExpr::getPtrToInt(FnF, Type::getInt64Ty(FnF->getContext()));
16381637

16391638
// Use the CallGraphUpdater to update the call graph.
16401639
CallGraphUpdater CGU;

0 commit comments

Comments
 (0)