[PATCH] D50987: [Exception Handling] Unwind tables are required for all functions that have an EH personality.

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 20 12:18:00 PDT 2018


stefanp created this revision.
stefanp added reviewers: nemanjai, kbarton, hfinkel, syzaara, sfertile, lei, rnk.
Herald added a subscriber: chrib.

This patch is for defect:
https://bugs.llvm.org/show_bug.cgi?id=32611

Functions may require unwind tables even if they are marked with the attribute nounwind. Any function with an EH personality may require an unwind table.


https://reviews.llvm.org/D50987

Files:
  include/llvm/IR/Function.h


Index: include/llvm/IR/Function.h
===================================================================
--- include/llvm/IR/Function.h
+++ include/llvm/IR/Function.h
@@ -557,7 +557,7 @@
 
   /// True if this function needs an unwind table.
   bool needsUnwindTableEntry() const {
-    return hasUWTable() || !doesNotThrow();
+    return hasUWTable() || !doesNotThrow() || hasPersonalityFn();
   }
 
   /// Determine if the function returns a structure through first


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50987.161527.patch
Type: text/x-patch
Size: 464 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180820/71ea19c0/attachment.bin>


More information about the llvm-commits mailing list