xref: /llvm-project/llvm/test/tools/gold/X86/thinlto_prefix_replace.ll (revision 3efcfadde4cebf768f56b22a432185eb9502ea41)
1bbd10b45STeresa Johnson; Check that changing the output path via thinlto-prefix-replace works
217ee427eSKuba Mracek; RUN: mkdir -p %t/oldpath
317ee427eSKuba Mracek; RUN: opt -module-summary %s -o %t/oldpath/thinlto_prefix_replace.o
4bbd10b45STeresa Johnson; Ensure that there is no existing file at the new path, so we properly
5bbd10b45STeresa Johnson; test the creation of the new file there.
617ee427eSKuba Mracek; RUN: rm -f %t/newpath/thinlto_prefix_replace.o.thinlto.bc
7*3efcfaddSEugene Leviant; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
8bbd10b45STeresa Johnson; RUN:    --plugin-opt=thinlto \
9bbd10b45STeresa Johnson; RUN:    --plugin-opt=thinlto-index-only \
1017ee427eSKuba Mracek; RUN:    --plugin-opt=thinlto-prefix-replace="%t/oldpath/;%t/newpath/" \
1117ee427eSKuba Mracek; RUN:    -shared %t/oldpath/thinlto_prefix_replace.o -o %t/thinlto_prefix_replace
1217ee427eSKuba Mracek; RUN: ls %t/newpath/thinlto_prefix_replace.o.thinlto.bc
13bbd10b45STeresa Johnson
142ceb628fSDavide Italianotarget datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
152ceb628fSDavide Italiano
16bbd10b45STeresa Johnsondefine void @f() {
17bbd10b45STeresa Johnsonentry:
18bbd10b45STeresa Johnson  ret void
19bbd10b45STeresa Johnson}
20