aboutsummaryrefslogtreecommitdiff
path: root/lldb/test/Shell/SymbolFile/NativePDB/local-constant.test
blob: 83d376312a2954f5b420896fb13c354447875c29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# REQUIRES: msvc

# Test that we can display local S_CONSTANT records.
# MSVC emits S_CONSTANT for static const locals; clang-cl does not.
# RUN: split-file %s %t
# RUN: %build --compiler=msvc --nodefaultlib -o %t.exe -- %t/main.cpp
# RUN: %lldb -f %t.exe -s %t/commands.input 2>&1 | FileCheck %s

#--- main.cpp

int main() {
  static const int kConstant = 42;
  return kConstant;
}

#--- commands.input

settings set stop-line-count-after 0
break set -n main
run
frame variable
quit

# CHECK: (const int) {{.*}}kConstant = 42