[lld] Avoid creating files outside of work directory.
authorStephan Herhut <herhut@google.com>
Wed, 4 Mar 2020 13:39:58 +0000 (14:39 +0100)
committerStephan Herhut <herhut@google.com>
Wed, 4 Mar 2020 13:46:12 +0000 (14:46 +0100)
commit573c9d666c0fa8a4c6787f873bebf3f6ec4de7cc
treeb0c7b244726b4322837f67657d4df7ae1e44ef5e
parente60c28746b0cf30323e736f34048b02ff34688f6
[lld] Avoid creating files outside of work directory.

Summary:
A test is passing `-o -` to lld in the hope of writing the output to
standard out but that is not the case. Instead it creates a file named
`-.lto.o`. This fixes it by creating a temporary file in the work
directory.

Differential Revision: https://reviews.llvm.org/D75605
lld/test/ELF/lto/thinlto.ll