Chromium Code Reviews| Index: test/NaCl/Bitcode/struct-types.ll |
| diff --git a/test/NaCl/Bitcode/struct-types.ll b/test/NaCl/Bitcode/struct-types.ll |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..39b095f010afaf0ac27956fc9ef877b5219a4751 |
| --- /dev/null |
| +++ b/test/NaCl/Bitcode/struct-types.ll |
| @@ -0,0 +1,27 @@ |
| +; Checks if llvm bitcode defines a struct type before the pointer type, |
| +; even if the struct definintion appears after the pointer type, while |
| +; pnacl bitcode moves the pointer before the struct. |
| +; RUN: llvm-as < %s | llvm-bcanalyzer -dump | FileCheck %s -check-prefix=LLVM |
| +; RUN: llvm-as < %s | pnacl-freeze | pnacl-bcanalyzer -dump | FileCheck %s -check-prefix=PNACL |
| + |
| +%1 = type %0* |
| +%0 = type {i8} |
|
jvoung (off chromium)
2013/05/15 21:01:36
How come %0 isn't on line 7 and %1 on line 8?
I g
Karl
2013/05/20 21:48:51
I created a more complicated example. Hope this is
|
| +; LLVM: <TYPE_BLOCK_ID {{.*}}> |
| +; LLVM: <STRUCT_NAMED {{.*}}/> |
| +; LLVM: <POINTER {{.*}}/> |
| +; LLVM: </TYPE_BLOCK_ID> |
| + |
| +; PNACL: <TYPE_BLOCK_ID {{.*}}> |
| +; PNACL: <POINTER {{.*}}/> |
| +; PNACL: <STRUCT_NAMED {{.*}}/> |
| +; PNACL: </TYPE_BLOCK_ID> |
| + |
| +define %1 @foo(%1 %a) |
| +{ |
| + ret %1 %a; |
| +} |
| + |
| +define %1 @bar(%1 %b) |
| +{ |
| + ret %1 %b; |
| +} |