[PATCH] Improve debugging output when there is a null function pointer in the IR dump.
Richard Trieu
rtrieu at google.com
Mon Jun 23 14:32:46 PDT 2014
Add new lines so debugging information isn't all on one line.
http://reviews.llvm.org/D4262
Files:
lib/Analysis/IPA/CallGraphSCCPass.cpp
test/Transforms/Inline/null-function.ll
Index: lib/Analysis/IPA/CallGraphSCCPass.cpp
===================================================================
--- lib/Analysis/IPA/CallGraphSCCPass.cpp
+++ 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;
}
Index: test/Transforms/Inline/null-function.ll
===================================================================
--- test/Transforms/Inline/null-function.ll
+++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4262.10764.patch
Type: text/x-patch
Size: 911 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140623/fb3810e9/attachment.bin>
More information about the llvm-commits
mailing list