Teresa Johnson | bbd10b4 | 2016-05-17 14:45:30 +0000 | [diff] [blame] | 1 | ; Check that changing the output path via prefix-replace works |
Teresa Johnson | 1e7d4ab | 2016-05-17 15:26:13 +0000 | [diff] [blame] | 2 | ; Use of '/' in paths created here make this unsuitable for Windows. |
Kuba Mracek | 17ee427 | 2017-08-15 20:29:24 +0000 | [diff] [blame] | 3 | ; RUN: mkdir -p %t/oldpath |
| 4 | ; RUN: opt -module-summary %s -o %t/oldpath/prefix_replace.o |
Teresa Johnson | bbd10b4 | 2016-05-17 14:45:30 +0000 | [diff] [blame] | 5 | ; Ensure that there is no existing file at the new path, so we properly |
| 6 | ; test the creation of the new file there. |
Kuba Mracek | 17ee427 | 2017-08-15 20:29:24 +0000 | [diff] [blame] | 7 | ; RUN: rm -f %t/newpath/prefix_replace.o.thinlto.bc |
Teresa Johnson | bbd10b4 | 2016-05-17 14:45:30 +0000 | [diff] [blame] | 8 | |
Kuba Mracek | 17ee427 | 2017-08-15 20:29:24 +0000 | [diff] [blame] | 9 | ; RUN: llvm-lto -thinlto-action=thinlink -o %t.index.bc %t/oldpath/prefix_replace.o |
| 10 | ; RUN: llvm-lto -thinlto-action=distributedindexes -thinlto-prefix-replace="%t/oldpath/;%t/newpath/" -thinlto-index %t.index.bc %t/oldpath/prefix_replace.o |
Teresa Johnson | bbd10b4 | 2016-05-17 14:45:30 +0000 | [diff] [blame] | 11 | |
Kuba Mracek | 17ee427 | 2017-08-15 20:29:24 +0000 | [diff] [blame] | 12 | ; RUN: ls %t/newpath/prefix_replace.o.thinlto.bc |
Teresa Johnson | bbd10b4 | 2016-05-17 14:45:30 +0000 | [diff] [blame] | 13 | |
| 14 | define void @f() { |
| 15 | entry: |
| 16 | ret void |
| 17 | } |