[RISCV] Remove old FIXMEs from test. NFC
[llvm-project.git] / cross-project-tests / debuginfo-tests / dexter-tests / inline-line-gap.cpp
blobe24d3a48656ed1f502d07a3e13b18a7b5ea9ba66
1 // REQUIRES: system-windows
2 //
3 // RUN: %clang_cl /Od /Z7 /Zi %s -o %t
4 // RUN: %dexter --fail-lt 1.0 -w --binary %t --debugger 'dbgeng' -- %s
5 //
6 // RUN: %clang_cl /O2 /Z7 /Zi %s -o %t
7 // RUN: %dexter --fail-lt 1.0 -w --binary %t \
8 // RUN: --debugger 'dbgeng' -- %s
10 // This code is structured to have an early exit with an epilogue in the middle
11 // of the function, which creates a gap between the beginning of the inlined
12 // code region and the end. Previously, this confused cdb.
14 volatile bool shutting_down_ = true;
15 volatile bool tearing_down_ = true;
17 void __attribute__((optnone)) setCrashString(const char *) {}
18 void __attribute__((optnone)) doTailCall() {}
19 extern "C" void __declspec(noreturn) abort();
21 void __forceinline inlineCrashFrame() {
22 if (shutting_down_ || tearing_down_) {
23 setCrashString("crashing");
24 // MSVC lays out calls to abort out of line, gets the layout we want.
25 abort(); // DexLabel('stop')
29 void __declspec(noinline) callerOfInlineCrashFrame(bool is_keeping_alive) {
30 if (is_keeping_alive)
31 inlineCrashFrame();
32 else
33 doTailCall();
36 int __attribute__((optnone)) main() {
37 callerOfInlineCrashFrame(true);
41 DexExpectProgramState({'frames':[
42 {'function': 'inlineCrashFrame', 'location':{'lineno' : ref('stop')} },
43 {'function': 'callerOfInlineCrashFrame'},
44 {'function': 'main'}
45 ]})