Home | History | Annotate | Download | only in CodeGenCXX
      1 // RUN: %clang_cc1 -I%S %s -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions -o - | FileCheck %s
      2 #include <typeinfo>
      3 
      4 namespace Test1 {
      5 
      6 // PR7400
      7 struct A { virtual void f(); };
      8 
      9 // CHECK: define i8* @_ZN5Test11fEv
     10 const char *f() {
     11   try {
     12     // CHECK: br i1
     13     // CHECK: invoke void @__cxa_bad_typeid() noreturn
     14     return typeid(*static_cast<A *>(0)).name();
     15   } catch (...) {
     16     // CHECK:      landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
     17     // CHECK-NEXT:   catch i8* null
     18   }
     19 
     20   return 0;
     21 }
     22 
     23 }
     24