[PATCH] Don't crash on leaving nested __finally blocks through an EH edge.

Nico Weber thakis at chromium.org
Thu Feb 26 14:10:06 PST 2015


================
Comment at: lib/CodeGen/CGException.cpp:1936
@@ -1935,3 @@
-    if (!HaveInsertPoint()) {
-      FI.ContBB->eraseFromParent();
-      if (FI.ResumeBB)
----------------
rnk wrote:
> Can we check !HaveInsertPoint() && FI.ContBB->hasZeroUses() instead and still be clever?
You mean `use_empty()`? I tried that (`if (FI.ContBB.use_empty() && (!FI.ResumeBB || FI.ResumeBB.use_empty())`) and that didn't immediately work. But then I though even if it did, he benefits of being clever seem not worth it over having more control flow, and I stopped trying immediately and sent this out as-is :-)

http://reviews.llvm.org/D7918

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list