[PATCH] D10884: [CodeGen] Force emission of personality directive if explicitly specified

Reid Kleckner rnk at google.com
Mon Jul 13 15:14:15 PDT 2015


rnk accepted this revision.
rnk added a reviewer: rnk.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm


================
Comment at: lib/CodeGen/AsmPrinter/DwarfCFIException.cpp:110-111
@@ +109,4 @@
+                            ? dyn_cast<Function>(F->getPersonalityFn()->stripPointerCasts())
+                            : MMI->getPersonality();
+
+  assert(Per || !F->hasPersonalityFn());
----------------
I was trying to get away from relying on MMI->getPersonality() at all. Something like:
  const Function *Per = nullptr;
  if (F->hasPersonalityFn())
    Per = dyn_cast<Function>(F->getPersonalityFn()->stripPointerCasts());
  assert(Per == MMI->getPersonality());

Eventually we probably want to rip out MMI's tracking of EH personalities, now that they aren't on landingpads. For now, though, we should ensure that MMI is in sync with the IR.


Repository:
  rL LLVM

http://reviews.llvm.org/D10884







More information about the llvm-commits mailing list