Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / Shell / SymbolFile / NativePDB / source-list.cpp
blobfb749c145aca91be9b674a1784a9ded05b8057b1
1 // clang-format off
2 // REQUIRES: lld, x86
4 // Test that we can set display source of functions.
5 // RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s
6 // RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
7 // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
8 // RUN: %p/Inputs/source-list.lldbinit | FileCheck %s
11 // Some context lines before
12 // the function.
15 int main(int argc, char **argv) {
16 // Here are some comments.
17 // That we should print when listing source.
18 return 0;
21 // Some context lines after
22 // the function.
24 // check lines go at the end so that line numbers stay stable when
25 // changing this file.
27 // CHECK: (lldb) source list -n main
28 // CHECK: File: {{.*}}source-list.cpp
29 // CHECK: 10
30 // CHECK: 11 // Some context lines before
31 // CHECK: 12 // the function.
32 // CHECK: 13
33 // CHECK: 14
34 // CHECK: 15 int main(int argc, char **argv) {
35 // CHECK: 16 // Here are some comments.
36 // CHECK: 17 // That we should print when listing source.
37 // CHECK: 18 return 0;
38 // CHECK: 19 }
39 // CHECK: 20
40 // CHECK: 21 // Some context lines after
41 // CHECK: 22 // the function.
42 // CHECK: 23