From: Rafael Espindola Date: Fri, 28 Nov 2014 15:45:31 +0000 (+0000) Subject: Add a testcase reduced from clang lto bootstrap on OS X. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=93cd657cf075796b43f82582a3c951ae91db5279;p=platform%2Fupstream%2Fllvm.git Add a testcase reduced from clang lto bootstrap on OS X. llvm-svn: 222921 --- diff --git a/llvm/test/Linker/Inputs/opaque.ll b/llvm/test/Linker/Inputs/opaque.ll new file mode 100644 index 0000000..2b0d7d3 --- /dev/null +++ b/llvm/test/Linker/Inputs/opaque.ll @@ -0,0 +1,13 @@ +%A = type { } +%B = type { %D, %E, %B* } + +%D = type { %E } +%E = type opaque + +@g2 = external global %A +@g3 = external global %B + +define void @f1() { + getelementptr %A* null, i32 0 + ret void +} diff --git a/llvm/test/Linker/opaque.ll b/llvm/test/Linker/opaque.ll new file mode 100644 index 0000000..1ba878c --- /dev/null +++ b/llvm/test/Linker/opaque.ll @@ -0,0 +1,21 @@ +; RUN: llvm-link %p/opaque.ll %p/Inputs/opaque.ll -S -o - | FileCheck %s + +; CHECK-DAG: %A = type {} +; CHECK-DAG: %B = type { %C, %C, %B* } +; CHECK-DAG: %B.1 = type { %D, %E, %B.1* } +; CHECK-DAG: %C = type { %A } +; CHECK-DAG: %D = type { %E } +; CHECK-DAG: %E = type opaque + +; CHECK-DAG: @g1 = external global %B +; CHECK-DAG: @g2 = external global %A +; CHECK-DAG: @g3 = external global %B.1 + +; CHECK-DAG: getelementptr %A* null, i32 0 + +%A = type opaque +%B = type { %C, %C, %B* } + +%C = type { %A } + +@g1 = external global %B