[PATCH] D110776: A new hidden option exec-on-ir-change=exe that calls exe after each time IR changes

Jamie Schmeiser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 5 08:53:21 PST 2022


jamieschmeiser updated this revision to Diff 480127.
jamieschmeiser added a comment.

ErrorOr isn't really appropriate here because the string was produced when the error occurred and it was None otherwise, which is the opposite of what happens with ErrorOr.  It isn't desirable to create the array of filenames using ErrorOr since you want to reuse the existing ones or a large trace will open too many temporary files.  However, your comment does point out that this return is inconsistent and awkward.  I've changed these functions to return an std::error_code, which is more consistent.  It loses the different error strings previously produced, but this code is only used for debugging anyway.  Also, I changed the function for creating the temporary files to clean up any it succeeded in creating if an error occurs.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110776/new/

https://reviews.llvm.org/D110776

Files:
  llvm/include/llvm/IR/PrintPasses.h
  llvm/include/llvm/Passes/StandardInstrumentations.h
  llvm/lib/IR/PrintPasses.cpp
  llvm/lib/Passes/StandardInstrumentations.cpp
  llvm/test/Other/ChangeTesters/exec-on-ir-change.ll
  llvm/test/Other/ChangeTesters/lit.local.cfg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110776.480127.patch
Type: text/x-patch
Size: 16126 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221205/0566cc46/attachment.bin>


More information about the llvm-commits mailing list