[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / cross-project-tests / debuginfo-tests / dexter-tests / memvars / struct-dse.c
blob8a1b4cdf06c5f7b70350cf2da5ddc2251d6344b9
1 // XFAIL:*
2 //// Currently, LowerDbgDeclare doesn't lower dbg.declares pointing at allocas
3 //// for structs.
5 // REQUIRES: lldb
6 // UNSUPPORTED: system-windows
7 // RUN: %clang -std=gnu11 -O2 -glldb %s -o %t
8 // RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
9 //
10 //// Check debug-info for the escaped struct variable num is reasonable.
12 #include <stdio.h>
13 struct Nums { int a, b, c; };
14 struct Nums glob;
15 __attribute__((__noinline__))
16 void esc(struct Nums* nums) {
17 glob = *nums;
20 __attribute__((__noinline__))
21 int main() {
22 struct Nums nums = { .c=1 }; //// Dead store.
23 printf("s1 nums.c: %d\n", nums.c); // DexLabel('s1')
25 nums.c = 2; //// Killing store.
26 printf("s2 nums.c: %d\n", nums.c); // DexLabel('s2')
28 esc(&nums); //// Force nums to live on the stack.
29 return 0; // DexLabel('s3')
32 // DexExpectWatchValue('nums.c', '1', on_line=ref('s1'))
33 // DexExpectWatchValue('nums.c', '2', from_line=ref('s2'), to_line=ref('s3'))