summaryrefslogtreecommitdiffstats
path: root/llvm/test/Feature/undefined.ll
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2020-01-27 13:49:09 -0800
committerReid Kleckner <rnk@google.com>2020-01-27 15:34:05 -0800
commitc23212a438f6ff20bf1d98e5ca23c5cd28591ce3 (patch)
tree1e603cb4cc0cfa349362283f55206ec48f61241c /llvm/test/Feature/undefined.ll
parent72882ca30d87bd7ea85d8099e8b9d2244749b71e (diff)
downloadbcm5719-llvm-c23212a438f6ff20bf1d98e5ca23c5cd28591ce3.tar.gz
bcm5719-llvm-c23212a438f6ff20bf1d98e5ca23c5cd28591ce3.zip
[IR] Keep a double break between functions when printing a module
This behavior appears to have changed unintentionally in b0e979724f2679e4e6f5b824144ea89289bd6d56. Instead of printing the leading newline in printFunction, print it when printing a module. This ensures that `OS << *Func` starts printing immediately on the current line, but whole modules are printed nicely. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D73505 (cherry picked from commit 9521c18438a9f09663f3dc68aa7581371c0653c9)
Diffstat (limited to 'llvm/test/Feature/undefined.ll')
-rw-r--r--llvm/test/Feature/undefined.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/Feature/undefined.ll b/llvm/test/Feature/undefined.ll
index e63ce41f681..e01ed4c0f9c 100644
--- a/llvm/test/Feature/undefined.ll
+++ b/llvm/test/Feature/undefined.ll
@@ -1,6 +1,7 @@
; RUN: llvm-as < %s | llvm-dis > %t1.ll
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
; RUN: diff %t1.ll %t2.ll
+; RUN: FileCheck %s < %t1.ll
@X = global i32 undef ; <i32*> [#uses=0]
@@ -15,3 +16,15 @@ define i32 @test2() {
ret i32 %X
}
+
+; Check that there is a newline between functions.
+
+; CHECK: @X = global
+; CHECK-EMPTY:
+; CHECK: declare i32 @atoi(i8*)
+; CHECK-EMPTY:
+; CHECK: define i32 @test() {
+; CHECK: {{^[}]}}
+; CHECK-EMPTY:
+; CHECK: define i32 @test2() {
+; CHECK: {{^[}]}}
OpenPOWER on IntegriCloud