aboutsummaryrefslogtreecommitdiff
path: root/test/tools/gold/X86/thinlto_prefix_replace.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/tools/gold/X86/thinlto_prefix_replace.ll')
-rw-r--r--test/tools/gold/X86/thinlto_prefix_replace.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/tools/gold/X86/thinlto_prefix_replace.ll b/test/tools/gold/X86/thinlto_prefix_replace.ll
new file mode 100644
index 000000000000..a635088a460e
--- /dev/null
+++ b/test/tools/gold/X86/thinlto_prefix_replace.ll
@@ -0,0 +1,17 @@
+; Check that changing the output path via thinlto-prefix-replace works
+; RUN: mkdir -p %T/oldpath
+; RUN: opt -module-summary %s -o %T/oldpath/thinlto_prefix_replace.o
+; Ensure that there is no existing file at the new path, so we properly
+; test the creation of the new file there.
+; RUN: rm -f %T/newpath/thinlto_prefix_replace.o.thinlto.bc
+; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
+; RUN: --plugin-opt=thinlto \
+; RUN: --plugin-opt=thinlto-index-only \
+; RUN: --plugin-opt=thinlto-prefix-replace="%T/oldpath/;%T/newpath/" \
+; RUN: -shared %T/oldpath/thinlto_prefix_replace.o -o %T/thinlto_prefix_replace
+; RUN: ls %T/newpath/thinlto_prefix_replace.o.thinlto.bc
+
+define void @f() {
+entry:
+ ret void
+}