[PATCH] CodeGen support for x86_64 SEH catch handlers in LLVM

Reid Kleckner rnk at google.com
Tue Nov 18 18:46:14 PST 2014


================
Comment at: lib/CodeGen/AsmPrinter/Win64Exception.cpp:226
@@ +225,3 @@
+          Asm->OutStreamer.EmitValue(createImageRel32(Asm->getSymbol(TI)), 4);
+        else // catch i8* null
+          Asm->OutStreamer.EmitIntValue(0, 4);
----------------
andrew.w.kaylor wrote:
> rnk wrote:
> > andrew.w.kaylor wrote:
> > > Are there two different ways to specify a __finally handler?
> > "catch i8* null" is a catch-all handler, not a `__finally` handler. The difference is that unwinding will continue through `__finally`, but catch-all handles the exception.
> It looks like the same information is being written to the table in either case.  How does that work?
This should be __finally:
  try_begin_label
  try_end_label
  finally_callback
  0 // zero for landing pad label

This should be catch all:
  try_begin_label
  try_end_label
  0 // no filter function
  landing_pad_label

Clear how that is different?

http://reviews.llvm.org/D6300






More information about the llvm-commits mailing list