]> granicus.if.org Git - clang/commitdiff
Tweak test so that it does not require <typeinfo>
authorDouglas Gregor <dgregor@apple.com>
Fri, 14 May 2010 21:50:50 +0000 (21:50 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 14 May 2010 21:50:50 +0000 (21:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103819 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/dynamic-cast.cpp

index 2bf1aeed4921c598af4e6fb6fc50f7d851474042..9838e25b1d3f8c6b8436c66f98cfe02cd65db382 100644 (file)
@@ -1,5 +1,4 @@
-// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -fexceptions -o - | FileCheck %s
-#include <typeinfo>
+// RUN: %clang_cc1 -I%S %s -triple x86_64-apple-darwin10 -emit-llvm -fexceptions -o - | FileCheck %s
 struct A { virtual void f(); };
 struct B : A { };
 
@@ -11,10 +10,8 @@ const B& f(A *a) {
     // CHECK: br i1
     // CHECK: invoke void @__cxa_bad_cast() noreturn
     dynamic_cast<const B&>(*a);
-  } catch (std::bad_cast&) {
+  } catch (...) {
     // CHECK: call i8* @llvm.eh.exception
-    // CHECK: {{call.*llvm.eh.selector.*_ZTISt8bad_cast}}
-    // CHECK: {{call i32 @llvm.eh.typeid.for.*@_ZTISt8bad_cast}}
   }
   return fail;
 }