Debian Codegraph @

clang/test/CodeGen/X86/ms-secure-hotpatch-bad-file.c

raw
1 // REQUIRES: x86-registered-target
2
3 // This verifies that we correctly handle a -fms-secure-hotpatch-functions-file argument that points
4 // to a missing file.
5 //
6 // RUN: not %clang_cl -c --target=x86_64-windows-msvc -O2 /Z7 -fms-secure-hotpatch-functions-file=%S/this-file-is-intentionally-missing-do-not-create-it.txt /Fo%t.obj -- %s 2>&1 | FileCheck %s
7 // CHECK: failed to open hotpatch functions file
8
9 void this_might_have_side_effects();
10
11 int __declspec(noinline) this_gets_hotpatched() {
12 this_might_have_side_effects();
13 return 42;
14 }
15
16 int __declspec(noinline) this_does_not_get_hotpatched() {
17 return this_gets_hotpatched() + 100;
18 }