[PATCH] Improve debugging output when there is a null function pointer in the IR dump.

Richard Trieu rtrieu at google.com
Wed Jul 2 19:20:19 PDT 2014


Closed by commit rL212250 (authored by @rtrieu).

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D4262

Files:
  llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp
  llvm/trunk/test/Transforms/Inline/null-function.ll

Index: llvm/trunk/test/Transforms/Inline/null-function.ll
===================================================================
--- llvm/trunk/test/Transforms/Inline/null-function.ll
+++ llvm/trunk/test/Transforms/Inline/null-function.ll
@@ -0,0 +1,9 @@
+; RUN: opt -print-before=always-inline -always-inline < %s -o /dev/null 2>&1 | FileCheck %s
+
+define i32 @main() #0 {
+entry:
+  ret i32 0
+}
+
+; CHECK: *** IR Dump Before Inliner for always_inline functions ***
+; CHECK: Printing <null> Function
Index: llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp
===================================================================
--- llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp
+++ llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp
@@ -606,7 +606,7 @@
         if ((*I)->getFunction())
           (*I)->getFunction()->print(Out);
         else
-          Out << "Printing <null> Function";
+          Out << "\nPrinting <null> Function\n";
       }
       return false;
     }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4262.11038.patch
Type: text/x-patch
Size: 977 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140703/9e42c0ed/attachment.bin>


More information about the llvm-commits mailing list