Debian Codegraph @

clang/test/CodeGen/X86/ms-secure-hotpatch-eh.cpp

raw
1 // REQUIRES: x86-registered-target
2
3 // Global constant data such as exception handler tables should not be redirected by Windows Secure Hot-Patching
4 //
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 %s
6
7 class Foo {
8 public:
9 int x;
10 };
11
12 void this_might_throw();
13
14 extern "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"