[PATCH] D93682: [CodeGen] Add "noreturn" attirbute to _Unwind_Resume

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 22 03:07:26 PST 2020


ebrevnov created this revision.
Herald added a subscriber: hiraditya.
ebrevnov requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93682

Files:
  llvm/lib/CodeGen/DwarfEHPrepare.cpp


Index: llvm/lib/CodeGen/DwarfEHPrepare.cpp
===================================================================
--- llvm/lib/CodeGen/DwarfEHPrepare.cpp
+++ llvm/lib/CodeGen/DwarfEHPrepare.cpp
@@ -235,6 +235,7 @@
     CI->setCallingConv(TLI->getLibcallCallingConv(RTLIB::UNWIND_RESUME));
 
     // We never expect _Unwind_Resume to return.
+    CI->setDoesNotReturn();
     new UnreachableInst(Ctx, UnwindBB);
     return true;
   }
@@ -260,6 +261,7 @@
   CI->setCallingConv(TLI->getLibcallCallingConv(RTLIB::UNWIND_RESUME));
 
   // We never expect _Unwind_Resume to return.
+  CI->setDoesNotReturn();
   new UnreachableInst(Ctx, UnwindBB);
   return true;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93682.313276.patch
Type: text/x-patch
Size: 659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201222/afa97377/attachment.bin>


More information about the llvm-commits mailing list