Rafael Espindola | 0021a54 | 2015-06-16 16:36:15 +0000 | [diff] [blame] | 1 | Test that both llvm-dis (uses a data streamer) and opt (no data streamer) |
Rafael Espindola | 0c65062 | 2015-06-16 20:03:39 +0000 | [diff] [blame] | 2 | handle a .bc file with any padding. |
Rafael Espindola | 0021a54 | 2015-06-16 16:36:15 +0000 | [diff] [blame] | 3 | |
Rafael Espindola | 0c65062 | 2015-06-16 20:03:39 +0000 | [diff] [blame] | 4 | A file padded with '\n' can be produced under a peculiar situation: |
Rafael Espindola | 0021a54 | 2015-06-16 16:36:15 +0000 | [diff] [blame] | 5 | |
| 6 | * A .bc is produced os OS X, but without a darwin triple, so it has no |
| 7 | wrapper. |
| 8 | * It is included in a .a archive |
| 9 | * ranlib is ran on that archive. It will pad the members to make them multiple |
| 10 | of 8 bytes. |
| 11 | |
Rafael Espindola | 0c65062 | 2015-06-16 20:03:39 +0000 | [diff] [blame] | 12 | and there is no reason to not handle the general case. |
| 13 | |
Rafael Espindola | 0021a54 | 2015-06-16 16:36:15 +0000 | [diff] [blame] | 14 | RUN: llvm-dis -disable-output %p/Inputs/padding.bc |
| 15 | RUN: opt -disable-output %p/Inputs/padding.bc |
Rafael Espindola | 0c65062 | 2015-06-16 20:03:39 +0000 | [diff] [blame] | 16 | |
| 17 | RUN: llvm-dis -disable-output %p/Inputs/padding-garbage.bc |
| 18 | RUN: opt -disable-output %p/Inputs/padding-garbage.bc |