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: call i8* @llvm.eh.exception
     17   }
     18 
     19   return 0;
     20 }
     21 
     22 }
     23