[LLVMdev] RFC: Exception Handling Rewrite

Bill Wendling wendling at apple.com
Mon Jul 25 10:47:06 PDT 2011


On Jul 25, 2011, at 8:20 AM, Rafael Ávila de Espíndola wrote:

>>   %exn.val = landingpad { i8*, i32 } personality i32 (...)* @__gxx_personality_v0
>>                catch i8** @_ZTIi, i8** @_ZTId
>>                filter i8** @_ZTIPKc
>>   br label %lpad.split
> 
> What is the semantics of filter? Is it undefined reference if an 
> exception not matching ZTIi, ZTId or ZTIPKc passes by?
> 
It results in a call if an exception is thrown or passes by this landing pad which isn't _ZTIPKc. It results in a call to std::unexpected() (in C++). The corresponding C++ feature is the "throw(const char *)" clause hanging off of functions:

void foo() throw(const char*) {
  // ...
}

-bw





More information about the llvm-dev mailing list