[PATCH] D15405: [EHPersonality] Add a new personality enum to represent langindPad of token type

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 17:13:22 PST 2015


sanjoy added a subscriber: sanjoy.
sanjoy added a comment.

Does it make sense to see a token returning personality as "wrapping" another existing personality?  I mean something like (psuedo code):

  struct PersonalityKind {
    EHPersonality InnerPersonality;
    bool HasToken;
  };

and then introduce an `{i8*, i32} @llvm.get_exception_pointer_and_selector(token)` and a `token @llvm.get_gc_token(token)`.  `@llvm.get_exception_pointer_and_selector` then returns whatever the landing pad would have directly returned for `InnerPersonality`, while `@llvm.get_gc_token` returns something we can hang `gc.relocate` and `gc.result` off of.


http://reviews.llvm.org/D15405





More information about the llvm-commits mailing list