xref: /llvm-project/llvm/test/ThinLTO/X86/prefix_replace.ll (revision 05a358cdcd55d1ee0a0d92383aa49489479c6362)
1bbd10b45STeresa Johnson; Check that changing the output path via prefix-replace works
21e7d4ab9STeresa Johnson; Use of '/' in paths created here make this unsuitable for Windows.
317ee427eSKuba Mracek; RUN: mkdir -p %t/oldpath
417ee427eSKuba Mracek; RUN: opt -module-summary %s -o %t/oldpath/prefix_replace.o
5bbd10b45STeresa Johnson; Ensure that there is no existing file at the new path, so we properly
6bbd10b45STeresa Johnson; test the creation of the new file there.
717ee427eSKuba Mracek; RUN: rm -f %t/newpath/prefix_replace.o.thinlto.bc
8bbd10b45STeresa Johnson
917ee427eSKuba Mracek; RUN: llvm-lto -thinlto-action=thinlink -o %t.index.bc %t/oldpath/prefix_replace.o
1017ee427eSKuba Mracek; RUN: llvm-lto -thinlto-action=distributedindexes -thinlto-prefix-replace="%t/oldpath/;%t/newpath/" -thinlto-index %t.index.bc %t/oldpath/prefix_replace.o
11bbd10b45STeresa Johnson
1217ee427eSKuba Mracek; RUN: ls %t/newpath/prefix_replace.o.thinlto.bc
13*05a358cdSSteven Wutarget datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
14bbd10b45STeresa Johnson
15bbd10b45STeresa Johnsondefine void @f() {
16bbd10b45STeresa Johnsonentry:
17bbd10b45STeresa Johnson  ret void
18bbd10b45STeresa Johnson}
19