This is an archive of the discontinued LLVM Phabricator instance.

[LTO] Replace llvm::writeFileAtomically with llvm::writeToOutput API.
ClosedPublic

Authored by hokein on Jun 30 2023, 1:41 AM.

Details

Diff Detail

Event Timeline

hokein created this revision.Jun 30 2023, 1:41 AM
hokein requested review of this revision.Jun 30 2023, 1:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 30 2023, 1:41 AM

This is a patch split out from https://reviews.llvm.org/D153740.

llvm/lib/LTO/ThinLTOCodeGenerator.cpp
433

this is not a completely-none-functional change (in case of error), but I think it should be fine.

steven_wu accepted this revision.Jun 30 2023, 9:32 AM

This is generally fine. I don't see any error that should fall into consumeError condition that won't just error out anyway (like out of disk space, etc.) and I don't see those are special cased for code before switching to writeFileAtomically.

llvm/lib/LTO/ThinLTOCodeGenerator.cpp
419

Nit: Since now we don't care about what kind of error returns, this handleErrors with no error handle does nothing. Just do:

auto Err = llvm::writeToOutput()
This revision is now accepted and ready to land.Jun 30 2023, 9:32 AM
hokein marked an inline comment as done.Jun 30 2023, 11:33 PM

Thanks for the review.