Unfortunately, llvmgcc doesn't always work when writing temporary output to
/dev/null. Therefore, create a temp file that is later deleted.
rdar://
9837692
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136644
91177308-0d34-0410-b5e6-
96231b3b80d8
CmdArgs.push_back("-o");
// NOTE: gcc uses a temp .s file for this, but there doesn't seem
// to be a good reason.
- CmdArgs.push_back("/dev/null");
+ const char *TmpPath = C.getArgs().MakeArgString(
+ D.GetTemporaryPath("s"));
+ C.addTempFile(TmpPath);
+ CmdArgs.push_back(TmpPath);
CmdArgs.push_back("--output-pch=");
CmdArgs.push_back(Output.getFilename());