Use "foo-12345.o" instead of "foo.o-12345" as temporary file name.
authorNico Weber <nicolasweber@gmx.de>
Thu, 3 Aug 2017 21:06:36 +0000 (21:06 +0000)
committerNico Weber <nicolasweber@gmx.de>
Thu, 3 Aug 2017 21:06:36 +0000 (21:06 +0000)
commit09f4992c36dfadcacd62971cb8c1c0bdbe393cc2
treedd1e4d68e732e92b302bc156e9f939ab335366e3
parent33eee1911acd905732325b405fb9be58967ec44a
Use "foo-12345.o" instead of "foo.o-12345" as temporary file name.

This helps some tools that do things based on the output's extension.

For example, we got reports from users on Windows that have a tool that scan a
build output dir (but skip .obj files). The tool would keep the "foo.obj-12345"
file open, and then when clang tried to rename the temp file to the final
output filename, that would fail. By making the tempfile end in ".obj", tools
like this will now skip the temp files as well.

https://reviews.llvm.org/D36238

llvm-svn: 309984
clang/lib/Frontend/CompilerInstance.cpp