Skip to content

Commit 83b4aeb

Browse files
committed
Print the name of the generic function for a specialized function
When debug printing for a function is turned on with -sil-print-function, print the generic function is was derived from.
1 parent 13f8f73 commit 83b4aeb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/SILOptimizer/PassManager/PassManager.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,10 @@ void SILPassManager::addFunctionToWorklist(SILFunction *F,
754754

755755
int NewLevel = 1;
756756
if (DerivedFrom) {
757+
if (!functionSelectionEmpty() && isFunctionSelectedForPrinting(F)) {
758+
llvm::dbgs() << F->getName() << " was derived from "
759+
<< DerivedFrom->getName() << "\n";
760+
}
757761
// When SILVerifyAll is enabled, individual functions are verified after
758762
// function passes are run upon them. This means that any functions created
759763
// by a function pass will not be verified after the pass runs. Thus

0 commit comments

Comments
 (0)