[Attributor][NFC] Improve debug messages
authorJohannes Doerfert <johannes@jdoerfert.de>
Thu, 2 Feb 2023 10:10:07 +0000 (02:10 -0800)
committerJohannes Doerfert <johannes@jdoerfert.de>
Thu, 2 Feb 2023 10:28:15 +0000 (02:28 -0800)
llvm/lib/Transforms/IPO/AttributorAttributes.cpp

index 9c1e046..2730adf 100644 (file)
@@ -1349,7 +1349,10 @@ struct AAPointerInfoImpl
           O << "     -->                         " << *Acc.getRemoteInst()
             << "\n";
         if (!Acc.isWrittenValueYetUndetermined()) {
-          if (Acc.getWrittenValue())
+          if (isa_and_nonnull<Function>(Acc.getWrittenValue()))
+            O << "       - c: func " << Acc.getWrittenValue()->getName()
+              << "\n";
+          else if (Acc.getWrittenValue())
             O << "       - c: " << *Acc.getWrittenValue() << "\n";
           else
             O << "       - c: <unknown>\n";