27 lines · cpp
1// REQUIRES: x86-registered-target2 3// Global constant data such as exception handler tables should not be redirected by Windows Secure Hot-Patching4//5// RUN: %clang_cl -c --target=x86_64-windows-msvc /EHsc -O2 -fms-secure-hotpatch-functions-list=this_gets_hotpatched /Fo%t.obj /clang:-S /clang:-o- -- %s 2>& 1 | FileCheck %s6 7class Foo {8public:9 int x;10};11 12void this_might_throw();13 14extern "C" int this_gets_hotpatched(int k) {15 int ret;16 try {17 this_might_throw();18 ret = 1;19 } catch (Foo& f) {20 ret = 2;21 }22 return ret;23}24 25// We expect that RTTI data is not redirected.26// CHECK-NOT: "__ref_??_R0?AVFoo@@@8"27