vsk added a comment. I think 'optimization' is a bit of a misnomer. There's a comment in this code that reads: "Can't do the optimization if it has non-C++ uses", so that's why I picked up the word. Without SimplifyPersonality(), some objective c++ code can no longer link against c++ libraries.
Consider the following test: $ echo "#include <stdexcept>" "\n" 'void foo() { throw std::runtime_error("foo"); }' | clang -x objective-cxx -S -emit-llvm - -o - | grep personality After we moved personality from landingpadinst to functions, the output of the test changes (from __gxx_personality to __objc_personality). This commit just takes us back to the original behavior. The original comment, "Otherwise, it has to be a landingpad instruction.", is wrong after David's patch. http://reviews.llvm.org/D12743 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits