[PATCH] D12108: [WinEH] Require token linkage in EH pad/ret signatures

Joseph Tremoulet via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 08:33:46 PDT 2015


JosephTremoulet added a comment.

I suppose I could change just the `FooReturnInst::getFooPad()` accessors' return types to `FooPad *` (and remove support for `undef` from the verifier, LangRef, examples, and tests).  That way:

- Parsers could still sneak in an `Argument` through the public API (and likewise for any transforms that temporarily use placeholder values during a rewrite)
- `Create` and `setFooPad()` would agree with each other in accepting arbitrary `Value *` (but the verifier would catch non-`FooPad`s if any were left)
- Callers of `getFooPad()` wanting a `FooPadInst *` wouldn't have to downcast, and wouldn't have to deal with the possibility of `undef`

That //would// mean we'll have values that can't have all their uses replaced with `undef` (unless those uses are rewritten/removed before the next verifier pass), but if that's not an important property to preserve for LLVM (I may have been biased by other codebases) then callers of `getFooPad` will benefit.

Would that be a happy compromise?


http://reviews.llvm.org/D12108





More information about the llvm-commits mailing list