This was also trying to write the bitcode to the failed file
on failure, which asserts. Also, consistently use
ToolOutputFile, instead of one path manually removing
the temp file.
Details
Details
- Reviewers
regehr aeubanks lebedev.ri
Diff Detail
Diff Detail
Unit Tests
Unit Tests
Event Timeline
llvm/tools/llvm-reduce/deltas/Delta.cpp | ||
---|---|---|
81–82 | I think the intention of the original code was also to check if the writing caused any problems. So we should check before and after? And ditto below in the textual IR. Probably we should factor out the check into a helper function/lambda |
Comment Actions
oh I guess if there's an error opening the file initially, it'll stay as that error even attempting to write to it?
Comment Actions
No, it's an assert to write to the failed open file. This ends up checking after open and after close. The problem was the text and bitcode paths were duplicating the opening, and the text path didn't check
I think the intention of the original code was also to check if the writing caused any problems. So we should check before and after? And ditto below in the textual IR. Probably we should factor out the check into a helper function/lambda