rjmccall added a comment. In http://reviews.llvm.org/D12743#244375, @vsk wrote:
> Ah, ok. We have some objective-c++ code which calls into a boost routine > which throws an exception. That results in an undefined reference to > ___objc_personality_v0, because the boost library we linked against doesn't > have ___objc_personality_v0. > > Should the compiler have found the ___objc_personality_v0 symbol in this case > regardless? It's pretty straightforward. Sometimes people write code in ObjC++ files that's really pure C++. Such code is generally compiled with -fexceptions because that's the default, and so it has cleanups, and those cleanups require us to pick a personality function. When they do so, they generally don't link against the ObjC runtime, and so __objc_personality_v0 isn't found. The workaround here is to recognize that they're not actually catching ObjC exception types and just quietly degrade to use the C++ personality. It is probably technically an optimization, because it removes some overhead from double-parsing the exception tables (because the ObjC personality delegates to the C++ personality, instead of being tightly integrated with it), but that's not the real reason we do it. Repository: rL LLVM http://reviews.llvm.org/D12743 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits