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

Joseph Tremoulet via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 08:02:58 PST 2015


JosephTremoulet added a comment.

We want the new personality to generally be treated like Unknown, correct?  You should check for places in the code that look for EHPersonality::Unknown and make sure they agree for Token_LP.  From a quick look, I think you'd want to update `isNoOpWithoutInvoke` in EHPersonalities.h and `isCatchAll` in InstructionCombining.cpp.


================
Comment at: include/llvm/Analysis/EHPersonalities.h:29
@@ -29,1 +28,3 @@
+  CoreCLR,
+  Token_LP
 };
----------------
Since this one isn't actually some runtime's personality function, I think a comment explaining it would be helpful.  Something along the lines of "similar to Unknown, except that LandingPads have token type", maybe?

================
Comment at: lib/Analysis/EHPersonalities.cpp:32
@@ -31,2 +31,3 @@
     .Case("ProcessCLRException",   EHPersonality::CoreCLR)
+    .Case("ProcessTokenLandingPad",EHPersonality::Token_LP)
     .Default(EHPersonality::Unknown);
----------------
nit: the name "ProcessTokenLandingPad" seems funny to me.  I presume you were modeling it after the line above?  That's the name of the method in the CLR runtime, and is so named because it processes an exception, but "process" sounds funny to me in your case since the landingpad isn't being processed.  Maybe something like "Token_LP_Personality"?


http://reviews.llvm.org/D15405





More information about the llvm-commits mailing list