[PATCH] D135270: [WinEH] Validate funclet tokens in colorEHFunclets()

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 5 11:38:37 PDT 2022


rnk added a comment.

I think it would be more reasonable to emit a diagnostic at the point where we mark the successor as implausible. This is an analysis function, which is called during instrumentation passes, and I don't think we should emit errors from an analysis helper.



================
Comment at: llvm/lib/Analysis/EHPersonalities.cpp:111
+
 DenseMap<BasicBlock *, ColorVector> llvm::colorEHFunclets(Function &F) {
   SmallVector<std::pair<BasicBlock *, BasicBlock *>, 16> Worklist;
----------------
What I had in mind was to essentially emit an error when the ColorVector has a size of more than one. That represents a situation where we would start cloning basic blocks in WinEHPrepare.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135270



More information about the llvm-commits mailing list