const char *
ToolChain::JobContext::getTemporaryFilePath(const llvm::Twine &name,
StringRef suffix) const {
SmallString<128> buffer;
std::error_code EC = llvm::sys::fs::createTemporaryFile(name, suffix, buffer);
if (EC) {
// FIXME: This should not take down the entire process.
llvm::report_fatal_error("unable to create temporary file for filelist");
}
C.addTemporaryFile(buffer.str(), PreserveOnSignal::Yes);
// We can't just reference the data in the TemporaryFiles vector because
// that could theoretically get copied to a new address.
return C.getArgs().MakeArgString(buffer.str());
}
This is obviously not optimal. The immediate action is to return an llvm::Expected<const char *> instead, to represent the failure, but all of the callers are constructing command-lines for the jobs to run for this compilation. That's not currently something that can fail.
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: b1cf20b9e827a8612b37edfdaddd6d35
Issue Description:
This is obviously not optimal. The immediate action is to return an
llvm::Expected<const char *>
instead, to represent the failure, but all of the callers are constructing command-lines for the jobs to run for this compilation. That's not currently something that can fail.The text was updated successfully, but these errors were encountered: