summaryrefslogtreecommitdiffstats
path: root/lldb/test/Shell/SymbolFile/NativePDB
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-10-09 16:38:47 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-10-09 16:38:47 +0000
commit22314179f0660c172514b397060fd8f34b586e82 (patch)
treeafb3f04cd285733772ffceec4ccf3d8539dca91c /lldb/test/Shell/SymbolFile/NativePDB
parentdf14bd315db94d286c0c75b4b6ee5d760f311399 (diff)
downloadbcm5719-llvm-22314179f0660c172514b397060fd8f34b586e82.tar.gz
bcm5719-llvm-22314179f0660c172514b397060fd8f34b586e82.zip
[test] Split LLDB tests into API, Shell & Unit
LLDB has three major testing strategies: unit tests, tests that exercise the SB API though dotest.py and what we currently call lit tests. The later is rather confusing as we're now using lit as the driver for all three types of tests. As most of this grew organically, the directory structure in the LLDB repository doesn't really make this clear. The 'lit' tests are part of the root and among these tests there's a Unit and Suite folder for the unit and dotest-tests. This layout makes it impossible to run just the lit tests. This patch changes the directory layout to match the 3 testing strategies, each with their own directory and their own configuration file. This means there are now 3 directories under lit with 3 corresponding targets: - API (check-lldb-api): Test exercising the SB API. - Shell (check-lldb-shell): Test exercising command line utilities. - Unit (check-lldb-unit): Unit tests. Finally, there's still the `check-lldb` target that runs all three test suites. Finally, this also renames the lit folder to `test` to match the LLVM repository layout. Differential revision: https://reviews.llvm.org/D68606 llvm-svn: 374184
Diffstat (limited to 'lldb/test/Shell/SymbolFile/NativePDB')
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-functions.lldbinit8
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-methods.lldbinit5
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-types.lldbinit25
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/bitfields.lldbinit5
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/break-by-function.lldbinit6
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/break-by-line.lldbinit3
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/disassembly.lldbinit2
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/function-types-builtins.lldbinit70
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/function-types-calling-conv.lldbinit7
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/function-types-classes.lldbinit14
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/globals-bss.lldbinit3
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/globals-classes.lldbinit16
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/globals-fundamental.lldbinit222
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables.lldbinit32
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/nested-types.lldbinit13
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/s_constant.lldbinit25
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/s_constant.s971
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/source-list.lldbinit3
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/stack_unwinding01.lldbinit8
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/Inputs/tag-types.lldbinit10
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/ast-functions-msvc.cpp7
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/ast-functions.cpp28
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/ast-methods.cpp36
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp153
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/bitfields.cpp60
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/break-by-function.cpp57
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/break-by-line.cpp26
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/disassembly.cpp38
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/function-types-builtins.cpp218
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/function-types-calling-conv.cpp32
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp141
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/global-classes.cpp385
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/globals-bss.cpp34
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/globals-fundamental.cpp879
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp161
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/nested-types.cpp153
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/s_constant.cpp115
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/source-list.cpp42
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/stack_unwinding01.cpp42
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/tag-types.cpp249
-rw-r--r--lldb/test/Shell/SymbolFile/NativePDB/typedefs.cpp71
41 files changed, 4375 insertions, 0 deletions
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-functions.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-functions.lldbinit
new file mode 100644
index 00000000000..c25d96c531d
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-functions.lldbinit
@@ -0,0 +1,8 @@
+
+break set -n main
+break set -n static_fn
+break set -n varargs_fn
+
+target modules dump ast
+
+quit
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-methods.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-methods.lldbinit
new file mode 100644
index 00000000000..6d593589c4a
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-methods.lldbinit
@@ -0,0 +1,5 @@
+target variable s
+
+target modules dump ast
+
+quit
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-types.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-types.lldbinit
new file mode 100644
index 00000000000..b317c4ab343
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-types.lldbinit
@@ -0,0 +1,25 @@
+target variable TC
+target variable TS
+target variable TU
+target variable TE
+
+target variable ABCInt
+target variable ABCFloat
+target variable ABCVoid
+
+target variable AC0
+target variable ACNeg1
+
+target variable AC1D
+target variable AC0D
+target variable ACNeg1D
+target variable AD
+target variable ADE
+
+target variable AnonInt
+target variable AnonABCVoid
+target variable AnonABCVoidD
+
+target modules dump ast
+
+quit
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/bitfields.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/bitfields.lldbinit
new file mode 100644
index 00000000000..cf06c494e67
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/bitfields.lldbinit
@@ -0,0 +1,5 @@
+settings set auto-one-line-summaries false
+
+target variable -T TheStruct
+
+target modules dump ast
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/break-by-function.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/break-by-function.lldbinit
new file mode 100644
index 00000000000..ff9bf21a886
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/break-by-function.lldbinit
@@ -0,0 +1,6 @@
+break set -n main
+break set -n OvlGlobalFn
+break set -n StaticFn
+break set -n DoesntExist
+break list
+quit
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/break-by-line.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/break-by-line.lldbinit
new file mode 100644
index 00000000000..7daa53ba24e
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/break-by-line.lldbinit
@@ -0,0 +1,3 @@
+break set -f break-by-line.cpp -l 14
+break list
+quit
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/disassembly.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/disassembly.lldbinit
new file mode 100644
index 00000000000..2b552a0b01d
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/disassembly.lldbinit
@@ -0,0 +1,2 @@
+disassemble --flavor=intel -m -n main
+quit
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/function-types-builtins.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/function-types-builtins.lldbinit
new file mode 100644
index 00000000000..fe29896b5f5
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/function-types-builtins.lldbinit
@@ -0,0 +1,70 @@
+command alias dv target variable
+
+dv aa
+dv ab
+dv ac
+dv ad
+dv ae
+dv af
+dv ag
+dv ah
+dv ai
+dv aj
+dv ak
+dv al
+dv am
+dv an
+dv ao
+dv aq
+dv ar
+dv as
+dv at
+dv au
+dv av
+dv aw
+dv ax
+dv ay
+dv az
+dv aaa
+dv aab
+dv aac
+dv aad
+dv ra
+dv rb
+dv rc
+dv rd
+dv re
+dv rf
+dv rg
+dv rh
+dv ri
+dv rj
+dv rk
+dv rl
+dv rm
+dv rn
+dv ro
+dv rq
+dv rr
+dv rs
+dv rt
+dv ru
+dv rv
+dv rw
+dv rx
+dv ry
+dv rz
+dv raa
+dv rab
+dv rac
+dv rad
+dv ref
+dv ref2
+dv ref3
+dv binp
+dv binr
+dv null
+dv rae
+dv aae
+
+quit
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/function-types-calling-conv.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/function-types-calling-conv.lldbinit
new file mode 100644
index 00000000000..8664881b262
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/function-types-calling-conv.lldbinit
@@ -0,0 +1,7 @@
+target variable sfn
+target variable ffn
+target variable tfn
+target variable cfn
+target variable vfn
+
+quit
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/function-types-classes.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/function-types-classes.lldbinit
new file mode 100644
index 00000000000..c06c650e1c4
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/function-types-classes.lldbinit
@@ -0,0 +1,14 @@
+target variable a
+target variable b
+target variable c
+target variable d
+target variable e
+target variable f
+target variable g
+target variable h
+target variable i
+target variable incomplete
+
+target modules dump ast
+
+quit
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/globals-bss.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/globals-bss.lldbinit
new file mode 100644
index 00000000000..9bf066ee2af
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/globals-bss.lldbinit
@@ -0,0 +1,3 @@
+target variable GlobalVariable
+
+quit
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/globals-classes.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/globals-classes.lldbinit
new file mode 100644
index 00000000000..cafb863d85f
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/globals-classes.lldbinit
@@ -0,0 +1,16 @@
+settings set auto-one-line-summaries false
+
+target variable -T ClassWithPaddingInstance
+target variable -T ClassNoPaddingInstance
+target variable -T DC
+target variable -T EBOC
+target variable -T PBC
+
+target variable -T UnnamedClassInstance
+
+target variable -T PointersInstance
+target variable -T ReferencesInstance
+
+target modules dump ast
+
+quit \ No newline at end of file
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/globals-fundamental.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/globals-fundamental.lldbinit
new file mode 100644
index 00000000000..4af8b658742
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/globals-fundamental.lldbinit
@@ -0,0 +1,222 @@
+target variable BFalse
+target variable BTrue
+target variable CA
+target variable CZ
+target variable SCa
+target variable SCz
+target variable UC24
+target variable UC42
+target variable C16_24
+target variable C32_42
+target variable WC1
+target variable WCP
+target variable SMax
+target variable SMin
+target variable USMax
+target variable USMin
+target variable IMax
+target variable IMin
+target variable UIMax
+target variable UIMin
+target variable LMax
+target variable LMin
+target variable ULMax
+target variable ULMin
+target variable LLMax
+target variable LLMin
+target variable ULLMax
+target variable ULLMin
+target variable F
+target variable D
+
+target variable CBFalse
+target variable CBTrue
+target variable CCA
+target variable CCZ
+target variable CSCa
+target variable CSCz
+target variable CUC24
+target variable CUC42
+target variable CC16_24
+target variable CC32_42
+target variable CWC1
+target variable CWCP
+target variable CSMax
+target variable CSMin
+target variable CUSMax
+target variable CUSMin
+target variable CIMax
+target variable CIMin
+target variable CUIMax
+target variable CUIMin
+target variable CLMax
+target variable CLMin
+target variable CULMax
+target variable CULMin
+target variable CLLMax
+target variable CLLMin
+target variable CULLMax
+target variable CULLMin
+target variable CF
+target variable CD
+
+target variable ConstexprBFalse
+target variable ConstexprBTrue
+target variable ConstexprCA
+target variable ConstexprCZ
+target variable ConstexprSCa
+target variable ConstexprSCz
+target variable ConstexprUC24
+target variable ConstexprUC42
+target variable ConstexprC16_24
+target variable ConstexprC32_42
+target variable ConstexprWC1
+target variable ConstexprWCP
+target variable ConstexprSMax
+target variable ConstexprSMin
+target variable ConstexprUSMax
+target variable ConstexprUSMin
+target variable ConstexprIMax
+target variable ConstexprIMin
+target variable ConstexprUIMax
+target variable ConstexprUIMin
+target variable ConstexprLMax
+target variable ConstexprLMin
+target variable ConstexprULMax
+target variable ConstexprULMin
+target variable ConstexprLLMax
+target variable ConstexprLLMin
+target variable ConstexprULLMax
+target variable ConstexprULLMin
+target variable ConstexprF
+target variable ConstexprD
+
+target variable PBFalse
+target variable PBTrue
+target variable PCA
+target variable PCZ
+target variable PSCa
+target variable PSCz
+target variable PUC24
+target variable PUC42
+target variable PC16_24
+target variable PC32_42
+target variable PWC1
+target variable PWCP
+target variable PSMax
+target variable PSMin
+target variable PUSMax
+target variable PUSMin
+target variable PIMax
+target variable PIMin
+target variable PUIMax
+target variable PUIMin
+target variable PLMax
+target variable PLMin
+target variable PULMax
+target variable PULMin
+target variable PLLMax
+target variable PLLMin
+target variable PULLMax
+target variable PULLMin
+target variable PF
+target variable PD
+
+target variable CPBFalse
+target variable CPBTrue
+target variable CPCA
+target variable CPCZ
+target variable CPSCa
+target variable CPSCz
+target variable CPUC24
+target variable CPUC42
+target variable CPC16_24
+target variable CPC32_42
+target variable CPWC1
+target variable CPWCP
+target variable CPSMax
+target variable CPSMin
+target variable CPUSMax
+target variable CPUSMin
+target variable CPIMax
+target variable CPIMin
+target variable CPUIMax
+target variable CPUIMin
+target variable CPLMax
+target variable CPLMin
+target variable CPULMax
+target variable CPULMin
+target variable CPLLMax
+target variable CPLLMin
+target variable CPULLMax
+target variable CPULLMin
+target variable CPF
+target variable CPD
+
+target variable RBFalse
+target variable RBTrue
+target variable RCA
+target variable RCZ
+target variable RSCa
+target variable RSCz
+target variable RUC24
+target variable RUC42
+target variable RSMax
+target variable RSMin
+target variable RUSMax
+target variable RUSMin
+target variable RIMax
+target variable RIMin
+target variable RUIMax
+target variable RUIMin
+target variable RLMax
+target variable RLMin
+target variable RULMax
+target variable RULMin
+target variable RLLMax
+target variable RLLMin
+target variable RULLMax
+target variable RULLMin
+target variable RF
+target variable RD
+
+target variable CRBFalse
+target variable CRBTrue
+target variable CRCA
+target variable CRCZ
+target variable CRSCa
+target variable CRSCz
+target variable CRUC24
+target variable CRUC42
+target variable CRSMax
+target variable CRSMin
+target variable CRUSMax
+target variable CRUSMin
+target variable CRIMax
+target variable CRIMin
+target variable CRUIMax
+target variable CRUIMin
+target variable CRLMax
+target variable CRLMin
+target variable CRULMax
+target variable CRULMin
+target variable CRLLMax
+target variable CRLLMin
+target variable CRULLMax
+target variable CRULLMin
+target variable CRF
+target variable CRD
+
+target variable RC16_24
+target variable RC32_42
+target variable RWC1
+target variable RWCP
+target variable CRC16_24
+target variable CRC32_42
+target variable CRWC1
+target variable CRWCP
+
+target modules dump ast
+
+
+quit \ No newline at end of file
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables.lldbinit
new file mode 100644
index 00000000000..0d7371e86f1
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables.lldbinit
@@ -0,0 +1,32 @@
+break set -n main
+run a b c d e f g
+p argc
+step
+p SomeLocal
+step
+p Param1
+p Param2
+step
+p Param1
+p Param2
+p Local1
+step
+p Param1
+p Param2
+p Local1
+p Local2
+step
+p Param1
+p Param2
+p Local1
+p Local2
+step
+p Param1
+p Param2
+p Local1
+p Local2
+continue
+
+target modules dump ast
+
+quit
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/nested-types.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/nested-types.lldbinit
new file mode 100644
index 00000000000..466df81fc42
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/nested-types.lldbinit
@@ -0,0 +1,13 @@
+settings set auto-one-line-summaries false
+
+target variable -T GlobalA
+target variable -T GlobalB
+target variable -T GlobalC
+target variable -T GlobalD
+target variable -T GlobalE
+target variable -T GlobalF
+target variable -T GlobalG
+target variable -T GlobalH
+target variable -T GlobalEnum
+
+target modules dump ast
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/s_constant.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/s_constant.lldbinit
new file mode 100644
index 00000000000..1a50d808cdc
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/s_constant.lldbinit
@@ -0,0 +1,25 @@
+target variable GlobalLUEA
+target variable GlobalLUEB
+target variable GlobalLUEC
+
+target variable GlobalLSEA
+target variable GlobalLSEB
+target variable GlobalLSEC
+
+target variable GlobalUEA
+target variable GlobalUEB
+target variable GlobalUEC
+
+target variable GlobalSEA
+target variable GlobalSEB
+target variable GlobalSEC
+
+target variable GlobalSUEA
+target variable GlobalSUEB
+target variable GlobalSUEC
+
+target variable GlobalSSEA
+target variable GlobalSSEB
+target variable GlobalSSEC
+
+quit
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/s_constant.s b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/s_constant.s
new file mode 100644
index 00000000000..6eaa80cf850
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/s_constant.s
@@ -0,0 +1,971 @@
+ .text
+ .def @feat.00;
+ .scl 3;
+ .type 0;
+ .endef
+ .globl @feat.00
+.set @feat.00, 0
+ .intel_syntax noprefix
+ .def main;
+ .scl 2;
+ .type 32;
+ .endef
+ .globl main # -- Begin function main
+ .p2align 4, 0x90
+main: # @main
+.Lfunc_begin0:
+ .cv_func_id 0
+ .cv_file 1 "D:\\src\\llvm-mono\\lldb\\lit\\SymbolFile\\NativePDB\\s_constant.cpp" "7F1DA683A9B72A1360C1FDEDD7550E06" 1
+ .cv_loc 0 1 79 0 # D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp:79:0
+.seh_proc main
+# %bb.0: # %entry
+ sub rsp, 24
+ .seh_stackalloc 24
+ .seh_endprologue
+ xor eax, eax
+ mov dword ptr [rsp + 20], 0
+ mov qword ptr [rsp + 8], rdx
+ mov dword ptr [rsp + 4], ecx
+.Ltmp0:
+ .cv_loc 0 1 80 0 # D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp:80:0
+ add rsp, 24
+ ret
+.Ltmp1:
+.Lfunc_end0:
+ .seh_handlerdata
+ .text
+ .seh_endproc
+ # -- End function
+ .section .rdata,"dr"
+ .p2align 3 # @GlobalLUEA
+GlobalLUEA:
+ .quad 0 # 0x0
+
+ .p2align 3 # @GlobalLUEB
+GlobalLUEB:
+ .quad 1000 # 0x3e8
+
+ .p2align 3 # @GlobalLUEC
+GlobalLUEC:
+ .quad -16 # 0xfffffffffffffff0
+
+ .p2align 3 # @GlobalLSEA
+GlobalLSEA:
+ .quad 0 # 0x0
+
+ .p2align 3 # @GlobalLSEB
+GlobalLSEB:
+ .quad 9223372036854775000 # 0x7ffffffffffffcd8
+
+ .p2align 3 # @GlobalLSEC
+GlobalLSEC:
+ .quad -9223372036854775000 # 0x8000000000000328
+
+ .p2align 2 # @GlobalUEA
+GlobalUEA:
+ .long 0 # 0x0
+
+ .p2align 2 # @GlobalUEB
+GlobalUEB:
+ .long 1000 # 0x3e8
+
+ .p2align 2 # @GlobalUEC
+GlobalUEC:
+ .long 4294000000 # 0xfff13d80
+
+ .p2align 2 # @GlobalSEA
+GlobalSEA:
+ .long 0 # 0x0
+
+ .p2align 2 # @GlobalSEB
+GlobalSEB:
+ .long 2147000000 # 0x7ff89ec0
+
+ .p2align 2 # @GlobalSEC
+GlobalSEC:
+ .long 2147967296 # 0x80076140
+
+GlobalSUEA: # @GlobalSUEA
+ .byte 0 # 0x0
+
+GlobalSUEB: # @GlobalSUEB
+ .byte 100 # 0x64
+
+GlobalSUEC: # @GlobalSUEC
+ .byte 200 # 0xc8
+
+GlobalSSEA: # @GlobalSSEA
+ .byte 0 # 0x0
+
+GlobalSSEB: # @GlobalSSEB
+ .byte 100 # 0x64
+
+GlobalSSEC: # @GlobalSSEC
+ .byte 156 # 0x9c
+
+ .section .drectve,"yn"
+ .ascii " /DEFAULTLIB:libcmt.lib"
+ .ascii " /DEFAULTLIB:oldnames.lib"
+ .section .debug$S,"dr"
+ .p2align 2
+ .long 4 # Debug section magic
+ .long 241
+ .long .Ltmp3-.Ltmp2 # Subsection size
+.Ltmp2:
+ .short .Ltmp5-.Ltmp4 # Record length
+.Ltmp4:
+ .short 4412 # Record kind: S_COMPILE3
+ .long 1 # Flags and language
+ .short 208 # CPUType
+ .short 8 # Frontend version
+ .short 0
+ .short 0
+ .short 0
+ .short 8000 # Backend version
+ .short 0
+ .short 0
+ .short 0
+ .asciz "clang version 8.0.0 " # Null-terminated compiler version string
+.Ltmp5:
+.Ltmp3:
+ .p2align 2
+ .long 241 # Symbol subsection for main
+ .long .Ltmp7-.Ltmp6 # Subsection size
+.Ltmp6:
+ .short .Ltmp9-.Ltmp8 # Record length
+.Ltmp8:
+ .short 4423 # Record kind: S_GPROC32_ID
+ .long 0 # PtrParent
+ .long 0 # PtrEnd
+ .long 0 # PtrNext
+ .long .Lfunc_end0-main # Code size
+ .long 0 # Offset after prologue
+ .long 0 # Offset before epilogue
+ .long 4099 # Function type index
+ .secrel32 main # Function section relative address
+ .secidx main # Function section index
+ .byte 0 # Flags
+ .asciz "main" # Function name
+.Ltmp9:
+ .short .Ltmp11-.Ltmp10 # Record length
+.Ltmp10:
+ .short 4114 # Record kind: S_FRAMEPROC
+ .long 24 # FrameSize
+ .long 0 # Padding
+ .long 0 # Offset of padding
+ .long 0 # Bytes of callee saved registers
+ .long 0 # Exception handler offset
+ .short 0 # Exception handler section
+ .long 81920 # Flags (defines frame register)
+.Ltmp11:
+ .short .Ltmp13-.Ltmp12 # Record length
+.Ltmp12:
+ .short 4414 # Record kind: S_LOCAL
+ .long 116 # TypeIndex
+ .short 1 # Flags
+ .asciz "argc"
+.Ltmp13:
+ .cv_def_range .Ltmp0 .Ltmp1, frame_ptr_rel, 4
+ .short .Ltmp15-.Ltmp14 # Record length
+.Ltmp14:
+ .short 4414 # Record kind: S_LOCAL
+ .long 4096 # TypeIndex
+ .short 1 # Flags
+ .asciz "argv"
+.Ltmp15:
+ .cv_def_range .Ltmp0 .Ltmp1, frame_ptr_rel, 8
+ .short 2 # Record length
+ .short 4431 # Record kind: S_PROC_ID_END
+.Ltmp7:
+ .p2align 2
+ .cv_linetable 0, main, .Lfunc_end0
+ .long 241 # Symbol subsection for globals
+ .long .Ltmp17-.Ltmp16 # Subsection size
+.Ltmp16:
+ .short .Ltmp19-.Ltmp18 # Record length
+.Ltmp18:
+ .short 4359 # Record kind: S_CONSTANT
+ .long 4104 # Type
+ .short 0 # Value
+ .asciz "GlobalLUEA" # Name
+.Ltmp19:
+ .short .Ltmp21-.Ltmp20 # Record length
+.Ltmp20:
+ .short 4359 # Record kind: S_CONSTANT
+ .long 4104 # Type
+ .short 1000 # Value
+ .asciz "GlobalLUEB" # Name
+.Ltmp21:
+ .short .Ltmp23-.Ltmp22 # Record length
+.Ltmp22:
+ .short 4359 # Record kind: S_CONSTANT
+ .long 4104 # Type
+ .byte 0x00, 0x80, 0xf0 # Value
+ .asciz "GlobalLUEC" # Name
+.Ltmp23:
+ .short .Ltmp25-.Ltmp24 # Record length
+.Ltmp24:
+ .short 4359 # Record kind: S_CONSTANT
+ .long 4108 # Type
+ .byte 0x00, 0x00 # Value
+ .asciz "GlobalLSEA" # Name
+.Ltmp25:
+ .short .Ltmp27-.Ltmp26 # Record length
+.Ltmp26:
+ .short 4359 # Record kind: S_CONSTANT
+ .long 4108 # Type
+ .byte 0x0A, 0x80, 0xD8, 0xFC # Value
+ .byte 0xFF, 0xFF, 0xFF, 0xFF
+ .byte 0xFF, 0x7F
+ .asciz "GlobalLSEB" # Name
+.Ltmp27:
+ .short .Ltmp29-.Ltmp28 # Record length
+.Ltmp28:
+ .short 4359 # Record kind: S_CONSTANT
+ .long 4108 # Type
+ .byte 0x09, 0x80, 0x28, 0x03 # Value
+ .byte 0x00, 0x00, 0x00, 0x00
+ .byte 0x00, 0x80
+ .asciz "GlobalLSEC" # Name
+.Ltmp29:
+ .short .Ltmp31-.Ltmp30 # Record length
+.Ltmp30:
+ .short 4359 # Record kind: S_CONSTANT
+ .long 4112 # Type
+ .byte 0x00, 0x00 # Value
+ .asciz "GlobalUEA" # Name
+.Ltmp31:
+ .short .Ltmp33-.Ltmp32 # Record length
+.Ltmp32:
+ .short 4359 # Record kind: S_CONSTANT
+ .long 4112 # Type
+ .byte 0xe8, 0x03 # Value
+ .asciz "GlobalUEB" # Name
+.Ltmp33:
+ .short .Ltmp35-.Ltmp34 # Record length
+.Ltmp34:
+ .short 4359 # Record kind: S_CONSTANT
+ .long 4112 # Type
+ .byte 0x04, 0x80, 0x80, 0x3d # Value
+ .byte 0xf1, 0xff
+ .asciz "GlobalUEC" # Name
+.Ltmp35:
+ .short .Ltmp37-.Ltmp36 # Record length
+.Ltmp36:
+ .short 4359 # Record kind: S_CONSTANT
+ .long 4116 # Type
+ .byte 0x00, 0x00 # Value
+ .asciz "GlobalSEA" # Name
+.Ltmp37:
+ .short .Ltmp39-.Ltmp38 # Record length
+.Ltmp38:
+ .short 4359 # Record kind: S_CONSTANT
+ .long 4116 # Type
+ .byte 0x04, 0x80, 0xc0, 0x9e # Value
+ .byte 0xf8, 0x7f
+ .asciz "GlobalSEB" # Name
+.Ltmp39:
+ .short .Ltmp41-.Ltmp40 # Record length
+.Ltmp40:
+ .short 4359 # Record kind: S_CONSTANT
+ .long 4116 # Type
+ .byte 0x03, 0x80, 0x40, 0x61 # Value
+ .byte 0x07, 0x80
+ .asciz "GlobalSEC" # Name
+.Ltmp41:
+ .short .Ltmp43-.Ltmp42 # Record length
+.Ltmp42:
+ .short 4359 # Record kind: S_CONSTANT
+ .long 4120 # Type
+ .byte 0x00, 0x00 # Value
+ .asciz "GlobalSUEA" # Name
+.Ltmp43:
+ .short .Ltmp45-.Ltmp44 # Record length
+.Ltmp44:
+ .short 4359 # Record kind: S_CONSTANT
+ .long 4120 # Type
+ .byte 0x64, 0x00 # Value
+ .asciz "GlobalSUEB" # Name
+.Ltmp45:
+ .short .Ltmp47-.Ltmp46 # Record length
+.Ltmp46:
+ .short 4359 # Record kind: S_CONSTANT
+ .long 4120 # Type
+ .byte 0xc8, 0x00 # Value
+ .asciz "GlobalSUEC" # Name
+.Ltmp47:
+ .short .Ltmp49-.Ltmp48 # Record length
+.Ltmp48:
+ .short 4359 # Record kind: S_CONSTANT
+ .long 4124 # Type
+ .byte 0x00, 0x00 # Value
+ .asciz "GlobalSSEA" # Name
+.Ltmp49:
+ .short .Ltmp51-.Ltmp50 # Record length
+.Ltmp50:
+ .short 4359 # Record kind: S_CONSTANT
+ .long 4124 # Type
+ .byte 0x64, 0x00 # Value
+ .asciz "GlobalSSEB" # Name
+.Ltmp51:
+ .short .Ltmp53-.Ltmp52 # Record length
+.Ltmp52:
+ .short 4359 # Record kind: S_CONSTANT
+ .long 4124 # Type
+ .byte 0x00, 0x80, 0x9c # Value
+ .asciz "GlobalSSEC" # Name
+.Ltmp53:
+.Ltmp17:
+ .p2align 2
+ .cv_filechecksums # File index to string table offset subsection
+ .cv_stringtable # String table
+ .long 241
+ .long .Ltmp55-.Ltmp54 # Subsection size
+.Ltmp54:
+ .short 6 # Record length
+ .short 4428 # Record kind: S_BUILDINFO
+ .long 4127 # LF_BUILDINFO index
+.Ltmp55:
+ .p2align 2
+ .section .debug$T,"dr"
+ .p2align 2
+ .long 4 # Debug section magic
+ # Pointer (0x1000) {
+ # TypeLeafKind: LF_POINTER (0x1002)
+ # PointeeType: char* (0x670)
+ # PointerAttributes: 0x1000C
+ # PtrType: Near64 (0xC)
+ # PtrMode: Pointer (0x0)
+ # IsFlat: 0
+ # IsConst: 0
+ # IsVolatile: 0
+ # IsUnaligned: 0
+ # IsRestrict: 0
+ # SizeOf: 8
+ # }
+ .byte 0x0a, 0x00, 0x02, 0x10
+ .byte 0x70, 0x06, 0x00, 0x00
+ .byte 0x0c, 0x00, 0x01, 0x00
+ # ArgList (0x1001) {
+ # TypeLeafKind: LF_ARGLIST (0x1201)
+ # NumArgs: 2
+ # Arguments [
+ # ArgType: int (0x74)
+ # ArgType: char** (0x1000)
+ # ]
+ # }
+ .byte 0x0e, 0x00, 0x01, 0x12
+ .byte 0x02, 0x00, 0x00, 0x00
+ .byte 0x74, 0x00, 0x00, 0x00
+ .byte 0x00, 0x10, 0x00, 0x00
+ # Procedure (0x1002) {
+ # TypeLeafKind: LF_PROCEDURE (0x1008)
+ # ReturnType: int (0x74)
+ # CallingConvention: NearC (0x0)
+ # FunctionOptions [ (0x0)
+ # ]
+ # NumParameters: 2
+ # ArgListType: (int, char**) (0x1001)
+ # }
+ .byte 0x0e, 0x00, 0x08, 0x10
+ .byte 0x74, 0x00, 0x00, 0x00
+ .byte 0x00, 0x00, 0x02, 0x00
+ .byte 0x01, 0x10, 0x00, 0x00
+ # FuncId (0x1003) {
+ # TypeLeafKind: LF_FUNC_ID (0x1601)
+ # ParentScope: 0x0
+ # FunctionType: int (int, char**) (0x1002)
+ # Name: main
+ # }
+ .byte 0x12, 0x00, 0x01, 0x16
+ .byte 0x00, 0x00, 0x00, 0x00
+ .byte 0x02, 0x10, 0x00, 0x00
+ .byte 0x6d, 0x61, 0x69, 0x6e
+ .byte 0x00, 0xf3, 0xf2, 0xf1
+ # FieldList (0x1004) {
+ # TypeLeafKind: LF_FIELDLIST (0x1203)
+ # Enumerator {
+ # TypeLeafKind: LF_ENUMERATE (0x1502)
+ # AccessSpecifier: Public (0x3)
+ # EnumValue: 0
+ # Name: LUE_A
+ # }
+ # Enumerator {
+ # TypeLeafKind: LF_ENUMERATE (0x1502)
+ # AccessSpecifier: Public (0x3)
+ # EnumValue: 1000
+ # Name: LUE_B
+ # }
+ # Enumerator {
+ # TypeLeafKind: LF_ENUMERATE (0x1502)
+ # AccessSpecifier: Public (0x3)
+ # EnumValue: 18446744073709551600
+ # Name: LUE_C
+ # }
+ # }
+ .byte 0x2e, 0x00, 0x03, 0x12
+ .byte 0x02, 0x15, 0x03, 0x00
+ .byte 0x00, 0x00, 0x4c, 0x55
+ .byte 0x45, 0x5f, 0x41, 0x00
+ .byte 0x02, 0x15, 0x03, 0x00
+ .byte 0xe8, 0x03, 0x4c, 0x55
+ .byte 0x45, 0x5f, 0x42, 0x00
+ .byte 0x02, 0x15, 0x03, 0x00
+ .byte 0x0a, 0x80, 0xf0, 0xff
+ .byte 0xff, 0xff, 0xff, 0xff
+ .byte 0xff, 0xff, 0x4c, 0x55
+ .byte 0x45, 0x5f, 0x43, 0x00
+ # Enum (0x1005) {
+ # TypeLeafKind: LF_ENUM (0x1507)
+ # NumEnumerators: 3
+ # Properties [ (0x200)
+ # HasUniqueName (0x200)
+ # ]
+ # UnderlyingType: unsigned __int64 (0x23)
+ # FieldListType: <field list> (0x1004)
+ # Name: A::B::C::LargeUnsignedEnum
+ # LinkageName: .?AW4LargeUnsignedEnum@C@B@A@@
+ # }
+ .byte 0x4a, 0x00, 0x07, 0x15
+ .byte 0x03, 0x00, 0x00, 0x02
+ .byte 0x23, 0x00, 0x00, 0x00
+ .byte 0x04, 0x10, 0x00, 0x00
+ .byte 0x41, 0x3a, 0x3a, 0x42
+ .byte 0x3a, 0x3a, 0x43, 0x3a
+ .byte 0x3a, 0x4c, 0x61, 0x72
+ .byte 0x67, 0x65, 0x55, 0x6e
+ .byte 0x73, 0x69, 0x67, 0x6e
+ .byte 0x65, 0x64, 0x45, 0x6e
+ .byte 0x75, 0x6d, 0x00, 0x2e
+ .byte 0x3f, 0x41, 0x57, 0x34
+ .byte 0x4c, 0x61, 0x72, 0x67
+ .byte 0x65, 0x55, 0x6e, 0x73
+ .byte 0x69, 0x67, 0x6e, 0x65
+ .byte 0x64, 0x45, 0x6e, 0x75
+ .byte 0x6d, 0x40, 0x43, 0x40
+ .byte 0x42, 0x40, 0x41, 0x40
+ .byte 0x40, 0x00, 0xf2, 0xf1
+ # StringId (0x1006) {
+ # TypeLeafKind: LF_STRING_ID (0x1605)
+ # Id: 0x0
+ # StringData: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp
+ # }
+ .byte 0x46, 0x00, 0x05, 0x16
+ .byte 0x00, 0x00, 0x00, 0x00
+ .byte 0x44, 0x3a, 0x5c, 0x73
+ .byte 0x72, 0x63, 0x5c, 0x6c
+ .byte 0x6c, 0x76, 0x6d, 0x2d
+ .byte 0x6d, 0x6f, 0x6e, 0x6f
+ .byte 0x5c, 0x6c, 0x6c, 0x64
+ .byte 0x62, 0x5c, 0x6c, 0x69
+ .byte 0x74, 0x5c, 0x53, 0x79
+ .byte 0x6d, 0x62, 0x6f, 0x6c
+ .byte 0x46, 0x69, 0x6c, 0x65
+ .byte 0x5c, 0x4e, 0x61, 0x74
+ .byte 0x69, 0x76, 0x65, 0x50
+ .byte 0x44, 0x42, 0x5c, 0x73
+ .byte 0x5f, 0x63, 0x6f, 0x6e
+ .byte 0x73, 0x74, 0x61, 0x6e
+ .byte 0x74, 0x2e, 0x63, 0x70
+ .byte 0x70, 0x00, 0xf2, 0xf1
+ # UdtSourceLine (0x1007) {
+ # TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
+ # UDT: A::B::C::LargeUnsignedEnum (0x1005)
+ # SourceFile: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp (0x1006)
+ # LineNumber: 14
+ # }
+ .byte 0x0e, 0x00, 0x06, 0x16
+ .byte 0x05, 0x10, 0x00, 0x00
+ .byte 0x06, 0x10, 0x00, 0x00
+ .byte 0x0e, 0x00, 0x00, 0x00
+ # Modifier (0x1008) {
+ # TypeLeafKind: LF_MODIFIER (0x1001)
+ # ModifiedType: A::B::C::LargeUnsignedEnum (0x1005)
+ # Modifiers [ (0x1)
+ # Const (0x1)
+ # ]
+ # }
+ .byte 0x0a, 0x00, 0x01, 0x10
+ .byte 0x05, 0x10, 0x00, 0x00
+ .byte 0x01, 0x00, 0xf2, 0xf1
+ # FieldList (0x1009) {
+ # TypeLeafKind: LF_FIELDLIST (0x1203)
+ # Enumerator {
+ # TypeLeafKind: LF_ENUMERATE (0x1502)
+ # AccessSpecifier: Public (0x3)
+ # EnumValue: 0
+ # Name: LSE_A
+ # }
+ # Enumerator {
+ # TypeLeafKind: LF_ENUMERATE (0x1502)
+ # AccessSpecifier: Public (0x3)
+ # EnumValue: 9223372036854775000
+ # Name: LSE_B
+ # }
+ # Enumerator {
+ # TypeLeafKind: LF_ENUMERATE (0x1502)
+ # AccessSpecifier: Public (0x3)
+ # EnumValue: 9223372036854776616
+ # Name: LSE_C
+ # }
+ # }
+ .byte 0x36, 0x00, 0x03, 0x12
+ .byte 0x02, 0x15, 0x03, 0x00
+ .byte 0x00, 0x00, 0x4c, 0x53
+ .byte 0x45, 0x5f, 0x41, 0x00
+ .byte 0x02, 0x15, 0x03, 0x00
+ .byte 0x0a, 0x80, 0xd8, 0xfc
+ .byte 0xff, 0xff, 0xff, 0xff
+ .byte 0xff, 0x7f, 0x4c, 0x53
+ .byte 0x45, 0x5f, 0x42, 0x00
+ .byte 0x02, 0x15, 0x03, 0x00
+ .byte 0x0a, 0x80, 0x28, 0x03
+ .byte 0x00, 0x00, 0x00, 0x00
+ .byte 0x00, 0x80, 0x4c, 0x53
+ .byte 0x45, 0x5f, 0x43, 0x00
+ # Enum (0x100A) {
+ # TypeLeafKind: LF_ENUM (0x1507)
+ # NumEnumerators: 3
+ # Properties [ (0x200)
+ # HasUniqueName (0x200)
+ # ]
+ # UnderlyingType: __int64 (0x13)
+ # FieldListType: <field list> (0x1009)
+ # Name: A::B::C::LargeSignedEnum
+ # LinkageName: .?AW4LargeSignedEnum@C@B@A@@
+ # }
+ .byte 0x46, 0x00, 0x07, 0x15
+ .byte 0x03, 0x00, 0x00, 0x02
+ .byte 0x13, 0x00, 0x00, 0x00
+ .byte 0x09, 0x10, 0x00, 0x00
+ .byte 0x41, 0x3a, 0x3a, 0x42
+ .byte 0x3a, 0x3a, 0x43, 0x3a
+ .byte 0x3a, 0x4c, 0x61, 0x72
+ .byte 0x67, 0x65, 0x53, 0x69
+ .byte 0x67, 0x6e, 0x65, 0x64
+ .byte 0x45, 0x6e, 0x75, 0x6d
+ .byte 0x00, 0x2e, 0x3f, 0x41
+ .byte 0x57, 0x34, 0x4c, 0x61
+ .byte 0x72, 0x67, 0x65, 0x53
+ .byte 0x69, 0x67, 0x6e, 0x65
+ .byte 0x64, 0x45, 0x6e, 0x75
+ .byte 0x6d, 0x40, 0x43, 0x40
+ .byte 0x42, 0x40, 0x41, 0x40
+ .byte 0x40, 0x00, 0xf2, 0xf1
+ # UdtSourceLine (0x100B) {
+ # TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
+ # UDT: A::B::C::LargeSignedEnum (0x100A)
+ # SourceFile: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp (0x1006)
+ # LineNumber: 20
+ # }
+ .byte 0x0e, 0x00, 0x06, 0x16
+ .byte 0x0a, 0x10, 0x00, 0x00
+ .byte 0x06, 0x10, 0x00, 0x00
+ .byte 0x14, 0x00, 0x00, 0x00
+ # Modifier (0x100C) {
+ # TypeLeafKind: LF_MODIFIER (0x1001)
+ # ModifiedType: A::B::C::LargeSignedEnum (0x100A)
+ # Modifiers [ (0x1)
+ # Const (0x1)
+ # ]
+ # }
+ .byte 0x0a, 0x00, 0x01, 0x10
+ .byte 0x0a, 0x10, 0x00, 0x00
+ .byte 0x01, 0x00, 0xf2, 0xf1
+ # FieldList (0x100D) {
+ # TypeLeafKind: LF_FIELDLIST (0x1203)
+ # Enumerator {
+ # TypeLeafKind: LF_ENUMERATE (0x1502)
+ # AccessSpecifier: Public (0x3)
+ # EnumValue: 0
+ # Name: UE_A
+ # }
+ # Enumerator {
+ # TypeLeafKind: LF_ENUMERATE (0x1502)
+ # AccessSpecifier: Public (0x3)
+ # EnumValue: 1000
+ # Name: UE_B
+ # }
+ # Enumerator {
+ # TypeLeafKind: LF_ENUMERATE (0x1502)
+ # AccessSpecifier: Public (0x3)
+ # EnumValue: 4294000000
+ # Name: UE_C
+ # }
+ # }
+ .byte 0x2a, 0x00, 0x03, 0x12
+ .byte 0x02, 0x15, 0x03, 0x00
+ .byte 0x00, 0x00, 0x55, 0x45
+ .byte 0x5f, 0x41, 0x00, 0xf1
+ .byte 0x02, 0x15, 0x03, 0x00
+ .byte 0xe8, 0x03, 0x55, 0x45
+ .byte 0x5f, 0x42, 0x00, 0xf1
+ .byte 0x02, 0x15, 0x03, 0x00
+ .byte 0x04, 0x80, 0x80, 0x3d
+ .byte 0xf1, 0xff, 0x55, 0x45
+ .byte 0x5f, 0x43, 0x00, 0xf1
+ # Enum (0x100E) {
+ # TypeLeafKind: LF_ENUM (0x1507)
+ # NumEnumerators: 3
+ # Properties [ (0x200)
+ # HasUniqueName (0x200)
+ # ]
+ # UnderlyingType: unsigned (0x75)
+ # FieldListType: <field list> (0x100D)
+ # Name: A::B::C::UnsignedEnum
+ # LinkageName: .?AW4UnsignedEnum@C@B@A@@
+ # }
+ .byte 0x3e, 0x00, 0x07, 0x15
+ .byte 0x03, 0x00, 0x00, 0x02
+ .byte 0x75, 0x00, 0x00, 0x00
+ .byte 0x0d, 0x10, 0x00, 0x00
+ .byte 0x41, 0x3a, 0x3a, 0x42
+ .byte 0x3a, 0x3a, 0x43, 0x3a
+ .byte 0x3a, 0x55, 0x6e, 0x73
+ .byte 0x69, 0x67, 0x6e, 0x65
+ .byte 0x64, 0x45, 0x6e, 0x75
+ .byte 0x6d, 0x00, 0x2e, 0x3f
+ .byte 0x41, 0x57, 0x34, 0x55
+ .byte 0x6e, 0x73, 0x69, 0x67
+ .byte 0x6e, 0x65, 0x64, 0x45
+ .byte 0x6e, 0x75, 0x6d, 0x40
+ .byte 0x43, 0x40, 0x42, 0x40
+ .byte 0x41, 0x40, 0x40, 0x00
+ # UdtSourceLine (0x100F) {
+ # TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
+ # UDT: A::B::C::UnsignedEnum (0x100E)
+ # SourceFile: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp (0x1006)
+ # LineNumber: 26
+ # }
+ .byte 0x0e, 0x00, 0x06, 0x16
+ .byte 0x0e, 0x10, 0x00, 0x00
+ .byte 0x06, 0x10, 0x00, 0x00
+ .byte 0x1a, 0x00, 0x00, 0x00
+ # Modifier (0x1010) {
+ # TypeLeafKind: LF_MODIFIER (0x1001)
+ # ModifiedType: A::B::C::UnsignedEnum (0x100E)
+ # Modifiers [ (0x1)
+ # Const (0x1)
+ # ]
+ # }
+ .byte 0x0a, 0x00, 0x01, 0x10
+ .byte 0x0e, 0x10, 0x00, 0x00
+ .byte 0x01, 0x00, 0xf2, 0xf1
+ # FieldList (0x1011) {
+ # TypeLeafKind: LF_FIELDLIST (0x1203)
+ # Enumerator {
+ # TypeLeafKind: LF_ENUMERATE (0x1502)
+ # AccessSpecifier: Public (0x3)
+ # EnumValue: 0
+ # Name: SE_A
+ # }
+ # Enumerator {
+ # TypeLeafKind: LF_ENUMERATE (0x1502)
+ # AccessSpecifier: Public (0x3)
+ # EnumValue: 2147000000
+ # Name: SE_B
+ # }
+ # Enumerator {
+ # TypeLeafKind: LF_ENUMERATE (0x1502)
+ # AccessSpecifier: Public (0x3)
+ # EnumValue: 18446744071562551616
+ # Name: SE_C
+ # }
+ # }
+ .byte 0x32, 0x00, 0x03, 0x12
+ .byte 0x02, 0x15, 0x03, 0x00
+ .byte 0x00, 0x00, 0x53, 0x45
+ .byte 0x5f, 0x41, 0x00, 0xf1
+ .byte 0x02, 0x15, 0x03, 0x00
+ .byte 0x04, 0x80, 0xc0, 0x9e
+ .byte 0xf8, 0x7f, 0x53, 0x45
+ .byte 0x5f, 0x42, 0x00, 0xf1
+ .byte 0x02, 0x15, 0x03, 0x00
+ .byte 0x0a, 0x80, 0x40, 0x61
+ .byte 0x07, 0x80, 0xff, 0xff
+ .byte 0xff, 0xff, 0x53, 0x45
+ .byte 0x5f, 0x43, 0x00, 0xf1
+ # Enum (0x1012) {
+ # TypeLeafKind: LF_ENUM (0x1507)
+ # NumEnumerators: 3
+ # Properties [ (0x200)
+ # HasUniqueName (0x200)
+ # ]
+ # UnderlyingType: int (0x74)
+ # FieldListType: <field list> (0x1011)
+ # Name: A::B::C::SignedEnum
+ # LinkageName: .?AW4SignedEnum@C@B@A@@
+ # }
+ .byte 0x3a, 0x00, 0x07, 0x15
+ .byte 0x03, 0x00, 0x00, 0x02
+ .byte 0x74, 0x00, 0x00, 0x00
+ .byte 0x11, 0x10, 0x00, 0x00
+ .byte 0x41, 0x3a, 0x3a, 0x42
+ .byte 0x3a, 0x3a, 0x43, 0x3a
+ .byte 0x3a, 0x53, 0x69, 0x67
+ .byte 0x6e, 0x65, 0x64, 0x45
+ .byte 0x6e, 0x75, 0x6d, 0x00
+ .byte 0x2e, 0x3f, 0x41, 0x57
+ .byte 0x34, 0x53, 0x69, 0x67
+ .byte 0x6e, 0x65, 0x64, 0x45
+ .byte 0x6e, 0x75, 0x6d, 0x40
+ .byte 0x43, 0x40, 0x42, 0x40
+ .byte 0x41, 0x40, 0x40, 0x00
+ # UdtSourceLine (0x1013) {
+ # TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
+ # UDT: A::B::C::SignedEnum (0x1012)
+ # SourceFile: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp (0x1006)
+ # LineNumber: 32
+ # }
+ .byte 0x0e, 0x00, 0x06, 0x16
+ .byte 0x12, 0x10, 0x00, 0x00
+ .byte 0x06, 0x10, 0x00, 0x00
+ .byte 0x20, 0x00, 0x00, 0x00
+ # Modifier (0x1014) {
+ # TypeLeafKind: LF_MODIFIER (0x1001)
+ # ModifiedType: A::B::C::SignedEnum (0x1012)
+ # Modifiers [ (0x1)
+ # Const (0x1)
+ # ]
+ # }
+ .byte 0x0a, 0x00, 0x01, 0x10
+ .byte 0x12, 0x10, 0x00, 0x00
+ .byte 0x01, 0x00, 0xf2, 0xf1
+ # FieldList (0x1015) {
+ # TypeLeafKind: LF_FIELDLIST (0x1203)
+ # Enumerator {
+ # TypeLeafKind: LF_ENUMERATE (0x1502)
+ # AccessSpecifier: Public (0x3)
+ # EnumValue: 0
+ # Name: SUE_A
+ # }
+ # Enumerator {
+ # TypeLeafKind: LF_ENUMERATE (0x1502)
+ # AccessSpecifier: Public (0x3)
+ # EnumValue: 100
+ # Name: SUE_B
+ # }
+ # Enumerator {
+ # TypeLeafKind: LF_ENUMERATE (0x1502)
+ # AccessSpecifier: Public (0x3)
+ # EnumValue: 200
+ # Name: SUE_C
+ # }
+ # }
+ .byte 0x26, 0x00, 0x03, 0x12
+ .byte 0x02, 0x15, 0x03, 0x00
+ .byte 0x00, 0x00, 0x53, 0x55
+ .byte 0x45, 0x5f, 0x41, 0x00
+ .byte 0x02, 0x15, 0x03, 0x00
+ .byte 0x64, 0x00, 0x53, 0x55
+ .byte 0x45, 0x5f, 0x42, 0x00
+ .byte 0x02, 0x15, 0x03, 0x00
+ .byte 0xc8, 0x00, 0x53, 0x55
+ .byte 0x45, 0x5f, 0x43, 0x00
+ # Enum (0x1016) {
+ # TypeLeafKind: LF_ENUM (0x1507)
+ # NumEnumerators: 3
+ # Properties [ (0x200)
+ # HasUniqueName (0x200)
+ # ]
+ # UnderlyingType: unsigned char (0x20)
+ # FieldListType: <field list> (0x1015)
+ # Name: A::B::C::SmallUnsignedEnum
+ # LinkageName: .?AW4SmallUnsignedEnum@C@B@A@@
+ # }
+ .byte 0x4a, 0x00, 0x07, 0x15
+ .byte 0x03, 0x00, 0x00, 0x02
+ .byte 0x20, 0x00, 0x00, 0x00
+ .byte 0x15, 0x10, 0x00, 0x00
+ .byte 0x41, 0x3a, 0x3a, 0x42
+ .byte 0x3a, 0x3a, 0x43, 0x3a
+ .byte 0x3a, 0x53, 0x6d, 0x61
+ .byte 0x6c, 0x6c, 0x55, 0x6e
+ .byte 0x73, 0x69, 0x67, 0x6e
+ .byte 0x65, 0x64, 0x45, 0x6e
+ .byte 0x75, 0x6d, 0x00, 0x2e
+ .byte 0x3f, 0x41, 0x57, 0x34
+ .byte 0x53, 0x6d, 0x61, 0x6c
+ .byte 0x6c, 0x55, 0x6e, 0x73
+ .byte 0x69, 0x67, 0x6e, 0x65
+ .byte 0x64, 0x45, 0x6e, 0x75
+ .byte 0x6d, 0x40, 0x43, 0x40
+ .byte 0x42, 0x40, 0x41, 0x40
+ .byte 0x40, 0x00, 0xf2, 0xf1
+ # UdtSourceLine (0x1017) {
+ # TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
+ # UDT: A::B::C::SmallUnsignedEnum (0x1016)
+ # SourceFile: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp (0x1006)
+ # LineNumber: 38
+ # }
+ .byte 0x0e, 0x00, 0x06, 0x16
+ .byte 0x16, 0x10, 0x00, 0x00
+ .byte 0x06, 0x10, 0x00, 0x00
+ .byte 0x26, 0x00, 0x00, 0x00
+ # Modifier (0x1018) {
+ # TypeLeafKind: LF_MODIFIER (0x1001)
+ # ModifiedType: A::B::C::SmallUnsignedEnum (0x1016)
+ # Modifiers [ (0x1)
+ # Const (0x1)
+ # ]
+ # }
+ .byte 0x0a, 0x00, 0x01, 0x10
+ .byte 0x16, 0x10, 0x00, 0x00
+ .byte 0x01, 0x00, 0xf2, 0xf1
+ # FieldList (0x1019) {
+ # TypeLeafKind: LF_FIELDLIST (0x1203)
+ # Enumerator {
+ # TypeLeafKind: LF_ENUMERATE (0x1502)
+ # AccessSpecifier: Public (0x3)
+ # EnumValue: 0
+ # Name: SSE_A
+ # }
+ # Enumerator {
+ # TypeLeafKind: LF_ENUMERATE (0x1502)
+ # AccessSpecifier: Public (0x3)
+ # EnumValue: 100
+ # Name: SSE_B
+ # }
+ # Enumerator {
+ # TypeLeafKind: LF_ENUMERATE (0x1502)
+ # AccessSpecifier: Public (0x3)
+ # EnumValue: 18446744073709551516
+ # Name: SSE_C
+ # }
+ # }
+ .byte 0x2e, 0x00, 0x03, 0x12
+ .byte 0x02, 0x15, 0x03, 0x00
+ .byte 0x00, 0x00, 0x53, 0x53
+ .byte 0x45, 0x5f, 0x41, 0x00
+ .byte 0x02, 0x15, 0x03, 0x00
+ .byte 0x64, 0x00, 0x53, 0x53
+ .byte 0x45, 0x5f, 0x42, 0x00
+ .byte 0x02, 0x15, 0x03, 0x00
+ .byte 0x0a, 0x80, 0x9c, 0xff
+ .byte 0xff, 0xff, 0xff, 0xff
+ .byte 0xff, 0xff, 0x53, 0x53
+ .byte 0x45, 0x5f, 0x43, 0x00
+ # Enum (0x101A) {
+ # TypeLeafKind: LF_ENUM (0x1507)
+ # NumEnumerators: 3
+ # Properties [ (0x200)
+ # HasUniqueName (0x200)
+ # ]
+ # UnderlyingType: char (0x70)
+ # FieldListType: <field list> (0x1019)
+ # Name: A::B::C::SmallSignedEnum
+ # LinkageName: .?AW4SmallSignedEnum@C@B@A@@
+ # }
+ .byte 0x46, 0x00, 0x07, 0x15
+ .byte 0x03, 0x00, 0x00, 0x02
+ .byte 0x70, 0x00, 0x00, 0x00
+ .byte 0x19, 0x10, 0x00, 0x00
+ .byte 0x41, 0x3a, 0x3a, 0x42
+ .byte 0x3a, 0x3a, 0x43, 0x3a
+ .byte 0x3a, 0x53, 0x6d, 0x61
+ .byte 0x6c, 0x6c, 0x53, 0x69
+ .byte 0x67, 0x6e, 0x65, 0x64
+ .byte 0x45, 0x6e, 0x75, 0x6d
+ .byte 0x00, 0x2e, 0x3f, 0x41
+ .byte 0x57, 0x34, 0x53, 0x6d
+ .byte 0x61, 0x6c, 0x6c, 0x53
+ .byte 0x69, 0x67, 0x6e, 0x65
+ .byte 0x64, 0x45, 0x6e, 0x75
+ .byte 0x6d, 0x40, 0x43, 0x40
+ .byte 0x42, 0x40, 0x41, 0x40
+ .byte 0x40, 0x00, 0xf2, 0xf1
+ # UdtSourceLine (0x101B) {
+ # TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
+ # UDT: A::B::C::SmallSignedEnum (0x101A)
+ # SourceFile: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp (0x1006)
+ # LineNumber: 44
+ # }
+ .byte 0x0e, 0x00, 0x06, 0x16
+ .byte 0x1a, 0x10, 0x00, 0x00
+ .byte 0x06, 0x10, 0x00, 0x00
+ .byte 0x2c, 0x00, 0x00, 0x00
+ # Modifier (0x101C) {
+ # TypeLeafKind: LF_MODIFIER (0x1001)
+ # ModifiedType: A::B::C::SmallSignedEnum (0x101A)
+ # Modifiers [ (0x1)
+ # Const (0x1)
+ # ]
+ # }
+ .byte 0x0a, 0x00, 0x01, 0x10
+ .byte 0x1a, 0x10, 0x00, 0x00
+ .byte 0x01, 0x00, 0xf2, 0xf1
+ # StringId (0x101D) {
+ # TypeLeafKind: LF_STRING_ID (0x1605)
+ # Id: 0x0
+ # StringData: D:\\src\\llvmbuild\\ninja-x64
+ # }
+ .byte 0x26, 0x00, 0x05, 0x16
+ .byte 0x00, 0x00, 0x00, 0x00
+ .byte 0x44, 0x3a, 0x5c, 0x5c
+ .byte 0x73, 0x72, 0x63, 0x5c
+ .byte 0x5c, 0x6c, 0x6c, 0x76
+ .byte 0x6d, 0x62, 0x75, 0x69
+ .byte 0x6c, 0x64, 0x5c, 0x5c
+ .byte 0x6e, 0x69, 0x6e, 0x6a
+ .byte 0x61, 0x2d, 0x78, 0x36
+ .byte 0x34, 0x00, 0xf2, 0xf1
+ # StringId (0x101E) {
+ # TypeLeafKind: LF_STRING_ID (0x1605)
+ # Id: 0x0
+ # StringData: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\variable.cpp
+ # }
+ .byte 0x42, 0x00, 0x05, 0x16
+ .byte 0x00, 0x00, 0x00, 0x00
+ .byte 0x44, 0x3a, 0x5c, 0x73
+ .byte 0x72, 0x63, 0x5c, 0x6c
+ .byte 0x6c, 0x76, 0x6d, 0x2d
+ .byte 0x6d, 0x6f, 0x6e, 0x6f
+ .byte 0x5c, 0x6c, 0x6c, 0x64
+ .byte 0x62, 0x5c, 0x6c, 0x69
+ .byte 0x74, 0x5c, 0x53, 0x79
+ .byte 0x6d, 0x62, 0x6f, 0x6c
+ .byte 0x46, 0x69, 0x6c, 0x65
+ .byte 0x5c, 0x4e, 0x61, 0x74
+ .byte 0x69, 0x76, 0x65, 0x50
+ .byte 0x44, 0x42, 0x5c, 0x76
+ .byte 0x61, 0x72, 0x69, 0x61
+ .byte 0x62, 0x6c, 0x65, 0x2e
+ .byte 0x63, 0x70, 0x70, 0x00
+ # BuildInfo (0x101F) {
+ # TypeLeafKind: LF_BUILDINFO (0x1603)
+ # NumArgs: 5
+ # Arguments [
+ # ArgType: D:\\src\\llvmbuild\\ninja-x64 (0x101D)
+ # ArgType: 0x0
+ # ArgType: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\variable.cpp (0x101E)
+ # ArgType: 0x0
+ # ArgType: 0x0
+ # ]
+ # }
+ .byte 0x1a, 0x00, 0x03, 0x16
+ .byte 0x05, 0x00, 0x1d, 0x10
+ .byte 0x00, 0x00, 0x00, 0x00
+ .byte 0x00, 0x00, 0x1e, 0x10
+ .byte 0x00, 0x00, 0x00, 0x00
+ .byte 0x00, 0x00, 0x00, 0x00
+ .byte 0x00, 0x00, 0xf2, 0xf1
+
+ .addrsig
+ .addrsig_sym GlobalLUEA
+ .addrsig_sym GlobalLUEB
+ .addrsig_sym GlobalLUEC
+ .addrsig_sym GlobalLSEA
+ .addrsig_sym GlobalLSEB
+ .addrsig_sym GlobalLSEC
+ .addrsig_sym GlobalUEA
+ .addrsig_sym GlobalUEB
+ .addrsig_sym GlobalUEC
+ .addrsig_sym GlobalSEA
+ .addrsig_sym GlobalSEB
+ .addrsig_sym GlobalSEC
+ .addrsig_sym GlobalSUEA
+ .addrsig_sym GlobalSUEB
+ .addrsig_sym GlobalSUEC
+ .addrsig_sym GlobalSSEA
+ .addrsig_sym GlobalSSEB
+ .addrsig_sym GlobalSSEC
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/source-list.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/source-list.lldbinit
new file mode 100644
index 00000000000..624ce5ba156
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/source-list.lldbinit
@@ -0,0 +1,3 @@
+source list -n main
+source list -n OvlGlobalFn
+quit
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/stack_unwinding01.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/stack_unwinding01.lldbinit
new file mode 100644
index 00000000000..d035d3bb881
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/stack_unwinding01.lldbinit
@@ -0,0 +1,8 @@
+b stack_unwinding01.cpp:12
+run
+thread backtrace
+c
+thread backtrace
+c
+thread backtrace
+quit \ No newline at end of file
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/tag-types.lldbinit b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/tag-types.lldbinit
new file mode 100644
index 00000000000..a7ec496447e
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/tag-types.lldbinit
@@ -0,0 +1,10 @@
+type lookup -- Struct
+type lookup -- Class
+type lookup -- Union
+type lookup -- Derived
+type lookup -- Derived2
+type lookup -- DerivedVirtual1
+type lookup -- DerivedVirtual2
+type lookup -- EnumInt
+type lookup -- EnumShort
+type lookup -- InvalidType
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/ast-functions-msvc.cpp b/lldb/test/Shell/SymbolFile/NativePDB/ast-functions-msvc.cpp
new file mode 100644
index 00000000000..b8154168aff
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/ast-functions-msvc.cpp
@@ -0,0 +1,7 @@
+// clang-format off
+// REQUIRES: msvc
+
+// RUN: %build --compiler=msvc --nodefaultlib -o %t.exe -- %S/ast-functions.cpp
+
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/ast-functions.lldbinit 2>&1 | FileCheck %S/ast-functions.cpp
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/ast-functions.cpp b/lldb/test/Shell/SymbolFile/NativePDB/ast-functions.cpp
new file mode 100644
index 00000000000..1cfd01f13c1
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/ast-functions.cpp
@@ -0,0 +1,28 @@
+// clang-format off
+// REQUIRES: lld
+
+// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
+
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/ast-functions.lldbinit 2>&1 | FileCheck %s
+
+static int static_fn() {
+ return 42;
+}
+
+int varargs_fn(int x, int y, ...) {
+ return x + y;
+}
+
+int main(int argc, char **argv) {
+ return static_fn() + varargs_fn(argc, argc);
+}
+
+// CHECK: TranslationUnitDecl
+// CHECK-NEXT: |-FunctionDecl {{.*}} main 'int (int, char **)'
+// CHECK-NEXT: | |-ParmVarDecl {{.*}} argc 'int'
+// CHECK-NEXT: | `-ParmVarDecl {{.*}} argv 'char **'
+// CHECK-NEXT: |-FunctionDecl {{.*}} static_fn 'int ()' static
+// CHECK-NEXT: `-FunctionDecl {{.*}} varargs_fn 'int (int, int, ...)'
+// CHECK-NEXT: |-ParmVarDecl {{.*}} x 'int'
+// CHECK-NEXT: `-ParmVarDecl {{.*}} y 'int'
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/ast-methods.cpp b/lldb/test/Shell/SymbolFile/NativePDB/ast-methods.cpp
new file mode 100644
index 00000000000..6006c722cfb
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/ast-methods.cpp
@@ -0,0 +1,36 @@
+// clang-format off
+// REQUIRES: lld
+
+// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/ast-methods.lldbinit 2>&1 | FileCheck %s
+
+struct Struct {
+ void simple_method() {}
+
+ virtual void virtual_method() {}
+
+ static void static_method() {}
+
+ int overloaded_method() {}
+ int overloaded_method(char c) {}
+ int overloaded_method(char c, int i, ...) {}
+};
+
+Struct s;
+
+int main(int argc, char **argv) {
+ return 0;
+}
+
+// CHECK: TranslationUnitDecl
+// CHECK: |-CXXRecordDecl {{.*}} struct Struct definition
+// CHECK: | |-CXXMethodDecl {{.*}} simple_method 'void (){{.*}}'
+// CHECK: | |-CXXMethodDecl {{.*}} virtual_method 'void (){{.*}}' virtual
+// CHECK: | |-CXXMethodDecl {{.*}} static_method 'void ()' static
+// CHECK: | |-CXXMethodDecl {{.*}} overloaded_method 'int (){{.*}}'
+// CHECK: | |-CXXMethodDecl {{.*}} overloaded_method 'int (char){{.*}}'
+// CHECK: | | `-ParmVarDecl {{.*}} 'char'
+// CHECK: | `-CXXMethodDecl {{.*}} overloaded_method 'int (char, int, ...)'
+// CHECK: | |-ParmVarDecl {{.*}} 'char'
+// CHECK: | `-ParmVarDecl {{.*}} 'int'
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp b/lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp
new file mode 100644
index 00000000000..9d4ac139f59
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp
@@ -0,0 +1,153 @@
+// clang-format off
+// REQUIRES: lld
+
+// Test various interesting cases for AST reconstruction.
+// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/ast-types.lldbinit 2>&1 | FileCheck %s
+
+// Test trivial versions of each tag type.
+class TrivialC {};
+struct TrivialS {};
+union TrivialU {};
+enum TrivialE {TE_A};
+
+// Test reconstruction of DeclContext hierarchies.
+namespace A {
+ namespace B {
+ template<typename T>
+ struct C {
+ T ABCMember;
+ };
+
+ // Let's try a template specialization with a different implementation
+ template<>
+ struct C<void> {
+ void *ABCSpecializationMember;
+ };
+ }
+
+ // Let's make sure we can distinguish classes and namespaces. Also let's try
+ // a non-type template parameter.
+ template<int N>
+ struct C {
+ class D {
+ int ACDMember = 0;
+ C<N - 1> *CPtr = nullptr;
+ };
+ };
+
+ struct D {
+ // Let's make a nested class with the same name as another nested class
+ // elsewhere, and confirm that they appear in the right DeclContexts in
+ // the AST.
+ struct E {
+ int ADDMember;
+ };
+ };
+}
+
+
+// Let's try an anonymous namespace.
+namespace {
+ template<typename T>
+ struct Anonymous {
+ int AnonymousMember;
+ // And a nested class within an anonymous namespace
+ struct D {
+ int AnonymousDMember;
+ };
+ };
+}
+
+TrivialC TC;
+TrivialS TS;
+TrivialU TU;
+TrivialE TE;
+
+A::B::C<int> ABCInt;
+A::B::C<float> ABCFloat;
+A::B::C<void> ABCVoid;
+
+A::C<0> AC0;
+A::C<-1> ACNeg1;
+
+// FIXME: The type `D` is located now at the level of the translation unit.
+// FIXME: Should be located in the namespace `A`, in the struct `C<1>`.
+A::C<1>::D AC1D;
+
+A::C<0>::D AC0D;
+A::C<-1>::D ACNeg1D;
+A::D AD;
+A::D::E ADE;
+
+Anonymous<int> AnonInt;
+Anonymous<A::B::C<void>> AnonABCVoid;
+Anonymous<A::B::C<void>>::D AnonABCVoidD;
+
+// FIXME: Enum size isn't being correctly determined.
+// FIXME: Can't read memory for variable values.
+
+// CHECK: (TrivialC) TC = {}
+// CHECK: (TrivialS) TS = {}
+// CHECK: (TrivialU) TU = {}
+// CHECK: (TrivialE) TE = TE_A
+// CHECK: (A::B::C<int>) ABCInt = (ABCMember = 0)
+// CHECK: (A::B::C<float>) ABCFloat = (ABCMember = 0)
+// CHECK: (A::B::C<void>) ABCVoid = (ABCSpecializationMember = 0x{{0+}})
+// CHECK: (A::C<0>) AC0 = {}
+// CHECK: (A::C<-1>) ACNeg1 = {}
+// CHECK: (A::C<1>::D) AC1D = (ACDMember = 0, CPtr = 0x{{0+}})
+// CHECK: (A::C<0>::D) AC0D = (ACDMember = 0, CPtr = 0x{{0+}})
+// CHECK: (A::C<-1>::D) ACNeg1D = (ACDMember = 0, CPtr = 0x{{0+}})
+// CHECK: (A::D) AD = {}
+// CHECK: (A::D::E) ADE = (ADDMember = 0)
+// CHECK: ((anonymous namespace)::Anonymous<int>) AnonInt = (AnonymousMember = 0)
+// CHECK: ((anonymous namespace)::Anonymous<A::B::C<void>>) AnonABCVoid = (AnonymousMember = 0)
+// CHECK: ((anonymous namespace)::Anonymous<A::B::C<void>>::D) AnonABCVoidD = (AnonymousDMember = 0)
+// CHECK: Dumping clang ast for 1 modules.
+// CHECK: TranslationUnitDecl {{.*}}
+// CHECK: |-CXXRecordDecl {{.*}} class TrivialC definition
+// CHECK: |-CXXRecordDecl {{.*}} struct TrivialS definition
+// CHECK: |-CXXRecordDecl {{.*}} union TrivialU definition
+// CHECK: |-EnumDecl {{.*}} TrivialE
+// CHECK: | `-EnumConstantDecl {{.*}} TE_A 'TrivialE'
+// CHECK: |-NamespaceDecl {{.*}} A
+// CHECK: | |-NamespaceDecl {{.*}} B
+// CHECK: | | |-CXXRecordDecl {{.*}} struct C<int> definition
+// CHECK: | | | `-FieldDecl {{.*}} ABCMember 'int'
+// CHECK: | | |-CXXRecordDecl {{.*}} struct C<float> definition
+// CHECK: | | | `-FieldDecl {{.*}} ABCMember 'float'
+// CHECK: | | `-CXXRecordDecl {{.*}} struct C<void> definition
+// CHECK: | | `-FieldDecl {{.*}} ABCSpecializationMember 'void *'
+// FIXME: | |-CXXRecordDecl {{.*}} struct C<1> definition
+// FIXME: | | `-CXXRecordDecl {{.*}} class D definition
+// FIXME: | | |-FieldDecl {{.*}} ACDMember 'int'
+// FIXME: | | `-FieldDecl {{.*}} CPtr 'A::C<1> *'
+// CHECK: | |-CXXRecordDecl {{.*}} struct C<0> definition
+// CHECK: | | `-CXXRecordDecl {{.*}} class D definition
+// CHECK: | | |-FieldDecl {{.*}} ACDMember 'int'
+// CHECK: | | `-FieldDecl {{.*}} CPtr 'A::C<-1> *'
+// CHECK: | |-CXXRecordDecl {{.*}} struct C<-1> definition
+// CHECK: | | `-CXXRecordDecl {{.*}} class D definition
+// CHECK: | | |-FieldDecl {{.*}} ACDMember 'int'
+// CHECK: | | `-FieldDecl {{.*}} CPtr 'A::C<-2> *'
+// CHECK: | |-CXXRecordDecl {{.*}} struct C<-2>
+// CHECK: | `-CXXRecordDecl {{.*}} struct D definition
+// CHECK: | `-CXXRecordDecl {{.*}} struct E definition
+// CHECK: | `-FieldDecl {{.*}} ADDMember 'int'
+// CHECK: |-NamespaceDecl
+// CHECK: | |-CXXRecordDecl {{.*}} struct Anonymous<int> definition
+// CHECK: | | `-FieldDecl {{.*}} AnonymousMember 'int'
+// CHECK: | `-CXXRecordDecl {{.*}} struct Anonymous<A::B::C<void>> definition
+// CHECK: | |-FieldDecl {{.*}} AnonymousMember 'int'
+// CHECK: | `-CXXRecordDecl {{.*}} struct D definition
+// CHECK: | `-FieldDecl {{.*}} AnonymousDMember 'int'
+
+int main(int argc, char **argv) {
+ AnonInt.AnonymousMember = 1;
+ AnonABCVoid.AnonymousMember = 2;
+ AnonABCVoidD.AnonymousDMember = 3;
+
+ return 0;
+}
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/bitfields.cpp b/lldb/test/Shell/SymbolFile/NativePDB/bitfields.cpp
new file mode 100644
index 00000000000..301ae3067d1
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/bitfields.cpp
@@ -0,0 +1,60 @@
+// clang-format off
+// REQUIRES: lld
+
+// Test various interesting cases for AST reconstruction.
+// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/bitfields.lldbinit 2>&1 | FileCheck %s
+
+// Test trivial versions of each tag type.
+struct Struct {
+ int A : 5 = 6;
+ int B : 7 = 8;
+ unsigned C : 3 = 2;
+ unsigned D : 15 = 12345;
+ char E : 1 = 0;
+ char F : 2 = 1;
+ char G : 3 = 2;
+ // H should be at offset 0 of a new byte.
+ char H : 3 = 3;
+};
+
+constexpr Struct TheStruct;
+
+
+int main(int argc, char **argv) {
+ return TheStruct.A;
+}
+
+// CHECK: (lldb) target variable -T TheStruct
+// CHECK: (const Struct) TheStruct = {
+// CHECK: (int:5) A = 6
+// CHECK: (int:7) B = 8
+// CHECK: (unsigned int:3) C = 2
+// CHECK: (unsigned int:15) D = 12345
+// CHECK: (char:1) E = '\0'
+// CHECK: (char:2) F = '\x01'
+// CHECK: (char:3) G = '\x02'
+// CHECK: (char:3) H = '\x03'
+// CHECK: }
+//
+// CHECK: target modules dump ast
+// CHECK: Dumping clang ast for 1 modules.
+// CHECK: TranslationUnitDecl {{.*}}
+// CHECK: |-CXXRecordDecl {{.*}} struct Struct definition
+// CHECK: | |-FieldDecl {{.*}} A 'int'
+// CHECK: | | `-IntegerLiteral {{.*}} 'int' 5
+// CHECK: | |-FieldDecl {{.*}} B 'int'
+// CHECK: | | `-IntegerLiteral {{.*}} 'int' 7
+// CHECK: | |-FieldDecl {{.*}} C 'unsigned int'
+// CHECK: | | `-IntegerLiteral {{.*}} 'int' 3
+// CHECK: | |-FieldDecl {{.*}} D 'unsigned int'
+// CHECK: | | `-IntegerLiteral {{.*}} 'int' 15
+// CHECK: | |-FieldDecl {{.*}} E 'char'
+// CHECK: | | `-IntegerLiteral {{.*}} 'int' 1
+// CHECK: | |-FieldDecl {{.*}} F 'char'
+// CHECK: | | `-IntegerLiteral {{.*}} 'int' 2
+// CHECK: | |-FieldDecl {{.*}} G 'char'
+// CHECK: | | `-IntegerLiteral {{.*}} 'int' 3
+// CHECK: | `-FieldDecl {{.*}} H 'char'
+// CHECK: | `-IntegerLiteral {{.*}} 'int' 3
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/break-by-function.cpp b/lldb/test/Shell/SymbolFile/NativePDB/break-by-function.cpp
new file mode 100644
index 00000000000..c0c26f7617c
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/break-by-function.cpp
@@ -0,0 +1,57 @@
+// clang-format off
+// REQUIRES: lld
+
+// Test that we can set simple breakpoints using PDB on any platform.
+// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/break-by-function.lldbinit | FileCheck %s
+
+// Use different indentation style for each overload so that the starting
+// line is in a different place.
+
+int OvlGlobalFn(int X) {
+ return X + 42;
+}
+
+int OvlGlobalFn(int X, int Y) { return X + Y + 42; }
+
+int OvlGlobalFn(int X, int Y, int Z)
+{
+ return X + Y + Z + 42;
+}
+
+static int StaticFn(int X) {
+ return X + 42;
+}
+
+int main(int argc, char **argv) {
+ // Make sure they don't get optimized out.
+ // Note the comments here, we want to make sure the line number reported
+ // for the breakpoint is the first actual line of code.
+ int Result = OvlGlobalFn(argc) + OvlGlobalFn(argc, argc)
+ + OvlGlobalFn(argc, argc, argc) + StaticFn(argc);
+ return Result;
+}
+
+
+// CHECK: (lldb) target create "{{.*}}break-by-function.cpp.tmp.exe"
+// CHECK: Current executable set to '{{.*}}break-by-function.cpp.tmp.exe'
+// CHECK: (lldb) break set -n main
+// CHECK: Breakpoint 1: where = break-by-function.cpp.tmp.exe`main + {{[0-9]+}}
+// CHECK: (lldb) break set -n OvlGlobalFn
+// CHECK: Breakpoint 2: 3 locations.
+// CHECK: (lldb) break set -n StaticFn
+// CHECK: Breakpoint 3: where = break-by-function.cpp.tmp.exe`StaticFn + {{[0-9]+}}
+// CHECK: (lldb) break set -n DoesntExist
+// CHECK: Breakpoint 4: no locations (pending).
+// CHECK: (lldb) break list
+// CHECK: Current breakpoints:
+// CHECK: 1: name = 'main', locations = 1
+// CHECK: 1.1: where = break-by-function.cpp.tmp.exe`main + {{[0-9]+}}
+// CHECK: 2: name = 'OvlGlobalFn', locations = 3
+// CHECK: 2.1: where = break-by-function.cpp.tmp.exe`OvlGlobalFn + {{[0-9]+}}
+// CHECK: 2.2: where = break-by-function.cpp.tmp.exe`OvlGlobalFn
+// CHECK: 2.3: where = break-by-function.cpp.tmp.exe`OvlGlobalFn + {{[0-9]+}}
+// CHECK: 3: name = 'StaticFn', locations = 1
+// CHECK: 3.1: where = break-by-function.cpp.tmp.exe`StaticFn + {{[0-9]+}}
+// CHECK: 4: name = 'DoesntExist', locations = 0 (pending)
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/break-by-line.cpp b/lldb/test/Shell/SymbolFile/NativePDB/break-by-line.cpp
new file mode 100644
index 00000000000..ae3269f3719
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/break-by-line.cpp
@@ -0,0 +1,26 @@
+// clang-format off
+// REQUIRES: lld
+
+// Test that we can set simple breakpoints using PDB on any platform.
+// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/break-by-line.lldbinit | FileCheck %s
+
+// This is a separate test from break-by-function.cpp because this test is
+// sensitive to edits in the source file.
+
+namespace NS {
+ int NamespaceFn(int X) {
+ return X + 42;
+ }
+}
+
+int main(int argc, char **argv) {
+ return NS::NamespaceFn(argc);
+}
+
+
+// CHECK: (lldb) target create "{{.*}}break-by-line.cpp.tmp.exe"
+// CHECK: Current executable set to '{{.*}}break-by-line.cpp.tmp.exe'
+// CHECK: (lldb) break set -f break-by-line.cpp -l 14
+// CHECK: Breakpoint 1: where = break-by-line.cpp.tmp.exe`NS::NamespaceFn + {{[0-9]+}} at break-by-line.cpp:14
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/disassembly.cpp b/lldb/test/Shell/SymbolFile/NativePDB/disassembly.cpp
new file mode 100644
index 00000000000..3553f29ce55
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/disassembly.cpp
@@ -0,0 +1,38 @@
+// clang-format off
+// REQUIRES: lld
+
+// Test that we can show disassembly and source.
+// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/disassembly.lldbinit | FileCheck %s
+
+// Some context lines before
+// the function.
+
+int foo() { return 42; }
+
+int main(int argc, char **argv) {
+ foo();
+ return 0;
+}
+
+
+// CHECK: (lldb) disassemble --flavor=intel -m -n main
+// CHECK: 12 int foo() { return 42; }
+// CHECK-NEXT: 13
+// CHECK-NEXT: ** 14 int main(int argc, char **argv) {
+// CHECK: disassembly.cpp.tmp.exe`main:
+// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+0>: sub rsp, 0x38
+// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+4>: mov dword ptr [rsp + 0x34], 0x0
+// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+12>: mov qword ptr [rsp + 0x28], rdx
+// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+17>: mov dword ptr [rsp + 0x24], ecx
+// CHECK: ** 15 foo();
+// CHECK: disassembly.cpp.tmp.exe[{{.*}}] <+21>: call {{.*}} ; foo at disassembly.cpp:12
+// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+26>: xor ecx, ecx
+// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+28>: mov dword ptr [rsp + 0x20], eax
+// CHECK: ** 16 return 0;
+// CHECK-NEXT: 17 }
+// CHECK-NEXT: 18
+// CHECK: disassembly.cpp.tmp.exe[{{.*}}] <+32>: mov eax, ecx
+// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+34>: add rsp, 0x38
+// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+38>: ret
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/function-types-builtins.cpp b/lldb/test/Shell/SymbolFile/NativePDB/function-types-builtins.cpp
new file mode 100644
index 00000000000..05ad6841993
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/function-types-builtins.cpp
@@ -0,0 +1,218 @@
+// clang-format off
+// REQUIRES: lld
+
+// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/function-types-builtins.lldbinit | FileCheck %s
+
+// Test that we can display function signatures with simple builtin
+// and pointer types. We do this by using `target variable` in lldb
+// with global variables of type ptr-to-function or reference-to-function.
+// This technique in general allows us to exercise most of LLDB's type
+// system without a running process.
+
+// Define _fltused, since we're not linking against the MS C runtime, but use
+// floats.
+extern "C" int _fltused = 0;
+
+template<typename T>
+struct MakeResult {
+ static T result() {
+ return T{};
+ }
+};
+
+template<typename T>
+struct MakeResult<T&> {
+ static T& result() {
+ static T t;
+ return t;
+ }
+};
+
+template<typename T>
+struct MakeResult<T&&> {
+ static T&& result() {
+ static T t;
+ return static_cast<T&&>(t);
+ }
+};
+
+
+void nullary() {}
+
+template<typename Arg>
+void unary(Arg) { }
+
+template<typename Ret, int N>
+Ret unaryret() { return MakeResult<Ret>::result(); }
+
+template<typename A1, typename A2>
+void binary(A1, A2) { }
+
+int varargs(int, int, ...) { return 0; }
+
+// Make sure to test every builtin type at least once for completeness. We
+// test these in the globals-fundamentals.cpp when they are the types of
+// variables but it's possible to imagine a situation where things behave
+// differently as function arguments or return values than they do with
+// global variables.
+
+// some interesting cases with argument types.
+auto aa = &unary<bool>;
+// CHECK: (void (*)(bool)) aa = {{.*}}
+auto ab = &unary<char>;
+// CHECK: (void (*)(char)) ab = {{.*}}
+auto ac = &unary<signed char>;
+// CHECK: (void (*)(signed char)) ac = {{.*}}
+auto ad = &unary<unsigned char>;
+// CHECK: (void (*)(unsigned char)) ad = {{.*}}
+auto ae = &unary<char16_t>;
+// CHECK: (void (*)(char16_t)) ae = {{.*}}
+auto af = &unary<char32_t>;
+// CHECK: (void (*)(char32_t)) af = {{.*}}
+auto ag = &unary<wchar_t>;
+// CHECK: (void (*)(wchar_t)) ag = {{.*}}
+auto ah = &unary<short>;
+// CHECK: (void (*)(short)) ah = {{.*}}
+auto ai = &unary<unsigned short>;
+// CHECK: (void (*)(unsigned short)) ai = {{.*}}
+auto aj = &unary<int>;
+// CHECK: (void (*)(int)) aj = {{.*}}
+auto ak = &unary<unsigned int>;
+// CHECK: (void (*)(unsigned int)) ak = {{.*}}
+auto al = &unary<long>;
+// CHECK: (void (*)(long)) al = {{.*}}
+auto am = &unary<unsigned long>;
+// CHECK: (void (*)(unsigned long)) am = {{.*}}
+auto an = &unary<long long>;
+// CHECK: (void (*)(long long)) an = {{.*}}
+auto ao = &unary<unsigned long long>;
+// CHECK: (void (*)(unsigned long long)) ao = {{.*}}
+auto aq = &unary<float>;
+// CHECK: (void (*)(float)) aq = {{.*}}
+auto ar = &unary<double>;
+// CHECK: (void (*)(double)) ar = {{.*}}
+
+auto as = &unary<int*>;
+// CHECK: (void (*)(int *)) as = {{.*}}
+auto at = &unary<int**>;
+// CHECK: (void (*)(int **)) at = {{.*}}
+auto au = &unary<int&>;
+// CHECK: (void (*)(int &)) au = {{.*}}
+auto av = &unary<int&&>;
+// CHECK: (void (*)(int &&)) av = {{.*}}
+auto aw = &unary<const int*>;
+// CHECK: (void (*)(const int *)) aw = {{.*}}
+auto ax = &unary<volatile int*>;
+// CHECK: (void (*)(volatile int *)) ax = {{.*}}
+auto ay = &unary<const volatile int*>;
+// CHECK: (void (*)(const volatile int *)) ay = {{.*}}
+auto az = &unary<void*&>;
+// CHECK: (void (*)(void *&)) az = {{.*}}
+auto aaa = &unary<int(&)[5]>;
+// CHECK: (void (*)(int (&)[5])) aaa = {{.*}}
+auto aab = &unary<int(*)[5]>;
+// CHECK: (void (*)(int (*)[5])) aab = {{.*}}
+auto aac = &unary<int(&&)[5]>;
+// CHECK: (void (*)(int (&&)[5])) aac = {{.*}}
+auto aad = &unary<int(*const)[5]>;
+// CHECK: (void (*)(int (*)[5])) aad = {{.*}}
+
+
+// same test cases with return values, note we can't overload on return type
+// so we need to use a different instantiation each time.
+auto ra = &unaryret<bool, 0>;
+// CHECK: (bool (*)()) ra = {{.*}}
+auto rb = &unaryret<char, 1>;
+// CHECK: (char (*)()) rb = {{.*}}
+auto rc = &unaryret<signed char, 2>;
+// CHECK: (signed char (*)()) rc = {{.*}}
+auto rd = &unaryret<unsigned char, 3>;
+// CHECK: (unsigned char (*)()) rd = {{.*}}
+auto re = &unaryret<char16_t, 4>;
+// CHECK: (char16_t (*)()) re = {{.*}}
+auto rf = &unaryret<char32_t, 5>;
+// CHECK: (char32_t (*)()) rf = {{.*}}
+auto rg = &unaryret<wchar_t, 6>;
+// CHECK: (wchar_t (*)()) rg = {{.*}}
+auto rh = &unaryret<short, 7>;
+// CHECK: (short (*)()) rh = {{.*}}
+auto ri = &unaryret<unsigned short, 8>;
+// CHECK: (unsigned short (*)()) ri = {{.*}}
+auto rj = &unaryret<int, 9>;
+// CHECK: (int (*)()) rj = {{.*}}
+auto rk = &unaryret<unsigned int, 10>;
+// CHECK: (unsigned int (*)()) rk = {{.*}}
+auto rl = &unaryret<long, 11>;
+// CHECK: (long (*)()) rl = {{.*}}
+auto rm = &unaryret<unsigned long, 12>;
+// CHECK: (unsigned long (*)()) rm = {{.*}}
+auto rn = &unaryret<long long, 13>;
+// CHECK: (long long (*)()) rn = {{.*}}
+auto ro = &unaryret<unsigned long long, 14>;
+// CHECK: (unsigned long long (*)()) ro = {{.*}}
+auto rq = &unaryret<float, 15>;
+// CHECK: (float (*)()) rq = {{.*}}
+auto rr = &unaryret<double, 16>;
+// CHECK: (double (*)()) rr = {{.*}}
+
+auto rs = &unaryret<int*, 17>;
+// CHECK: (int *(*)()) rs = {{.*}}
+auto rt = &unaryret<int**, 18>;
+// CHECK: (int **(*)()) rt = {{.*}}
+auto ru = &unaryret<int&, 19>;
+// CHECK: (int &(*)()) ru = {{.*}}
+auto rv = &unaryret<int&&, 20>;
+// CHECK: (int &&(*)()) rv = {{.*}}
+auto rw = &unaryret<const int*, 21>;
+// CHECK: (const int *(*)()) rw = {{.*}}
+auto rx = &unaryret<volatile int*, 22>;
+// CHECK: (volatile int *(*)()) rx = {{.*}}
+auto ry = &unaryret<const volatile int*, 23>;
+// CHECK: (const volatile int *(*)()) ry = {{.*}}
+auto rz = &unaryret<void*&, 24>;
+// CHECK: (void *&(*)()) rz = {{.*}}
+
+// FIXME: This output doesn't really look correct. It should probably be
+// formatting this as `int(&)[5] (*)()`.
+auto raa = &unaryret<int(&)[5], 25>;
+// CHECK: (int (&(*)())[5]) raa = {{.*}}
+auto rab = &unaryret<int(*)[5], 26>;
+// CHECK: (int (*(*)())[5]) rab = {{.*}}
+auto rac = &unaryret<int(&&)[5], 27>;
+// CHECK: (int (&&(*)())[5]) rac = {{.*}}
+auto rad = &unaryret<int(*const)[5], 28>;
+// CHECK: (int (*const (*)())[5]) rad = {{.*}}
+
+
+
+// Function references, we only need a couple of these since most of the
+// interesting cases are already tested.
+auto &ref = unary<bool>;
+// CHECK: (void (&)(bool)) ref = {{.*}} (&::ref = <no summary available>)
+auto &ref2 = unary<volatile int*>;
+// CHECK: (void (&)(volatile int *)) ref2 = {{.*}} (&::ref2 = <no summary available>)
+auto &ref3 = varargs;
+// CHECK: (int (&)(int, int, ...)) ref3 = {{.*}} (&::ref3 = <no summary available>)
+
+// Multiple arguments, as before, just something to make sure it works.
+auto binp = &binary<int*, const int*>;
+// CHECK: (void (*)(int *, const int *)) binp = {{.*}}
+auto &binr = binary<int*, const int*>;
+// CHECK: (void (&)(int *, const int *)) binr = {{.*}} (&::binr = <no summary available>)
+
+// And finally, a function with no arguments.
+auto null = &nullary;
+// CHECK: (void (*)()) null = {{.*}}
+
+// FIXME: These currently don't work because clang-cl emits incorrect debug info
+// for std::nullptr_t. We should fix these in clang-cl.
+auto rae = &unaryret<decltype(nullptr), 29>;
+// CHECK: (nullptr_t (*)()) rae = {{.*}}
+auto aae = &unary<decltype(nullptr)>;
+// CHECK: (void (*)(nullptr_t)) aae = {{.*}}
+
+int main(int argc, char **argv) {
+ return 0;
+}
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/function-types-calling-conv.cpp b/lldb/test/Shell/SymbolFile/NativePDB/function-types-calling-conv.cpp
new file mode 100644
index 00000000000..cd13159d508
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/function-types-calling-conv.cpp
@@ -0,0 +1,32 @@
+// clang-format off
+// REQUIRES: lld
+
+// RUN: %build --compiler=clang-cl --arch=32 --nodefaultlib -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/function-types-calling-conv.lldbinit | FileCheck %s
+
+
+void __stdcall StdcallFn() {}
+void __fastcall FastcallFn() {}
+void __thiscall ThiscallFn() {}
+void __cdecl CdeclFn() {}
+void __vectorcall VectorcallFn() {}
+
+auto sfn = &StdcallFn;
+// CHECK: (void (*)() __attribute__((stdcall))) sfn = {{.*}}
+
+auto ffn = &FastcallFn;
+// CHECK: (void (*)() __attribute__((fastcall))) ffn = {{.*}}
+
+auto tfn = &ThiscallFn;
+// CHECK: (void (*)() __attribute__((thiscall))) tfn = {{.*}}
+
+auto cfn = &CdeclFn;
+// CHECK: (void (*)()) cfn = {{.*}}
+
+auto vfn = &VectorcallFn;
+// CHECK: (void (*)() __attribute__((vectorcall))) vfn = {{.*}}
+
+int main(int argc, char **argv) {
+ return 0;
+}
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp b/lldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp
new file mode 100644
index 00000000000..4a8caa7f837
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp
@@ -0,0 +1,141 @@
+// clang-format off
+// REQUIRES: lld
+
+// Test that we can display function signatures with class types.
+// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/function-types-classes.lldbinit | FileCheck %s
+
+// This is just some unimportant helpers needed so that we can get reference and
+// rvalue-reference types into return values.
+template<typename T>
+struct MakeResult {
+ static T result() {
+ return T{};
+ }
+};
+
+template<typename T>
+struct MakeResult<T&> {
+ static T& result() {
+ static T t;
+ return t;
+ }
+};
+
+template<typename T>
+struct MakeResult<T&&> {
+ static T&& result() {
+ static T t;
+ return static_cast<T&&>(t);
+ }
+};
+
+
+template<typename R>
+R nullary() { return MakeResult<R>::result(); }
+
+template<typename R, typename A, typename B>
+R three(A a, B b) { return MakeResult<R>::result(); }
+
+template<typename R, typename A, typename B, typename C>
+R four(A a, B b, C c) { return MakeResult<R>::result(); }
+
+struct S {};
+class C {};
+union U {};
+enum E {};
+
+namespace A {
+ namespace B {
+ // NS::NS
+ struct S { };
+ }
+
+ struct C {
+ // NS::Struct
+ struct S {};
+ };
+}
+
+struct B {
+ struct A {
+ // Struct::Struct
+ struct S {};
+ };
+};
+
+// clang (incorrectly) doesn't emit debug information for outer classes
+// unless they are instantiated. They should also be emitted if there
+// is an inner class which is instantiated.
+A::C ForceInstantiateAC;
+B ForceInstantiateB;
+B::A ForceInstantiateBA;
+
+template<typename T>
+struct TC {};
+
+// const and volatile modifiers
+auto a = &four<S, C*, U&, E&&>;
+// CHECK: (S (*)(C *, U &, E &&)) a = {{.*}}
+auto b = &four<E, const S*, const C&, const U&&>;
+// CHECK: (E (*)(const S *, const C &, const U &&)) b = {{.*}}
+auto c = &four<U, volatile E*, volatile S&, volatile C&&>;
+// CHECK: (U (*)(volatile E *, volatile S &, volatile C &&)) c = {{.*}}
+auto d = &four<C, const volatile U*, const volatile E&, const volatile S&&>;
+// CHECK: (C (*)(const volatile U *, const volatile E &, const volatile S &&)) d = {{.*}}
+
+// classes nested in namespaces and inner classes
+
+auto e = &three<A::B::S*, B::A::S*, A::C::S&>;
+// CHECK: (A::B::S *(*)(B::A::S *, A::C::S &)) e = {{.*}}
+auto f = &three<A::C::S&, A::B::S*, B::A::S*>;
+// CHECK: (A::C::S &(*)(A::B::S *, B::A::S *)) f = {{.*}}
+auto g = &three<B::A::S*, A::C::S&, A::B::S*>;
+// CHECK: (B::A::S *(*)(A::C::S &, A::B::S *)) g = {{.*}}
+
+// parameter types that are themselves template instantiations.
+auto h = &four<TC<void>, TC<int>, TC<TC<int>>, TC<A::B::S>>;
+// CHECK: (TC<void> (*)(TC<int>, TC<TC<int>>, TC<A::B::S>)) h = {{.*}}
+
+auto i = &nullary<A::B::S>;
+// CHECK: (A::B::S (*)()) i = {{.*}}
+
+
+// Make sure we can handle types that don't have complete debug info.
+struct Incomplete;
+auto incomplete = &three<Incomplete*, Incomplete**, const Incomplete*>;
+// CHECK: (Incomplete *(*)(Incomplete **, const Incomplete *)) incomplete = {{.*}}
+
+// CHECK: TranslationUnitDecl {{.*}}
+// CHECK: |-CXXRecordDecl {{.*}} class C
+// CHECK: |-CXXRecordDecl {{.*}} union U
+// CHECK: |-EnumDecl {{.*}} E
+// CHECK: |-CXXRecordDecl {{.*}} struct S
+// CHECK: |-VarDecl {{.*}} a 'S (*)(C *, U &, E &&)'
+// CHECK: |-VarDecl {{.*}} b 'E (*)(const S *, const C &, const U &&)'
+// CHECK: |-VarDecl {{.*}} c 'U (*)(volatile E *, volatile S &, volatile C &&)'
+// CHECK: |-VarDecl {{.*}} d 'C (*)(const volatile U *, const volatile E &, const volatile S &&)'
+// CHECK: |-CXXRecordDecl {{.*}} struct B
+// CHECK: | `-CXXRecordDecl {{.*}} struct A
+// CHECK: | `-CXXRecordDecl {{.*}} struct S
+// CHECK: |-NamespaceDecl {{.*}} A
+// CHECK: | |-CXXRecordDecl {{.*}} struct C
+// CHECK: | | `-CXXRecordDecl {{.*}} struct S
+// CHECK: | `-NamespaceDecl {{.*}} B
+// CHECK: | `-CXXRecordDecl {{.*}} struct S
+// CHECK: |-VarDecl {{.*}} e 'A::B::S *(*)(B::A::S *, A::C::S &)'
+// CHECK: |-VarDecl {{.*}} f 'A::C::S &(*)(A::B::S *, B::A::S *)'
+// CHECK: |-VarDecl {{.*}} g 'B::A::S *(*)(A::C::S &, A::B::S *)'
+// CHECK: |-CXXRecordDecl {{.*}} struct TC<int>
+// CHECK: |-CXXRecordDecl {{.*}} struct TC<TC<int>>
+// CHECK: |-CXXRecordDecl {{.*}} struct TC<A::B::S>
+// CHECK: |-CXXRecordDecl {{.*}} struct TC<void>
+// CHECK: |-VarDecl {{.*}} h 'TC<void> (*)(TC<int>, TC<TC<int>>, TC<A::B::S>)'
+// CHECK: |-VarDecl {{.*}} i 'A::B::S (*)()'
+// CHECK: |-CXXRecordDecl {{.*}} struct Incomplete
+// CHECK: `-VarDecl {{.*}} incomplete 'Incomplete *(*)(Incomplete **, const Incomplete *)'
+
+int main(int argc, char **argv) {
+ return 0;
+}
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/global-classes.cpp b/lldb/test/Shell/SymbolFile/NativePDB/global-classes.cpp
new file mode 100644
index 00000000000..e45fbfa4eef
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/global-classes.cpp
@@ -0,0 +1,385 @@
+// clang-format off
+// REQUIRES: lld
+
+// Test that we can display tag types.
+// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/globals-classes.lldbinit | FileCheck %s
+
+enum class EnumType : unsigned {
+ A = 1,
+ B = 2
+};
+
+class ClassNoPadding {
+ /* [ 0] */ unsigned char a = 86;
+ /* [ 1] */ char b = 'a';
+ /* [ 2] */ bool c = false;
+ /* [ 3] */ bool d = true;
+ /* [ 4] */ short e = -1234;
+ /* [ 6] */ unsigned short f = 8123;
+ /* [ 8] */ unsigned int g = 123908;
+ /* [12] */ int h = -890234;
+ /* [16] */ unsigned long i = 2908234;
+ /* [20] */ long j = 7234890;
+ /* [24] */ float k = 908234.12392;
+ /* [28] */ EnumType l = EnumType::A;
+ /* [32] */ double m = 23890.897423;
+ /* [40] */ unsigned long long n = 23490782;
+ /* [48] */ long long o = -923409823;
+ /* [56] */ int p[5] = { 2, 3, 5, 8, 13 };
+};
+
+class ClassWithPadding {
+ /* [ 0] */ char a = '0';
+ // char padding[1];
+ /* [ 2] */ short b = 50;
+ /* [ 4] */ char c[2] = { '0', '1' };
+ // char padding[2];
+ /* [ 8] */ int d = 100;
+ /* [12] */ char e = '0';
+ // char padding[3];
+ /* [16] */ int f = 200;
+ // char padding[4];
+ /* [24] */ long long g = 300;
+ /* [32] */ char h[3] = { '0', '1', '2' };
+ // char padding[5];
+ /* [40] */ long long i = 400;
+ /* [48] */ char j[2] = { '0', '1' };
+ // char padding[6];
+ /* [56] */ long long k = 500;
+ /* [64] */ char l = '0';
+ // char padding[7];
+ /* [72] */ long long m = 600;
+} ;
+
+struct EmptyBase {};
+
+template<typename T>
+struct BaseClass {
+ constexpr BaseClass(int N)
+ : BaseMember(N) {}
+
+ int BaseMember;
+};
+
+struct DerivedClass : public BaseClass<int> {
+ constexpr DerivedClass(int Base, int Derived)
+ : BaseClass(Base), DerivedMember(Derived) {}
+
+ int DerivedMember;
+};
+
+struct EBO : public EmptyBase {
+ constexpr EBO(int N) : Member(N) {}
+ int Member;
+};
+
+struct PaddedBases : public BaseClass<char>, public BaseClass<short>, BaseClass<int> {
+ constexpr PaddedBases(char CH, short S, int N, long long D)
+ : BaseClass<char>(CH), BaseClass<short>(S), BaseClass<int>(N), DerivedMember(D) {}
+ long long DerivedMember;
+};
+
+struct Statics {
+ static char a;
+ static bool b;
+ static short c;
+ static unsigned short d;
+ static unsigned int e;
+ static int f;
+ static unsigned long g;
+ static long h;
+ static float i;
+ static EnumType j;
+ static double k;
+ static unsigned long long l;
+ static long long m;
+};
+
+char Statics::a = 'a';
+bool Statics::b = true;
+short Statics::c = 1234;
+unsigned short Statics::d = 2345;
+unsigned int Statics::e = 3456;
+int Statics::f = 4567;
+unsigned long Statics::g = 5678;
+long Statics::h = 6789;
+float Statics::i = 7890.1234;
+EnumType Statics::j = EnumType::A;
+double Statics::k = 8901.2345;
+unsigned long long Statics::l = 9012345;
+long long Statics::m = 1234567;
+
+
+struct Pointers {
+ void *a = nullptr;
+ char *b = &Statics::a;
+ bool *c = &Statics::b;
+ short *e = &Statics::c;
+ unsigned short *f = &Statics::d;
+ unsigned int *g = &Statics::e;
+ int *h = &Statics::f;
+ unsigned long *i = &Statics::g;
+ long *j = &Statics::h;
+ float *k = &Statics::i;
+ EnumType *l = &Statics::j;
+ double *m = &Statics::k;
+ unsigned long long *n = &Statics::l;
+ long long *o = &Statics::m;
+};
+
+struct References {
+ char &a = Statics::a;
+ bool &b = Statics::b;
+ short &c = Statics::c;
+ unsigned short &d = Statics::d;
+ unsigned int &e = Statics::e;
+ int &f = Statics::f;
+ unsigned long &g = Statics::g;
+ long &h = Statics::h;
+ float &i = Statics::i;
+ EnumType &j = Statics::j;
+ double &k = Statics::k;
+ unsigned long long &l = Statics::l;
+ long long &m = Statics::m;
+};
+
+
+constexpr ClassWithPadding ClassWithPaddingInstance;
+// CHECK: (lldb) target variable -T ClassWithPaddingInstance
+// CHECK-NEXT: (const ClassWithPadding) ClassWithPaddingInstance = {
+// CHECK-NEXT: (char) a = '0'
+// CHECK-NEXT: (short) b = 50
+// CHECK-NEXT: (char [2]) c = "01"
+// CHECK-NEXT: (int) d = 100
+// CHECK-NEXT: (char) e = '0'
+// CHECK-NEXT: (int) f = 200
+// CHECK-NEXT: (long long) g = 300
+// CHECK-NEXT: (char [3]) h = "012"
+// CHECK-NEXT: (long long) i = 400
+// CHECK-NEXT: (char [2]) j = "01"
+// CHECK-NEXT: (long long) k = 500
+// CHECK-NEXT: (char) l = '0'
+// CHECK-NEXT: (long long) m = 600
+// CHECK-NEXT: }
+
+constexpr ClassNoPadding ClassNoPaddingInstance;
+// CHECK: (lldb) target variable -T ClassNoPaddingInstance
+// CHECK-NEXT: (const ClassNoPadding) ClassNoPaddingInstance = {
+// CHECK-NEXT: (unsigned char) a = 'V'
+// CHECK-NEXT: (char) b = 'a'
+// CHECK-NEXT: (bool) c = false
+// CHECK-NEXT: (bool) d = true
+// CHECK-NEXT: (short) e = -1234
+// CHECK-NEXT: (unsigned short) f = 8123
+// CHECK-NEXT: (unsigned int) g = 123908
+// CHECK-NEXT: (int) h = -890234
+// CHECK-NEXT: (unsigned long) i = 2908234
+// CHECK-NEXT: (long) j = 7234890
+// CHECK-NEXT: (float) k = 908234.125
+// CHECK-NEXT: (EnumType) l = A
+// CHECK-NEXT: (double) m = 23890.897422999999
+// CHECK-NEXT: (unsigned long long) n = 23490782
+// CHECK-NEXT: (long long) o = -923409823
+// CHECK-NEXT: (int [5]) p = {
+// CHECK-NEXT: (int) [0] = 2
+// CHECK-NEXT: (int) [1] = 3
+// CHECK-NEXT: (int) [2] = 5
+// CHECK-NEXT: (int) [3] = 8
+// CHECK-NEXT: (int) [4] = 13
+// CHECK-NEXT: }
+// CHECK-NEXT: }
+
+constexpr DerivedClass DC(10, 20);
+// CHECK: (lldb) target variable -T DC
+// CHECK-NEXT: (const DerivedClass) DC = {
+// CHECK-NEXT: (BaseClass<int>) BaseClass<int> = {
+// CHECK-NEXT: (int) BaseMember = 10
+// CHECK-NEXT: }
+// CHECK-NEXT: (int) DerivedMember = 20
+// CHECK-NEXT: }
+
+constexpr EBO EBOC(20);
+// CHECK: (lldb) target variable -T EBOC
+// CHECK-NEXT: (const EBO) EBOC = {
+// CHECK-NEXT: (int) Member = 20
+// CHECK-NEXT: }
+
+constexpr PaddedBases PBC('a', 12, 120, 1200);
+// CHECK: (lldb) target variable -T PBC
+// CHECK-NEXT: (const PaddedBases) PBC = {
+// CHECK-NEXT: (BaseClass<char>) BaseClass<char> = {
+// CHECK-NEXT: (int) BaseMember = 97
+// CHECK-NEXT: }
+// CHECK-NEXT: (BaseClass<short>) BaseClass<short> = {
+// CHECK-NEXT: (int) BaseMember = 12
+// CHECK-NEXT: }
+// CHECK-NEXT: (BaseClass<int>) BaseClass<int> = {
+// CHECK-NEXT: (int) BaseMember = 120
+// CHECK-NEXT: }
+// CHECK-NEXT: (long long) DerivedMember = 1200
+// CHECK-NEXT: }
+
+constexpr struct {
+ int x = 12;
+ EBO EBOC{ 42 };
+} UnnamedClassInstance;
+// CHECK: (lldb) target variable -T UnnamedClassInstance
+// CHECK-NEXT: (const <unnamed-type-UnnamedClassInstance>) UnnamedClassInstance = {
+// CHECK-NEXT: (int) x = 12
+// CHECK-NEXT: (EBO) EBOC = {
+// CHECK-NEXT: (int) Member = 42
+// CHECK-NEXT: }
+// CHECK-NEXT: }
+
+constexpr Pointers PointersInstance;
+// CHECK: (lldb) target variable -T PointersInstance
+// CHECK-NEXT: (const Pointers) PointersInstance = {
+// CHECK-NEXT: (void *) a = {{.*}}
+// CHECK-NEXT: (char *) b = {{.*}}
+// CHECK-NEXT: (bool *) c = {{.*}}
+// CHECK-NEXT: (short *) e = {{.*}}
+// CHECK-NEXT: (unsigned short *) f = {{.*}}
+// CHECK-NEXT: (unsigned int *) g = {{.*}}
+// CHECK-NEXT: (int *) h = {{.*}}
+// CHECK-NEXT: (unsigned long *) i = {{.*}}
+// CHECK-NEXT: (long *) j = {{.*}}
+// CHECK-NEXT: (float *) k = {{.*}}
+// CHECK-NEXT: (EnumType *) l = {{.*}}
+// CHECK-NEXT: (double *) m = {{.*}}
+// CHECK-NEXT: (unsigned long long *) n = {{.*}}
+// CHECK-NEXT: (long long *) o = {{.*}}
+// CHECK-NEXT: }
+constexpr References ReferencesInstance;
+// CHECK: (lldb) target variable -T ReferencesInstance
+// CHECK-NEXT: (const References) ReferencesInstance = {
+// CHECK-NEXT: (char &) a = {{.*}}
+// CHECK-NEXT: (bool &) b = {{.*}}
+// CHECK-NEXT: (short &) c = {{.*}}
+// CHECK-NEXT: (unsigned short &) d = {{.*}}
+// CHECK-NEXT: (unsigned int &) e = {{.*}}
+// CHECK-NEXT: (int &) f = {{.*}}
+// CHECK-NEXT: (unsigned long &) g = {{.*}}
+// CHECK-NEXT: (long &) h = {{.*}}
+// CHECK-NEXT: (float &) i = {{.*}}
+// CHECK-NEXT: (EnumType &) j = {{.*}}
+// CHECK-NEXT: (double &) k = {{.*}}
+// CHECK-NEXT: (unsigned long long &) l = {{.*}}
+// CHECK-NEXT: (long long &) m = {{.*}}
+// CHECK-NEXT: }
+
+// CHECK: Dumping clang ast for 1 modules.
+// CHECK: TranslationUnitDecl {{.*}}
+// CHECK: |-CXXRecordDecl {{.*}} class ClassWithPadding definition
+// CHECK: | |-FieldDecl {{.*}} a 'char'
+// CHECK: | |-FieldDecl {{.*}} b 'short'
+// CHECK: | |-FieldDecl {{.*}} c 'char [2]'
+// CHECK: | |-FieldDecl {{.*}} d 'int'
+// CHECK: | |-FieldDecl {{.*}} e 'char'
+// CHECK: | |-FieldDecl {{.*}} f 'int'
+// CHECK: | |-FieldDecl {{.*}} g 'long long'
+// CHECK: | |-FieldDecl {{.*}} h 'char [3]'
+// CHECK: | |-FieldDecl {{.*}} i 'long long'
+// CHECK: | |-FieldDecl {{.*}} j 'char [2]'
+// CHECK: | |-FieldDecl {{.*}} k 'long long'
+// CHECK: | |-FieldDecl {{.*}} l 'char'
+// CHECK: | `-FieldDecl {{.*}} m 'long long'
+// CHECK: |-VarDecl {{.*}} ClassWithPaddingInstance 'const ClassWithPadding'
+// CHECK: |-CXXRecordDecl {{.*}} class ClassNoPadding definition
+// CHECK: | |-FieldDecl {{.*}} a 'unsigned char'
+// CHECK: | |-FieldDecl {{.*}} b 'char'
+// CHECK: | |-FieldDecl {{.*}} c 'bool'
+// CHECK: | |-FieldDecl {{.*}} d 'bool'
+// CHECK: | |-FieldDecl {{.*}} e 'short'
+// CHECK: | |-FieldDecl {{.*}} f 'unsigned short'
+// CHECK: | |-FieldDecl {{.*}} g 'unsigned int'
+// CHECK: | |-FieldDecl {{.*}} h 'int'
+// CHECK: | |-FieldDecl {{.*}} i 'unsigned long'
+// CHECK: | |-FieldDecl {{.*}} j 'long'
+// CHECK: | |-FieldDecl {{.*}} k 'float'
+// CHECK: | |-FieldDecl {{.*}} l 'EnumType'
+// CHECK: | |-FieldDecl {{.*}} m 'double'
+// CHECK: | |-FieldDecl {{.*}} n 'unsigned long long'
+// CHECK: | |-FieldDecl {{.*}} o 'long long'
+// CHECK: | `-FieldDecl {{.*}} p 'int [5]'
+// CHECK: |-VarDecl {{.*}} ClassNoPaddingInstance 'const ClassNoPadding'
+// CHECK: |-EnumDecl {{.*}} EnumType
+// CHECK: | |-EnumConstantDecl {{.*}} A 'EnumType'
+// CHECK: | `-EnumConstantDecl {{.*}} B 'EnumType'
+// CHECK: |-CXXRecordDecl {{.*}} struct DerivedClass definition
+// CHECK: | |-public 'BaseClass<int>'
+// CHECK: | |-FieldDecl {{.*}} DerivedMember 'int'
+// CHECK: | `-CXXConstructorDecl {{.*}} DerivedClass 'void (int, int)'
+// CHECK: | |-ParmVarDecl {{.*}} 'int'
+// CHECK: | `-ParmVarDecl {{.*}} 'int'
+// CHECK: |-VarDecl {{.*}} DC 'const DerivedClass'
+// CHECK: |-CXXRecordDecl {{.*}} struct BaseClass<int> definition
+// CHECK: | |-FieldDecl {{.*}} BaseMember 'int'
+// CHECK: | `-CXXMethodDecl {{.*}} BaseClass 'void (int)'
+// CHECK: | `-ParmVarDecl {{.*}} 'int'
+// CHECK: |-CXXRecordDecl {{.*}} struct EBO definition
+// CHECK: | |-public 'EmptyBase'
+// CHECK: | |-FieldDecl {{.*}} Member 'int'
+// CHECK: | `-CXXConstructorDecl {{.*}} EBO 'void (int)'
+// CHECK: | `-ParmVarDecl {{.*}} 'int'
+// CHECK: |-VarDecl {{.*}} EBOC 'const EBO'
+// CHECK: |-CXXRecordDecl {{.*}} struct EmptyBase definition
+// CHECK: |-CXXRecordDecl {{.*}} struct PaddedBases definition
+// CHECK: | |-public 'BaseClass<char>'
+// CHECK: | |-public 'BaseClass<short>'
+// CHECK: | |-public 'BaseClass<int>'
+// CHECK: | |-FieldDecl {{.*}} DerivedMember 'long long'
+// CHECK: | `-CXXConstructorDecl {{.*}} PaddedBases 'void (char, short, int, long long)'
+// CHECK: | |-ParmVarDecl {{.*}} 'char'
+// CHECK: | |-ParmVarDecl {{.*}} 'short'
+// CHECK: | |-ParmVarDecl {{.*}} 'int'
+// CHECK: | `-ParmVarDecl {{.*}} 'long long'
+// CHECK: |-VarDecl {{.*}} PBC 'const PaddedBases'
+// CHECK: |-CXXRecordDecl {{.*}} struct BaseClass<char> definition
+// CHECK: | |-FieldDecl {{.*}} BaseMember 'int'
+// CHECK: | `-CXXMethodDecl {{.*}} BaseClass 'void (int)'
+// CHECK: | `-ParmVarDecl {{.*}} 'int'
+// CHECK: |-CXXRecordDecl {{.*}} struct BaseClass<short> definition
+// CHECK: | |-FieldDecl {{.*}} BaseMember 'int'
+// CHECK: | `-CXXMethodDecl {{.*}} BaseClass 'void (int)'
+// CHECK: | `-ParmVarDecl {{.*}} 'int'
+// CHECK: |-CXXRecordDecl {{.*}} struct <unnamed-type-UnnamedClassInstance> definition
+// CHECK: | |-FieldDecl {{.*}} x 'int'
+// CHECK: | `-FieldDecl {{.*}} EBOC 'EBO'
+// CHECK: |-VarDecl {{.*}} UnnamedClassInstance 'const <unnamed-type-UnnamedClassInstance>'
+// CHECK: |-CXXRecordDecl {{.*}} struct Pointers definition
+// CHECK: | |-FieldDecl {{.*}} a 'void *'
+// CHECK: | |-FieldDecl {{.*}} b 'char *'
+// CHECK: | |-FieldDecl {{.*}} c 'bool *'
+// CHECK: | |-FieldDecl {{.*}} e 'short *'
+// CHECK: | |-FieldDecl {{.*}} f 'unsigned short *'
+// CHECK: | |-FieldDecl {{.*}} g 'unsigned int *'
+// CHECK: | |-FieldDecl {{.*}} h 'int *'
+// CHECK: | |-FieldDecl {{.*}} i 'unsigned long *'
+// CHECK: | |-FieldDecl {{.*}} j 'long *'
+// CHECK: | |-FieldDecl {{.*}} k 'float *'
+// CHECK: | |-FieldDecl {{.*}} l 'EnumType *'
+// CHECK: | |-FieldDecl {{.*}} m 'double *'
+// CHECK: | |-FieldDecl {{.*}} n 'unsigned long long *'
+// CHECK: | `-FieldDecl {{.*}} o 'long long *'
+// CHECK: |-VarDecl {{.*}} PointersInstance 'const Pointers'
+// CHECK: |-CXXRecordDecl {{.*}} struct References definition
+// CHECK: | |-FieldDecl {{.*}} a 'char &'
+// CHECK: | |-FieldDecl {{.*}} b 'bool &'
+// CHECK: | |-FieldDecl {{.*}} c 'short &'
+// CHECK: | |-FieldDecl {{.*}} d 'unsigned short &'
+// CHECK: | |-FieldDecl {{.*}} e 'unsigned int &'
+// CHECK: | |-FieldDecl {{.*}} f 'int &'
+// CHECK: | |-FieldDecl {{.*}} g 'unsigned long &'
+// CHECK: | |-FieldDecl {{.*}} h 'long &'
+// CHECK: | |-FieldDecl {{.*}} i 'float &'
+// CHECK: | |-FieldDecl {{.*}} j 'EnumType &'
+// CHECK: | |-FieldDecl {{.*}} k 'double &'
+// CHECK: | |-FieldDecl {{.*}} l 'unsigned long long &'
+// CHECK: | `-FieldDecl {{.*}} m 'long long &'
+// CHECK: `-VarDecl {{.*}} ReferencesInstance 'const References'
+
+int main(int argc, char **argv) {
+ return 0;
+}
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/globals-bss.cpp b/lldb/test/Shell/SymbolFile/NativePDB/globals-bss.cpp
new file mode 100644
index 00000000000..c10c3c19628
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/globals-bss.cpp
@@ -0,0 +1,34 @@
+// clang-format off
+// REQUIRES: lld
+
+// Make sure we can read variables from BSS
+// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
+// RUN: llvm-readobj -s %t.exe | FileCheck --check-prefix=BSS %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/globals-bss.lldbinit 2>&1 | FileCheck %s
+
+int GlobalVariable = 0;
+
+int main(int argc, char **argv) {
+ return 0;
+}
+
+// BSS: Section {
+// BSS: Number: 3
+// BSS: Name: .data
+// BSS-NEXT: VirtualSize: 0x4
+// BSS-NEXT: VirtualAddress:
+// BSS-NEXT: RawDataSize: 0
+// BSS-NEXT: PointerToRawData: 0x0
+// BSS-NEXT: PointerToRelocations: 0x0
+// BSS-NEXT: PointerToLineNumbers: 0x0
+// BSS-NEXT: RelocationCount: 0
+// BSS-NEXT: LineNumberCount: 0
+// BSS-NEXT: Characteristics [ (0xC0000040)
+// BSS-NEXT: IMAGE_SCN_CNT_INITIALIZED_DATA (0x40)
+// BSS-NEXT: IMAGE_SCN_MEM_READ (0x40000000)
+// BSS-NEXT: IMAGE_SCN_MEM_WRITE (0x80000000)
+// BSS-NEXT: ]
+// BSS-NEXT: }
+
+// CHECK: (int) GlobalVariable = 0
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/globals-fundamental.cpp b/lldb/test/Shell/SymbolFile/NativePDB/globals-fundamental.cpp
new file mode 100644
index 00000000000..48dea6d51e4
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/globals-fundamental.cpp
@@ -0,0 +1,879 @@
+// clang-format off
+// REQUIRES: lld
+
+// Test that we can display tag types.
+// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/globals-fundamental.lldbinit | FileCheck %s
+
+
+// Fundamental data types
+bool BFalse = false;
+// CHECK: (lldb) target variable BFalse
+// CHECK-NEXT: (bool) BFalse = false
+bool BTrue = true;
+// CHECK-NEXT: (lldb) target variable BTrue
+// CHECK-NEXT: (bool) BTrue = true
+char CA = 'A';
+// CHECK-NEXT: (lldb) target variable CA
+// CHECK-NEXT: (char) CA = 'A'
+char CZ = 'Z';
+// CHECK-NEXT: (lldb) target variable CZ
+// CHECK-NEXT: (char) CZ = 'Z'
+signed char SCa = 'a';
+// CHECK-NEXT: (lldb) target variable SCa
+// CHECK-NEXT: (signed char) SCa = 'a'
+signed char SCz = 'z';
+// CHECK-NEXT: (lldb) target variable SCz
+// CHECK-NEXT: (signed char) SCz = 'z'
+unsigned char UC24 = 24;
+// CHECK-NEXT: (lldb) target variable UC24
+// CHECK-NEXT: (unsigned char) UC24 = '\x18'
+unsigned char UC42 = 42;
+// CHECK-NEXT: (lldb) target variable UC42
+// CHECK-NEXT: (unsigned char) UC42 = '*'
+char16_t C16_24 = u'\24';
+// CHECK-NEXT: (lldb) target variable C16_24
+// CHECK-NEXT: (char16_t) C16_24 = U+0014
+char32_t C32_42 = U'\42';
+// CHECK-NEXT: (lldb) target variable C32_42
+// CHECK-NEXT: (char32_t) C32_42 = U+0x00000022
+wchar_t WC1 = L'1';
+// CHECK-NEXT: (lldb) target variable WC1
+// CHECK-NEXT: (wchar_t) WC1 = L'1'
+wchar_t WCP = L'P';
+// CHECK-NEXT: (lldb) target variable WCP
+// CHECK-NEXT: (wchar_t) WCP = L'P'
+short SMax = 32767;
+// CHECK-NEXT: (lldb) target variable SMax
+// CHECK-NEXT: (short) SMax = 32767
+short SMin = -32768;
+// CHECK-NEXT: (lldb) target variable SMin
+// CHECK-NEXT: (short) SMin = -32768
+unsigned short USMax = 65535;
+// CHECK-NEXT: (lldb) target variable USMax
+// CHECK-NEXT: (unsigned short) USMax = 65535
+unsigned short USMin = 0;
+// CHECK-NEXT: (lldb) target variable USMin
+// CHECK-NEXT: (unsigned short) USMin = 0
+int IMax = 2147483647;
+// CHECK-NEXT: (lldb) target variable IMax
+// CHECK-NEXT: (int) IMax = 2147483647
+int IMin = -2147483648;
+// CHECK-NEXT: (lldb) target variable IMin
+// CHECK-NEXT: (int) IMin = -2147483648
+unsigned int UIMax = 4294967295;
+// CHECK-NEXT: (lldb) target variable UIMax
+// CHECK-NEXT: (unsigned int) UIMax = 4294967295
+unsigned int UIMin = 0;
+// CHECK-NEXT: (lldb) target variable UIMin
+// CHECK-NEXT: (unsigned int) UIMin = 0
+long LMax = 2147483647;
+// CHECK-NEXT: (lldb) target variable LMax
+// CHECK-NEXT: (long) LMax = 2147483647
+long LMin = -2147483648;
+// CHECK-NEXT: (lldb) target variable LMin
+// CHECK-NEXT: (long) LMin = -2147483648
+unsigned long ULMax = 4294967295;
+// CHECK-NEXT: (lldb) target variable ULMax
+// CHECK-NEXT: (unsigned long) ULMax = 4294967295
+unsigned long ULMin = 0;
+// CHECK-NEXT: (lldb) target variable ULMin
+// CHECK-NEXT: (unsigned long) ULMin = 0
+long long LLMax = 9223372036854775807LL;
+// CHECK-NEXT: (lldb) target variable LLMax
+// CHECK-NEXT: (long long) LLMax = 9223372036854775807
+long long LLMin = -9223372036854775807i64 - 1;
+// CHECK-NEXT: (lldb) target variable LLMin
+// CHECK-NEXT: (long long) LLMin = -9223372036854775808
+unsigned long long ULLMax = 18446744073709551615ULL;
+// CHECK-NEXT: (lldb) target variable ULLMax
+// CHECK-NEXT: (unsigned long long) ULLMax = 18446744073709551615
+unsigned long long ULLMin = 0;
+// CHECK-NEXT: (lldb) target variable ULLMin
+// CHECK-NEXT: (unsigned long long) ULLMin = 0
+float F = 3.1415f;
+// CHECK-NEXT: (lldb) target variable F
+// CHECK-NEXT: (float) F = 3.1415
+double D = 3.1415;
+// CHECK-NEXT: (lldb) target variable D
+// CHECK-NEXT: (double) D = 3.1415
+
+const bool CBFalse = false;
+// CHECK-NEXT: (lldb) target variable CBFalse
+// CHECK-NEXT: (const bool) CBFalse = false
+const bool CBTrue = true;
+// CHECK-NEXT: (lldb) target variable CBTrue
+// CHECK-NEXT: (const bool) CBTrue = true
+const char CCA = 'A';
+// CHECK-NEXT: (lldb) target variable CCA
+// CHECK-NEXT: (const char) CCA = 'A'
+const char CCZ = 'Z';
+// CHECK-NEXT: (lldb) target variable CCZ
+// CHECK-NEXT: (const char) CCZ = 'Z'
+const signed char CSCa = 'a';
+// CHECK-NEXT: (lldb) target variable CSCa
+// CHECK-NEXT: (const signed char) CSCa = 'a'
+const signed char CSCz = 'z';
+// CHECK-NEXT: (lldb) target variable CSCz
+// CHECK-NEXT: (const signed char) CSCz = 'z'
+const unsigned char CUC24 = 24;
+// CHECK-NEXT: (lldb) target variable CUC24
+// CHECK-NEXT: (const unsigned char) CUC24 = '\x18'
+const unsigned char CUC42 = 42;
+// CHECK-NEXT: (lldb) target variable CUC42
+// CHECK-NEXT: (const unsigned char) CUC42 = '*'
+const char16_t CC16_24 = u'\24';
+// CHECK-NEXT: (lldb) target variable CC16_24
+// CHECK-NEXT: (const char16_t) CC16_24 = U+0014
+const char32_t CC32_42 = U'\42';
+// CHECK-NEXT: (lldb) target variable CC32_42
+// CHECK-NEXT: (const char32_t) CC32_42 = U+0x00000022
+const wchar_t CWC1 = L'1';
+// CHECK-NEXT: (lldb) target variable CWC1
+// CHECK-NEXT: (const wchar_t) CWC1 = L'1'
+const wchar_t CWCP = L'P';
+// CHECK-NEXT: (lldb) target variable CWCP
+// CHECK-NEXT: (const wchar_t) CWCP = L'P'
+const short CSMax = 32767;
+// CHECK-NEXT: (lldb) target variable CSMax
+// CHECK-NEXT: (const short) CSMax = 32767
+const short CSMin = -32768;
+// CHECK-NEXT: (lldb) target variable CSMin
+// CHECK-NEXT: (const short) CSMin = -32768
+const unsigned short CUSMax = 65535;
+// CHECK-NEXT: (lldb) target variable CUSMax
+// CHECK-NEXT: (const unsigned short) CUSMax = 65535
+const unsigned short CUSMin = 0;
+// CHECK-NEXT: (lldb) target variable CUSMin
+// CHECK-NEXT: (const unsigned short) CUSMin = 0
+const int CIMax = 2147483647;
+// CHECK-NEXT: (lldb) target variable CIMax
+// CHECK-NEXT: (const int) CIMax = 2147483647
+const int CIMin = -2147483648;
+// CHECK-NEXT: (lldb) target variable CIMin
+// CHECK-NEXT: (const int) CIMin = -2147483648
+const unsigned int CUIMax = 4294967295;
+// CHECK-NEXT: (lldb) target variable CUIMax
+// CHECK-NEXT: (const unsigned int) CUIMax = 4294967295
+const unsigned int CUIMin = 0;
+// CHECK-NEXT: (lldb) target variable CUIMin
+// CHECK-NEXT: (const unsigned int) CUIMin = 0
+const long CLMax = 2147483647;
+// CHECK-NEXT: (lldb) target variable CLMax
+// CHECK-NEXT: (const long) CLMax = 2147483647
+const long CLMin = -2147483648;
+// CHECK-NEXT: (lldb) target variable CLMin
+// CHECK-NEXT: (const long) CLMin = -2147483648
+const unsigned long CULMax = 4294967295;
+// CHECK-NEXT: (lldb) target variable CULMax
+// CHECK-NEXT: (const unsigned long) CULMax = 4294967295
+const unsigned long CULMin = 0;
+// CHECK-NEXT: (lldb) target variable CULMin
+// CHECK-NEXT: (const unsigned long) CULMin = 0
+const long long CLLMax = 9223372036854775807i64;
+// CHECK-NEXT: (lldb) target variable CLLMax
+// CHECK-NEXT: (const long long) CLLMax = 9223372036854775807
+const long long CLLMin = -9223372036854775807i64 - 1;
+// CHECK-NEXT: (lldb) target variable CLLMin
+// CHECK-NEXT: (const long long) CLLMin = -9223372036854775808
+const unsigned long long CULLMax = 18446744073709551615ULL;
+// CHECK-NEXT: (lldb) target variable CULLMax
+// CHECK-NEXT: (const unsigned long long) CULLMax = 18446744073709551615
+const unsigned long long CULLMin = 0;
+// CHECK-NEXT: (lldb) target variable CULLMin
+// CHECK-NEXT: (const unsigned long long) CULLMin = 0
+const float CF = 3.1415f;
+// CHECK-NEXT: (lldb) target variable CF
+// CHECK-NEXT: (const float) CF = 3.1415
+const double CD = 3.1415;
+// CHECK-NEXT: (lldb) target variable CD
+// CHECK-NEXT: (const double) CD = 3.1415
+
+// constexpr fundamental data types.
+constexpr bool ConstexprBFalse = false;
+// CHECK-NEXT: (lldb) target variable ConstexprBFalse
+// CHECK-NEXT: (const bool) ConstexprBFalse = false
+constexpr bool ConstexprBTrue = true;
+// CHECK-NEXT: (lldb) target variable ConstexprBTrue
+// CHECK-NEXT: (const bool) ConstexprBTrue = true
+constexpr char ConstexprCA = 'A';
+// CHECK-NEXT: (lldb) target variable ConstexprCA
+// CHECK-NEXT: (const char) ConstexprCA = 'A'
+constexpr char ConstexprCZ = 'Z';
+// CHECK-NEXT: (lldb) target variable ConstexprCZ
+// CHECK-NEXT: (const char) ConstexprCZ = 'Z'
+constexpr signed char ConstexprSCa = 'a';
+// CHECK-NEXT: (lldb) target variable ConstexprSCa
+// CHECK-NEXT: (const signed char) ConstexprSCa = 'a'
+constexpr signed char ConstexprSCz = 'z';
+// CHECK-NEXT: (lldb) target variable ConstexprSCz
+// CHECK-NEXT: (const signed char) ConstexprSCz = 'z'
+constexpr unsigned char ConstexprUC24 = 24;
+// CHECK-NEXT: (lldb) target variable ConstexprUC24
+// CHECK-NEXT: (const unsigned char) ConstexprUC24 = '\x18'
+constexpr unsigned char ConstexprUC42 = 42;
+// CHECK-NEXT: (lldb) target variable ConstexprUC42
+// CHECK-NEXT: (const unsigned char) ConstexprUC42 = '*'
+constexpr char16_t ConstexprC16_24 = u'\24';
+// CHECK-NEXT: (lldb) target variable ConstexprC16_24
+// CHECK-NEXT: (const char16_t) ConstexprC16_24 = U+0014
+constexpr char32_t ConstexprC32_42 = U'\42';
+// CHECK-NEXT: (lldb) target variable ConstexprC32_42
+// CHECK-NEXT: (const char32_t) ConstexprC32_42 = U+0x00000022
+constexpr wchar_t ConstexprWC1 = L'1';
+// CHECK-NEXT: (lldb) target variable ConstexprWC1
+// CHECK-NEXT: (const wchar_t) ConstexprWC1 = L'1'
+constexpr wchar_t ConstexprWCP = L'P';
+// CHECK-NEXT: (lldb) target variable ConstexprWCP
+// CHECK-NEXT: (const wchar_t) ConstexprWCP = L'P'
+constexpr short ConstexprSMax = 32767;
+// CHECK-NEXT: (lldb) target variable ConstexprSMax
+// CHECK-NEXT: (const short) ConstexprSMax = 32767
+constexpr short ConstexprSMin = -32768;
+// CHECK-NEXT: (lldb) target variable ConstexprSMin
+// CHECK-NEXT: (const short) ConstexprSMin = -32768
+constexpr unsigned short ConstexprUSMax = 65535;
+// CHECK-NEXT: (lldb) target variable ConstexprUSMax
+// CHECK-NEXT: (const unsigned short) ConstexprUSMax = 65535
+constexpr unsigned short ConstexprUSMin = 0;
+// CHECK-NEXT: (lldb) target variable ConstexprUSMin
+// CHECK-NEXT: (const unsigned short) ConstexprUSMin = 0
+constexpr int ConstexprIMax = 2147483647;
+// CHECK-NEXT: (lldb) target variable ConstexprIMax
+// CHECK-NEXT: (const int) ConstexprIMax = 2147483647
+constexpr int ConstexprIMin = -2147483648;
+// CHECK-NEXT: (lldb) target variable ConstexprIMin
+// CHECK-NEXT: (const int) ConstexprIMin = -2147483648
+constexpr unsigned int ConstexprUIMax = 4294967295;
+// CHECK-NEXT: (lldb) target variable ConstexprUIMax
+// CHECK-NEXT: (const unsigned int) ConstexprUIMax = 4294967295
+constexpr unsigned int ConstexprUIMin = 0;
+// CHECK-NEXT: (lldb) target variable ConstexprUIMin
+// CHECK-NEXT: (const unsigned int) ConstexprUIMin = 0
+constexpr long ConstexprLMax = 2147483647;
+// CHECK-NEXT: (lldb) target variable ConstexprLMax
+// CHECK-NEXT: (const long) ConstexprLMax = 2147483647
+constexpr long ConstexprLMin = -2147483648;
+// CHECK-NEXT: (lldb) target variable ConstexprLMin
+// CHECK-NEXT: (const long) ConstexprLMin = -2147483648
+constexpr unsigned long ConstexprULMax = 4294967295;
+// CHECK-NEXT: (lldb) target variable ConstexprULMax
+// CHECK-NEXT: (const unsigned long) ConstexprULMax = 4294967295
+constexpr unsigned long ConstexprULMin = 0;
+// CHECK-NEXT: (lldb) target variable ConstexprULMin
+// CHECK-NEXT: (const unsigned long) ConstexprULMin = 0
+constexpr long long ConstexprLLMax = 9223372036854775807i64;
+// CHECK-NEXT: (lldb) target variable ConstexprLLMax
+// CHECK-NEXT: (const long long) ConstexprLLMax = 9223372036854775807
+constexpr long long ConstexprLLMin = -9223372036854775807i64 - 1;
+// CHECK-NEXT: (lldb) target variable ConstexprLLMin
+// CHECK-NEXT: (const long long) ConstexprLLMin = -9223372036854775808
+constexpr unsigned long long ConstexprULLMax = 18446744073709551615ULL;
+// CHECK-NEXT: (lldb) target variable ConstexprULLMax
+// CHECK-NEXT: (const unsigned long long) ConstexprULLMax = 18446744073709551615
+constexpr unsigned long long ConstexprULLMin = 0;
+// CHECK-NEXT: (lldb) target variable ConstexprULLMin
+// CHECK-NEXT: (const unsigned long long) ConstexprULLMin = 0
+constexpr float ConstexprF = 3.1415f;
+// CHECK-NEXT: (lldb) target variable ConstexprF
+// CHECK-NEXT: (const float) ConstexprF = 3.1415
+constexpr double ConstexprD = 3.1415;
+// CHECK-NEXT: (lldb) target variable ConstexprD
+// CHECK-NEXT: (const double) ConstexprD = 3.1415
+
+
+// FIXME: LLDB currently doesn't resolve pointers within the target without a
+// running process (I haven't checked whether or not it can with a running
+// process). So currently it will just print an address, which is unstable and
+// should not be relied upon for testing. So for now we're just checking that
+// the variable name and type is correct. We should fix this in LLDB and then
+// update the tests.
+bool *PBFalse = &BFalse;
+// CHECK-NEXT: (lldb) target variable PBFalse
+// CHECK-NEXT: (bool *) PBFalse = {{.*}}
+bool *PBTrue = &BTrue;
+// CHECK-NEXT: (lldb) target variable PBTrue
+// CHECK-NEXT: (bool *) PBTrue = {{.*}}
+char *PCA = &CA;
+// CHECK-NEXT: (lldb) target variable PCA
+// CHECK-NEXT: (char *) PCA = {{.*}}
+char *PCZ = &CZ;
+// CHECK-NEXT: (lldb) target variable PCZ
+// CHECK-NEXT: (char *) PCZ = {{.*}}
+signed char *PSCa = &SCa;
+// CHECK-NEXT: (lldb) target variable PSCa
+// CHECK-NEXT: (signed char *) PSCa = {{.*}}
+signed char *PSCz = &SCz;
+// CHECK-NEXT: (lldb) target variable PSCz
+// CHECK-NEXT: (signed char *) PSCz = {{.*}}
+unsigned char *PUC24 = &UC24;
+// CHECK-NEXT: (lldb) target variable PUC24
+// CHECK-NEXT: (unsigned char *) PUC24 = {{.*}}
+unsigned char *PUC42 = &UC42;
+// CHECK-NEXT: (lldb) target variable PUC42
+// CHECK-NEXT: (unsigned char *) PUC42 = {{.*}}
+char16_t *PC16_24 = &C16_24;
+// CHECK-NEXT: (lldb) target variable PC16_24
+// CHECK-NEXT: (char16_t *) PC16_24 = {{.*}}
+char32_t *PC32_42 = &C32_42;
+// CHECK-NEXT: (lldb) target variable PC32_42
+// CHECK-NEXT: (char32_t *) PC32_42 = {{.*}}
+wchar_t *PWC1 = &WC1;
+// CHECK-NEXT: (lldb) target variable PWC1
+// CHECK-NEXT: (wchar_t *) PWC1 = {{.*}}
+wchar_t *PWCP = &WCP;
+// CHECK-NEXT: (lldb) target variable PWCP
+// CHECK-NEXT: (wchar_t *) PWCP = {{.*}}
+short *PSMax = &SMax;
+// CHECK-NEXT: (lldb) target variable PSMax
+// CHECK-NEXT: (short *) PSMax = {{.*}}
+short *PSMin = &SMin;
+// CHECK-NEXT: (lldb) target variable PSMin
+// CHECK-NEXT: (short *) PSMin = {{.*}}
+unsigned short *PUSMax = &USMax;
+// CHECK-NEXT: (lldb) target variable PUSMax
+// CHECK-NEXT: (unsigned short *) PUSMax = {{.*}}
+unsigned short *PUSMin = &USMin;
+// CHECK-NEXT: (lldb) target variable PUSMin
+// CHECK-NEXT: (unsigned short *) PUSMin = {{.*}}
+int *PIMax = &IMax;
+// CHECK-NEXT: (lldb) target variable PIMax
+// CHECK-NEXT: (int *) PIMax = {{.*}}
+int *PIMin = &IMin;
+// CHECK-NEXT: (lldb) target variable PIMin
+// CHECK-NEXT: (int *) PIMin = {{.*}}
+unsigned int *PUIMax = &UIMax;
+// CHECK-NEXT: (lldb) target variable PUIMax
+// CHECK-NEXT: (unsigned int *) PUIMax = {{.*}}
+unsigned int *PUIMin = &UIMin;
+// CHECK-NEXT: (lldb) target variable PUIMin
+// CHECK-NEXT: (unsigned int *) PUIMin = {{.*}}
+long *PLMax = &LMax;
+// CHECK-NEXT: (lldb) target variable PLMax
+// CHECK-NEXT: (long *) PLMax = {{.*}}
+long *PLMin = &LMin;
+// CHECK-NEXT: (lldb) target variable PLMin
+// CHECK-NEXT: (long *) PLMin = {{.*}}
+unsigned long *PULMax = &ULMax;
+// CHECK-NEXT: (lldb) target variable PULMax
+// CHECK-NEXT: (unsigned long *) PULMax = {{.*}}
+unsigned long *PULMin = &ULMin;
+// CHECK-NEXT: (lldb) target variable PULMin
+// CHECK-NEXT: (unsigned long *) PULMin = {{.*}}
+long long *PLLMax = &LLMax;
+// CHECK-NEXT: (lldb) target variable PLLMax
+// CHECK-NEXT: (long long *) PLLMax = {{.*}}
+long long *PLLMin = &LLMin;
+// CHECK-NEXT: (lldb) target variable PLLMin
+// CHECK-NEXT: (long long *) PLLMin = {{.*}}
+unsigned long long *PULLMax = &ULLMax;
+// CHECK-NEXT: (lldb) target variable PULLMax
+// CHECK-NEXT: (unsigned long long *) PULLMax = {{.*}}
+unsigned long long *PULLMin = &ULLMin;
+// CHECK-NEXT: (lldb) target variable PULLMin
+// CHECK-NEXT: (unsigned long long *) PULLMin = {{.*}}
+float *PF = &F;
+// CHECK-NEXT: (lldb) target variable PF
+// CHECK-NEXT: (float *) PF = {{.*}}
+double *PD = &D;
+// CHECK-NEXT: (lldb) target variable PD
+// CHECK-NEXT: (double *) PD = {{.*}}
+
+// Const pointers to fundamental data types
+const bool *CPBFalse = &BFalse;
+// CHECK-NEXT: (lldb) target variable CPBFalse
+// CHECK-NEXT: (const bool *) CPBFalse = {{.*}}
+const bool *CPBTrue = &BTrue;
+// CHECK-NEXT: (lldb) target variable CPBTrue
+// CHECK-NEXT: (const bool *) CPBTrue = {{.*}}
+const char *CPCA = &CA;
+// CHECK-NEXT: (lldb) target variable CPCA
+// CHECK-NEXT: (const char *) CPCA = {{.*}}
+const char *CPCZ = &CZ;
+// CHECK-NEXT: (lldb) target variable CPCZ
+// CHECK-NEXT: (const char *) CPCZ = {{.*}}
+const signed char *CPSCa = &SCa;
+// CHECK-NEXT: (lldb) target variable CPSCa
+// CHECK-NEXT: (const signed char *) CPSCa = {{.*}}
+const signed char *CPSCz = &SCz;
+// CHECK-NEXT: (lldb) target variable CPSCz
+// CHECK-NEXT: (const signed char *) CPSCz = {{.*}}
+const unsigned char *CPUC24 = &UC24;
+// CHECK-NEXT: (lldb) target variable CPUC24
+// CHECK-NEXT: (const unsigned char *) CPUC24 = {{.*}}
+const unsigned char *CPUC42 = &UC42;
+// CHECK-NEXT: (lldb) target variable CPUC42
+// CHECK-NEXT: (const unsigned char *) CPUC42 = {{.*}}
+const char16_t *CPC16_24 = &C16_24;
+// CHECK-NEXT: (lldb) target variable CPC16_24
+// CHECK-NEXT: (const char16_t *) CPC16_24 = {{.*}}
+const char32_t *CPC32_42 = &C32_42;
+// CHECK-NEXT: (lldb) target variable CPC32_42
+// CHECK-NEXT: (const char32_t *) CPC32_42 = {{.*}}
+const wchar_t *CPWC1 = &WC1;
+// CHECK-NEXT: (lldb) target variable CPWC1
+// CHECK-NEXT: (const wchar_t *) CPWC1 = {{.*}}
+const wchar_t *CPWCP = &WCP;
+// CHECK-NEXT: (lldb) target variable CPWCP
+// CHECK-NEXT: (const wchar_t *) CPWCP = {{.*}}
+const short *CPSMax = &SMax;
+// CHECK-NEXT: (lldb) target variable CPSMax
+// CHECK-NEXT: (const short *) CPSMax = {{.*}}
+const short *CPSMin = &SMin;
+// CHECK-NEXT: (lldb) target variable CPSMin
+// CHECK-NEXT: (const short *) CPSMin = {{.*}}
+const unsigned short *CPUSMax = &USMax;
+// CHECK-NEXT: (lldb) target variable CPUSMax
+// CHECK-NEXT: (const unsigned short *) CPUSMax = {{.*}}
+const unsigned short *CPUSMin = &USMin;
+// CHECK-NEXT: (lldb) target variable CPUSMin
+// CHECK-NEXT: (const unsigned short *) CPUSMin = {{.*}}
+const int *CPIMax = &IMax;
+// CHECK-NEXT: (lldb) target variable CPIMax
+// CHECK-NEXT: (const int *) CPIMax = {{.*}}
+const int *CPIMin = &IMin;
+// CHECK-NEXT: (lldb) target variable CPIMin
+// CHECK-NEXT: (const int *) CPIMin = {{.*}}
+const unsigned int *CPUIMax = &UIMax;
+// CHECK-NEXT: (lldb) target variable CPUIMax
+// CHECK-NEXT: (const unsigned int *) CPUIMax = {{.*}}
+const unsigned int *CPUIMin = &UIMin;
+// CHECK-NEXT: (lldb) target variable CPUIMin
+// CHECK-NEXT: (const unsigned int *) CPUIMin = {{.*}}
+const long *CPLMax = &LMax;
+// CHECK-NEXT: (lldb) target variable CPLMax
+// CHECK-NEXT: (const long *) CPLMax = {{.*}}
+const long *CPLMin = &LMin;
+// CHECK-NEXT: (lldb) target variable CPLMin
+// CHECK-NEXT: (const long *) CPLMin = {{.*}}
+const unsigned long *CPULMax = &ULMax;
+// CHECK-NEXT: (lldb) target variable CPULMax
+// CHECK-NEXT: (const unsigned long *) CPULMax = {{.*}}
+const unsigned long *CPULMin = &ULMin;
+// CHECK-NEXT: (lldb) target variable CPULMin
+// CHECK-NEXT: (const unsigned long *) CPULMin = {{.*}}
+const long long *CPLLMax = &LLMax;
+// CHECK-NEXT: (lldb) target variable CPLLMax
+// CHECK-NEXT: (const long long *) CPLLMax = {{.*}}
+const long long *CPLLMin = &LLMin;
+// CHECK-NEXT: (lldb) target variable CPLLMin
+// CHECK-NEXT: (const long long *) CPLLMin = {{.*}}
+const unsigned long long *CPULLMax = &ULLMax;
+// CHECK-NEXT: (lldb) target variable CPULLMax
+// CHECK-NEXT: (const unsigned long long *) CPULLMax = {{.*}}
+const unsigned long long *CPULLMin = &ULLMin;
+// CHECK-NEXT: (lldb) target variable CPULLMin
+// CHECK-NEXT: (const unsigned long long *) CPULLMin = {{.*}}
+const float *CPF = &F;
+// CHECK-NEXT: (lldb) target variable CPF
+// CHECK-NEXT: (const float *) CPF = {{.*}}
+const double *CPD = &D;
+// CHECK-NEXT: (lldb) target variable CPD
+// CHECK-NEXT: (const double *) CPD = {{.*}}
+
+
+// References to fundamental data types
+
+bool &RBFalse = BFalse;
+// CHECK-NEXT: (lldb) target variable RBFalse
+// CHECK-NEXT: (bool &) RBFalse = {{.*}} (&::RBFalse = false)
+bool &RBTrue = BTrue;
+// CHECK-NEXT: (lldb) target variable RBTrue
+// CHECK-NEXT: (bool &) RBTrue = {{.*}} (&::RBTrue = true)
+char &RCA = CA;
+// CHECK-NEXT: (lldb) target variable RCA
+// CHECK-NEXT: (char &) RCA = {{.*}} (&::RCA = 'A')
+char &RCZ = CZ;
+// CHECK-NEXT: (lldb) target variable RCZ
+// CHECK-NEXT: (char &) RCZ = {{.*}} (&::RCZ = 'Z')
+signed char &RSCa = SCa;
+// CHECK-NEXT: (lldb) target variable RSCa
+// CHECK-NEXT: (signed char &) RSCa = {{.*}} (&::RSCa = 'a')
+signed char &RSCz = SCz;
+// CHECK-NEXT: (lldb) target variable RSCz
+// CHECK-NEXT: (signed char &) RSCz = {{.*}} (&::RSCz = 'z')
+unsigned char &RUC24 = UC24;
+// CHECK-NEXT: (lldb) target variable RUC24
+// CHECK-NEXT: (unsigned char &) RUC24 = {{.*}} (&::RUC24 = '\x18')
+unsigned char &RUC42 = UC42;
+// CHECK-NEXT: (lldb) target variable RUC42
+// CHECK-NEXT: (unsigned char &) RUC42 = {{.*}} (&::RUC42 = '*')
+short &RSMax = SMax;
+// CHECK-NEXT: (lldb) target variable RSMax
+// CHECK-NEXT: (short &) RSMax = {{.*}} (&::RSMax = 32767)
+short &RSMin = SMin;
+// CHECK-NEXT: (lldb) target variable RSMin
+// CHECK-NEXT: (short &) RSMin = {{.*}} (&::RSMin = -32768)
+unsigned short &RUSMax = USMax;
+// CHECK-NEXT: (lldb) target variable RUSMax
+// CHECK-NEXT: (unsigned short &) RUSMax = {{.*}} (&::RUSMax = 65535)
+unsigned short &RUSMin = USMin;
+// CHECK-NEXT: (lldb) target variable RUSMin
+// CHECK-NEXT: (unsigned short &) RUSMin = {{.*}} (&::RUSMin = 0)
+int &RIMax = IMax;
+// CHECK-NEXT: (lldb) target variable RIMax
+// CHECK-NEXT: (int &) RIMax = {{.*}} (&::RIMax = 2147483647)
+int &RIMin = IMin;
+// CHECK-NEXT: (lldb) target variable RIMin
+// CHECK-NEXT: (int &) RIMin = {{.*}} (&::RIMin = -2147483648)
+unsigned int &RUIMax = UIMax;
+// CHECK-NEXT: (lldb) target variable RUIMax
+// CHECK-NEXT: (unsigned int &) RUIMax = {{.*}} (&::RUIMax = 4294967295)
+unsigned int &RUIMin = UIMin;
+// CHECK-NEXT: (lldb) target variable RUIMin
+// CHECK-NEXT: (unsigned int &) RUIMin = {{.*}} (&::RUIMin = 0)
+long &RLMax = LMax;
+// CHECK-NEXT: (lldb) target variable RLMax
+// CHECK-NEXT: (long &) RLMax = {{.*}} (&::RLMax = 2147483647)
+long &RLMin = LMin;
+// CHECK-NEXT: (lldb) target variable RLMin
+// CHECK-NEXT: (long &) RLMin = {{.*}} (&::RLMin = -2147483648)
+unsigned long &RULMax = ULMax;
+// CHECK-NEXT: (lldb) target variable RULMax
+// CHECK-NEXT: (unsigned long &) RULMax = {{.*}} (&::RULMax = 4294967295)
+unsigned long &RULMin = ULMin;
+// CHECK-NEXT: (lldb) target variable RULMin
+// CHECK-NEXT: (unsigned long &) RULMin = {{.*}} (&::RULMin = 0)
+long long &RLLMax = LLMax;
+// CHECK-NEXT: (lldb) target variable RLLMax
+// CHECK-NEXT: (long long &) RLLMax = {{.*}} (&::RLLMax = 9223372036854775807)
+long long &RLLMin = LLMin;
+// CHECK-NEXT: (lldb) target variable RLLMin
+// CHECK-NEXT: (long long &) RLLMin = {{.*}} (&::RLLMin = -9223372036854775808)
+unsigned long long &RULLMax = ULLMax;
+// CHECK-NEXT: (lldb) target variable RULLMax
+// CHECK-NEXT: (unsigned long long &) RULLMax = {{.*}} (&::RULLMax = 18446744073709551615)
+unsigned long long &RULLMin = ULLMin;
+// CHECK-NEXT: (lldb) target variable RULLMin
+// CHECK-NEXT: (unsigned long long &) RULLMin = {{.*}} (&::RULLMin = 0)
+float &RF = F;
+// CHECK-NEXT: (lldb) target variable RF
+// CHECK-NEXT: (float &) RF = {{.*}} (&::RF = 3.1415)
+double &RD = D;
+// CHECK-NEXT: (lldb) target variable RD
+// CHECK-NEXT: (double &) RD = {{.*}} (&::RD = 3.1415000000000002)
+
+// const references to fundamental data types
+const bool &CRBFalse = BFalse;
+// CHECK-NEXT: (lldb) target variable CRBFalse
+// CHECK-NEXT: (const bool &) CRBFalse = {{.*}} (&::CRBFalse = false)
+const bool &CRBTrue = BTrue;
+// CHECK-NEXT: (lldb) target variable CRBTrue
+// CHECK-NEXT: (const bool &) CRBTrue = {{.*}} (&::CRBTrue = true)
+const char &CRCA = CA;
+// CHECK-NEXT: (lldb) target variable CRCA
+// CHECK-NEXT: (const char &) CRCA = {{.*}} (&::CRCA = 'A')
+const char &CRCZ = CZ;
+// CHECK-NEXT: (lldb) target variable CRCZ
+// CHECK-NEXT: (const char &) CRCZ = {{.*}} (&::CRCZ = 'Z')
+const signed char &CRSCa = SCa;
+// CHECK-NEXT: (lldb) target variable CRSCa
+// CHECK-NEXT: (const signed char &) CRSCa = {{.*}} (&::CRSCa = 'a')
+const signed char &CRSCz = SCz;
+// CHECK-NEXT: (lldb) target variable CRSCz
+// CHECK-NEXT: (const signed char &) CRSCz = {{.*}} (&::CRSCz = 'z')
+const unsigned char &CRUC24 = UC24;
+// CHECK-NEXT: (lldb) target variable CRUC24
+// CHECK-NEXT: (const unsigned char &) CRUC24 = {{.*}} (&::CRUC24 = '\x18')
+const unsigned char &CRUC42 = UC42;
+// CHECK-NEXT: (lldb) target variable CRUC42
+// CHECK-NEXT: (const unsigned char &) CRUC42 = {{.*}} (&::CRUC42 = '*')
+const short &CRSMax = SMax;
+// CHECK-NEXT: (lldb) target variable CRSMax
+// CHECK-NEXT: (const short &) CRSMax = {{.*}} (&::CRSMax = 32767)
+const short &CRSMin = SMin;
+// CHECK-NEXT: (lldb) target variable CRSMin
+// CHECK-NEXT: (const short &) CRSMin = {{.*}} (&::CRSMin = -32768)
+const unsigned short &CRUSMax = USMax;
+// CHECK-NEXT: (lldb) target variable CRUSMax
+// CHECK-NEXT: (const unsigned short &) CRUSMax = {{.*}} (&::CRUSMax = 65535)
+const unsigned short &CRUSMin = USMin;
+// CHECK-NEXT: (lldb) target variable CRUSMin
+// CHECK-NEXT: (const unsigned short &) CRUSMin = {{.*}} (&::CRUSMin = 0)
+const int &CRIMax = IMax;
+// CHECK-NEXT: (lldb) target variable CRIMax
+// CHECK-NEXT: (const int &) CRIMax = {{.*}} (&::CRIMax = 2147483647)
+const int &CRIMin = IMin;
+// CHECK-NEXT: (lldb) target variable CRIMin
+// CHECK-NEXT: (const int &) CRIMin = {{.*}} (&::CRIMin = -2147483648)
+const unsigned int &CRUIMax = UIMax;
+// CHECK-NEXT: (lldb) target variable CRUIMax
+// CHECK-NEXT: (const unsigned int &) CRUIMax = {{.*}} (&::CRUIMax = 4294967295)
+const unsigned int &CRUIMin = UIMin;
+// CHECK-NEXT: (lldb) target variable CRUIMin
+// CHECK-NEXT: (const unsigned int &) CRUIMin = {{.*}} (&::CRUIMin = 0)
+const long &CRLMax = LMax;
+// CHECK-NEXT: (lldb) target variable CRLMax
+// CHECK-NEXT: (const long &) CRLMax = {{.*}} (&::CRLMax = 2147483647)
+const long &CRLMin = LMin;
+// CHECK-NEXT: (lldb) target variable CRLMin
+// CHECK-NEXT: (const long &) CRLMin = {{.*}} (&::CRLMin = -2147483648)
+const unsigned long &CRULMax = ULMax;
+// CHECK-NEXT: (lldb) target variable CRULMax
+// CHECK-NEXT: (const unsigned long &) CRULMax = {{.*}} (&::CRULMax = 4294967295)
+const unsigned long &CRULMin = ULMin;
+// CHECK-NEXT: (lldb) target variable CRULMin
+// CHECK-NEXT: (const unsigned long &) CRULMin = {{.*}} (&::CRULMin = 0)
+const long long &CRLLMax = LLMax;
+// CHECK-NEXT: (lldb) target variable CRLLMax
+// CHECK-NEXT: (const long long &) CRLLMax = {{.*}} (&::CRLLMax = 9223372036854775807)
+const long long &CRLLMin = LLMin;
+// CHECK-NEXT: (lldb) target variable CRLLMin
+// CHECK-NEXT: (const long long &) CRLLMin = {{.*}} (&::CRLLMin = -9223372036854775808)
+const unsigned long long &CRULLMax = ULLMax;
+// CHECK-NEXT: (lldb) target variable CRULLMax
+// CHECK-NEXT: (const unsigned long long &) CRULLMax = {{.*}} (&::CRULLMax = 18446744073709551615)
+const unsigned long long &CRULLMin = ULLMin;
+// CHECK-NEXT: (lldb) target variable CRULLMin
+// CHECK-NEXT: (const unsigned long long &) CRULLMin = {{.*}} (&::CRULLMin = 0)
+const float &CRF = F;
+// CHECK-NEXT: (lldb) target variable CRF
+// CHECK-NEXT: (const float &) CRF = {{.*}} (&::CRF = 3.1415)
+const double &CRD = D;
+// CHECK-NEXT: (lldb) target variable CRD
+// CHECK-NEXT: (const double &) CRD = {{.*}} (&::CRD = 3.1415000000000002)
+
+char16_t &RC16_24 = C16_24;
+// CHECK: (lldb) target variable RC16_24
+// FIXME: (char16_t &) RC16_24 = {{.*}} (&::RC16_24 = U+0014)
+char32_t &RC32_42 = C32_42;
+// CHECK: (lldb) target variable RC32_42
+// FIXME: (char32_t &) RC32_42 = {{.*}} (&::RC32_42 = U+0x00000022)
+wchar_t &RWC1 = WC1;
+// CHECK: (lldb) target variable RWC1
+// FIXME: (wchar_t &) RWC1 = {{.*}} (&::RWC1 = L'1')
+wchar_t &RWCP = WCP;
+// CHECK: (lldb) target variable RWCP
+// FIXME: (wchar_t &) RWCP = {{.*}} (&::RWCP = L'P')
+const char16_t &CRC16_24 = C16_24;
+// CHECK: (lldb) target variable CRC16_24
+// FIXME: (const char16_t &) CRC16_24 = {{.*}} (&::CRC16_24 = U+0014)
+const char32_t &CRC32_42 = C32_42;
+// CHECK: (lldb) target variable CRC32_42
+// FIXME: (const char32_t &) CRC32_42 = {{.*}} (&::CRC32_42 = U+0x00000022)
+const wchar_t &CRWC1 = WC1;
+// CHECK: (lldb) target variable CRWC1
+// FIXME: (const wchar_t &) CRWC1 = {{.*}} (&::CRWC1 = L'1')
+const wchar_t &CRWCP = WCP;
+// CHECK: (lldb) target variable CRWCP
+// FIXME: (const wchar_t &) CRWCP = {{.*}} (&::CRWCP = L'P')
+
+
+// CHECK: TranslationUnitDecl {{.*}}
+// CHECK-NEXT: |-VarDecl {{.*}} BFalse 'bool'
+// CHECK-NEXT: |-VarDecl {{.*}} BTrue 'bool'
+// CHECK-NEXT: |-VarDecl {{.*}} CA 'char'
+// CHECK-NEXT: |-VarDecl {{.*}} CZ 'char'
+// CHECK-NEXT: |-VarDecl {{.*}} SCa 'signed char'
+// CHECK-NEXT: |-VarDecl {{.*}} SCz 'signed char'
+// CHECK-NEXT: |-VarDecl {{.*}} UC24 'unsigned char'
+// CHECK-NEXT: |-VarDecl {{.*}} UC42 'unsigned char'
+// CHECK-NEXT: |-VarDecl {{.*}} C16_24 'char16_t'
+// CHECK-NEXT: |-VarDecl {{.*}} C32_42 'char32_t'
+// CHECK-NEXT: |-VarDecl {{.*}} WC1 'wchar_t'
+// CHECK-NEXT: |-VarDecl {{.*}} WCP 'wchar_t'
+// CHECK-NEXT: |-VarDecl {{.*}} SMax 'short'
+// CHECK-NEXT: |-VarDecl {{.*}} SMin 'short'
+// CHECK-NEXT: |-VarDecl {{.*}} USMax 'unsigned short'
+// CHECK-NEXT: |-VarDecl {{.*}} USMin 'unsigned short'
+// CHECK-NEXT: |-VarDecl {{.*}} IMax 'int'
+// CHECK-NEXT: |-VarDecl {{.*}} IMin 'int'
+// CHECK-NEXT: |-VarDecl {{.*}} UIMax 'unsigned int'
+// CHECK-NEXT: |-VarDecl {{.*}} UIMin 'unsigned int'
+// CHECK-NEXT: |-VarDecl {{.*}} LMax 'long'
+// CHECK-NEXT: |-VarDecl {{.*}} LMin 'long'
+// CHECK-NEXT: |-VarDecl {{.*}} ULMax 'unsigned long'
+// CHECK-NEXT: |-VarDecl {{.*}} ULMin 'unsigned long'
+// CHECK-NEXT: |-VarDecl {{.*}} LLMax 'long long'
+// CHECK-NEXT: |-VarDecl {{.*}} LLMin 'long long'
+// CHECK-NEXT: |-VarDecl {{.*}} ULLMax 'unsigned long long'
+// CHECK-NEXT: |-VarDecl {{.*}} ULLMin 'unsigned long long'
+// CHECK-NEXT: |-VarDecl {{.*}} F 'float'
+// CHECK-NEXT: |-VarDecl {{.*}} D 'double'
+// CHECK-NEXT: |-VarDecl {{.*}} CBFalse 'const bool'
+// CHECK-NEXT: |-VarDecl {{.*}} CBTrue 'const bool'
+// CHECK-NEXT: |-VarDecl {{.*}} CCA 'const char'
+// CHECK-NEXT: |-VarDecl {{.*}} CCZ 'const char'
+// CHECK-NEXT: |-VarDecl {{.*}} CSCa 'const signed char'
+// CHECK-NEXT: |-VarDecl {{.*}} CSCz 'const signed char'
+// CHECK-NEXT: |-VarDecl {{.*}} CUC24 'const unsigned char'
+// CHECK-NEXT: |-VarDecl {{.*}} CUC42 'const unsigned char'
+// CHECK-NEXT: |-VarDecl {{.*}} CC16_24 'const char16_t'
+// CHECK-NEXT: |-VarDecl {{.*}} CC32_42 'const char32_t'
+// CHECK-NEXT: |-VarDecl {{.*}} CWC1 'const wchar_t'
+// CHECK-NEXT: |-VarDecl {{.*}} CWCP 'const wchar_t'
+// CHECK-NEXT: |-VarDecl {{.*}} CSMax 'const short'
+// CHECK-NEXT: |-VarDecl {{.*}} CSMin 'const short'
+// CHECK-NEXT: |-VarDecl {{.*}} CUSMax 'const unsigned short'
+// CHECK-NEXT: |-VarDecl {{.*}} CUSMin 'const unsigned short'
+// CHECK-NEXT: |-VarDecl {{.*}} CIMax 'const int'
+// CHECK-NEXT: |-VarDecl {{.*}} CIMin 'const int'
+// CHECK-NEXT: |-VarDecl {{.*}} CUIMax 'const unsigned int'
+// CHECK-NEXT: |-VarDecl {{.*}} CUIMin 'const unsigned int'
+// CHECK-NEXT: |-VarDecl {{.*}} CLMax 'const long'
+// CHECK-NEXT: |-VarDecl {{.*}} CLMin 'const long'
+// CHECK-NEXT: |-VarDecl {{.*}} CULMax 'const unsigned long'
+// CHECK-NEXT: |-VarDecl {{.*}} CULMin 'const unsigned long'
+// CHECK-NEXT: |-VarDecl {{.*}} CLLMax 'const long long'
+// CHECK-NEXT: |-VarDecl {{.*}} CLLMin 'const long long'
+// CHECK-NEXT: |-VarDecl {{.*}} CULLMax 'const unsigned long long'
+// CHECK-NEXT: |-VarDecl {{.*}} CULLMin 'const unsigned long long'
+// CHECK-NEXT: |-VarDecl {{.*}} CF 'const float'
+// CHECK-NEXT: |-VarDecl {{.*}} CD 'const double'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprBFalse 'const bool'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprBTrue 'const bool'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprCA 'const char'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprCZ 'const char'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprSCa 'const signed char'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprSCz 'const signed char'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprUC24 'const unsigned char'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprUC42 'const unsigned char'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprC16_24 'const char16_t'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprC32_42 'const char32_t'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprWC1 'const wchar_t'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprWCP 'const wchar_t'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprSMax 'const short'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprSMin 'const short'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprUSMax 'const unsigned short'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprUSMin 'const unsigned short'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprIMax 'const int'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprIMin 'const int'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprUIMax 'const unsigned int'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprUIMin 'const unsigned int'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprLMax 'const long'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprLMin 'const long'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprULMax 'const unsigned long'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprULMin 'const unsigned long'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprLLMax 'const long long'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprLLMin 'const long long'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprULLMax 'const unsigned long long'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprULLMin 'const unsigned long long'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprF 'const float'
+// CHECK-NEXT: |-VarDecl {{.*}} ConstexprD 'const double'
+// CHECK-NEXT: |-VarDecl {{.*}} PBFalse 'bool *'
+// CHECK-NEXT: |-VarDecl {{.*}} PBTrue 'bool *'
+// CHECK-NEXT: |-VarDecl {{.*}} PCA 'char *'
+// CHECK-NEXT: |-VarDecl {{.*}} PCZ 'char *'
+// CHECK-NEXT: |-VarDecl {{.*}} PSCa 'signed char *'
+// CHECK-NEXT: |-VarDecl {{.*}} PSCz 'signed char *'
+// CHECK-NEXT: |-VarDecl {{.*}} PUC24 'unsigned char *'
+// CHECK-NEXT: |-VarDecl {{.*}} PUC42 'unsigned char *'
+// CHECK-NEXT: |-VarDecl {{.*}} PC16_24 'char16_t *'
+// CHECK-NEXT: |-VarDecl {{.*}} PC32_42 'char32_t *'
+// CHECK-NEXT: |-VarDecl {{.*}} PWC1 'wchar_t *'
+// CHECK-NEXT: |-VarDecl {{.*}} PWCP 'wchar_t *'
+// CHECK-NEXT: |-VarDecl {{.*}} PSMax 'short *'
+// CHECK-NEXT: |-VarDecl {{.*}} PSMin 'short *'
+// CHECK-NEXT: |-VarDecl {{.*}} PUSMax 'unsigned short *'
+// CHECK-NEXT: |-VarDecl {{.*}} PUSMin 'unsigned short *'
+// CHECK-NEXT: |-VarDecl {{.*}} PIMax 'int *'
+// CHECK-NEXT: |-VarDecl {{.*}} PIMin 'int *'
+// CHECK-NEXT: |-VarDecl {{.*}} PUIMax 'unsigned int *'
+// CHECK-NEXT: |-VarDecl {{.*}} PUIMin 'unsigned int *'
+// CHECK-NEXT: |-VarDecl {{.*}} PLMax 'long *'
+// CHECK-NEXT: |-VarDecl {{.*}} PLMin 'long *'
+// CHECK-NEXT: |-VarDecl {{.*}} PULMax 'unsigned long *'
+// CHECK-NEXT: |-VarDecl {{.*}} PULMin 'unsigned long *'
+// CHECK-NEXT: |-VarDecl {{.*}} PLLMax 'long long *'
+// CHECK-NEXT: |-VarDecl {{.*}} PLLMin 'long long *'
+// CHECK-NEXT: |-VarDecl {{.*}} PULLMax 'unsigned long long *'
+// CHECK-NEXT: |-VarDecl {{.*}} PULLMin 'unsigned long long *'
+// CHECK-NEXT: |-VarDecl {{.*}} PF 'float *'
+// CHECK-NEXT: |-VarDecl {{.*}} PD 'double *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPBFalse 'const bool *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPBTrue 'const bool *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPCA 'const char *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPCZ 'const char *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPSCa 'const signed char *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPSCz 'const signed char *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPUC24 'const unsigned char *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPUC42 'const unsigned char *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPC16_24 'const char16_t *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPC32_42 'const char32_t *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPWC1 'const wchar_t *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPWCP 'const wchar_t *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPSMax 'const short *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPSMin 'const short *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPUSMax 'const unsigned short *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPUSMin 'const unsigned short *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPIMax 'const int *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPIMin 'const int *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPUIMax 'const unsigned int *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPUIMin 'const unsigned int *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPLMax 'const long *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPLMin 'const long *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPULMax 'const unsigned long *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPULMin 'const unsigned long *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPLLMax 'const long long *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPLLMin 'const long long *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPULLMax 'const unsigned long long *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPULLMin 'const unsigned long long *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPF 'const float *'
+// CHECK-NEXT: |-VarDecl {{.*}} CPD 'const double *'
+// CHECK-NEXT: |-VarDecl {{.*}} RBFalse 'bool &'
+// CHECK-NEXT: |-VarDecl {{.*}} RBTrue 'bool &'
+// CHECK-NEXT: |-VarDecl {{.*}} RCA 'char &'
+// CHECK-NEXT: |-VarDecl {{.*}} RCZ 'char &'
+// CHECK-NEXT: |-VarDecl {{.*}} RSCa 'signed char &'
+// CHECK-NEXT: |-VarDecl {{.*}} RSCz 'signed char &'
+// CHECK-NEXT: |-VarDecl {{.*}} RUC24 'unsigned char &'
+// CHECK-NEXT: |-VarDecl {{.*}} RUC42 'unsigned char &'
+// CHECK-NEXT: |-VarDecl {{.*}} RSMax 'short &'
+// CHECK-NEXT: |-VarDecl {{.*}} RSMin 'short &'
+// CHECK-NEXT: |-VarDecl {{.*}} RUSMax 'unsigned short &'
+// CHECK-NEXT: |-VarDecl {{.*}} RUSMin 'unsigned short &'
+// CHECK-NEXT: |-VarDecl {{.*}} RIMax 'int &'
+// CHECK-NEXT: |-VarDecl {{.*}} RIMin 'int &'
+// CHECK-NEXT: |-VarDecl {{.*}} RUIMax 'unsigned int &'
+// CHECK-NEXT: |-VarDecl {{.*}} RUIMin 'unsigned int &'
+// CHECK-NEXT: |-VarDecl {{.*}} RLMax 'long &'
+// CHECK-NEXT: |-VarDecl {{.*}} RLMin 'long &'
+// CHECK-NEXT: |-VarDecl {{.*}} RULMax 'unsigned long &'
+// CHECK-NEXT: |-VarDecl {{.*}} RULMin 'unsigned long &'
+// CHECK-NEXT: |-VarDecl {{.*}} RLLMax 'long long &'
+// CHECK-NEXT: |-VarDecl {{.*}} RLLMin 'long long &'
+// CHECK-NEXT: |-VarDecl {{.*}} RULLMax 'unsigned long long &'
+// CHECK-NEXT: |-VarDecl {{.*}} RULLMin 'unsigned long long &'
+// CHECK-NEXT: |-VarDecl {{.*}} RF 'float &'
+// CHECK-NEXT: |-VarDecl {{.*}} RD 'double &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRBFalse 'const bool &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRBTrue 'const bool &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRCA 'const char &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRCZ 'const char &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRSCa 'const signed char &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRSCz 'const signed char &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRUC24 'const unsigned char &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRUC42 'const unsigned char &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRSMax 'const short &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRSMin 'const short &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRUSMax 'const unsigned short &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRUSMin 'const unsigned short &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRIMax 'const int &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRIMin 'const int &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRUIMax 'const unsigned int &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRUIMin 'const unsigned int &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRLMax 'const long &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRLMin 'const long &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRULMax 'const unsigned long &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRULMin 'const unsigned long &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRLLMax 'const long long &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRLLMin 'const long long &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRULLMax 'const unsigned long long &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRULLMin 'const unsigned long long &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRF 'const float &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRD 'const double &'
+// CHECK-NEXT: |-VarDecl {{.*}} RC16_24 'char16_t &'
+// CHECK-NEXT: |-VarDecl {{.*}} RC32_42 'char32_t &'
+// CHECK-NEXT: |-VarDecl {{.*}} RWC1 'wchar_t &'
+// CHECK-NEXT: |-VarDecl {{.*}} RWCP 'wchar_t &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRC16_24 'const char16_t &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRC32_42 'const char32_t &'
+// CHECK-NEXT: |-VarDecl {{.*}} CRWC1 'const wchar_t &'
+// CHECK-NEXT: `-VarDecl {{.*}} CRWCP 'const wchar_t &'
+
+// CHECK: (lldb) quit
+
+int main(int argc, char **argv) {
+ return CIMax;
+}
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp b/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp
new file mode 100644
index 00000000000..a7e786dc4e5
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp
@@ -0,0 +1,161 @@
+// clang-format off
+
+// REQUIRES: system-windows
+// RUN: %build -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/local-variables.lldbinit 2>&1 | FileCheck %s
+
+int Function(int Param1, char Param2) {
+ unsigned Local1 = Param1 + 1;
+ char Local2 = Param2 + 1;
+ ++Local1;
+ ++Local2;
+ return Local1;
+}
+
+int main(int argc, char **argv) {
+ int SomeLocal = argc * 2;
+ return Function(SomeLocal, 'a');
+}
+
+// CHECK: (lldb) target create "{{.*}}local-variables.cpp.tmp.exe"
+// CHECK-NEXT: Current executable set to '{{.*}}local-variables.cpp.tmp.exe'
+// CHECK-NEXT: (lldb) command source -s 0 '{{.*}}local-variables.lldbinit'
+// CHECK-NEXT: Executing commands in '{{.*}}local-variables.lldbinit'.
+// CHECK-NEXT: (lldb) break set -n main
+// CHECK-NEXT: Breakpoint 1: where = local-variables.cpp.tmp.exe`main + {{.*}} at local-variables.cpp:{{.*}}, address = {{.*}}
+// CHECK-NEXT: (lldb) run a b c d e f g
+// CHECK-NEXT: Process {{.*}} stopped
+// CHECK-NEXT: * thread #1, stop reason = breakpoint 1.1
+// CHECK-NEXT: frame #0: {{.*}} local-variables.cpp.tmp.exe`main(argc=8, argv={{.*}}) at local-variables.cpp:{{.*}}
+// CHECK-NEXT: 14 }
+// CHECK-NEXT: 15
+// CHECK-NEXT: 16 int main(int argc, char **argv) {
+// CHECK-NEXT: -> 17 int SomeLocal = argc * 2;
+// CHECK-NEXT: 18 return Function(SomeLocal, 'a');
+// CHECK-NEXT: 19 }
+// CHECK-NEXT: 20
+
+// CHECK: Process {{.*}} launched: '{{.*}}local-variables.cpp.tmp.exe'
+// CHECK-NEXT: (lldb) p argc
+// CHECK-NEXT: (int) $0 = 8
+// CHECK-NEXT: (lldb) step
+// CHECK-NEXT: Process {{.*}} stopped
+// CHECK-NEXT: * thread #1, stop reason = step in
+// CHECK-NEXT: frame #0: {{.*}} local-variables.cpp.tmp.exe`main(argc=8, argv={{.*}}) at local-variables.cpp:{{.*}}
+// CHECK-NEXT: 15
+// CHECK-NEXT: 16 int main(int argc, char **argv) {
+// CHECK-NEXT: 17 int SomeLocal = argc * 2;
+// CHECK-NEXT: -> 18 return Function(SomeLocal, 'a');
+// CHECK-NEXT: 19 }
+// CHECK-NEXT: 20
+
+// CHECK: (lldb) p SomeLocal
+// CHECK-NEXT: (int) $1 = 16
+// CHECK-NEXT: (lldb) step
+// CHECK-NEXT: Process {{.*}} stopped
+// CHECK-NEXT: * thread #1, stop reason = step in
+// CHECK-NEXT: frame #0: {{.*}} local-variables.cpp.tmp.exe`Function(Param1=16, Param2='a') at local-variables.cpp:{{.*}}
+// CHECK-NEXT: 6
+// CHECK-NEXT: 7
+// CHECK-NEXT: 8 int Function(int Param1, char Param2) {
+// CHECK-NEXT: -> 9 unsigned Local1 = Param1 + 1;
+// CHECK-NEXT: 10 char Local2 = Param2 + 1;
+// CHECK-NEXT: 11 ++Local1;
+// CHECK-NEXT: 12 ++Local2;
+
+// CHECK: (lldb) p Param1
+// CHECK-NEXT: (int) $2 = 16
+// CHECK-NEXT: (lldb) p Param2
+// CHECK-NEXT: (char) $3 = 'a'
+// CHECK-NEXT: (lldb) step
+// CHECK-NEXT: Process {{.*}} stopped
+// CHECK-NEXT: * thread #1, stop reason = step in
+// CHECK-NEXT: frame #0: {{.*}} local-variables.cpp.tmp.exe`Function(Param1=16, Param2='a') at local-variables.cpp:{{.*}}
+// CHECK-NEXT: 7
+// CHECK-NEXT: 8 int Function(int Param1, char Param2) {
+// CHECK-NEXT: 9 unsigned Local1 = Param1 + 1;
+// CHECK-NEXT: -> 10 char Local2 = Param2 + 1;
+// CHECK-NEXT: 11 ++Local1;
+// CHECK-NEXT: 12 ++Local2;
+// CHECK-NEXT: 13 return Local1;
+
+// CHECK: (lldb) p Param1
+// CHECK-NEXT: (int) $4 = 16
+// CHECK-NEXT: (lldb) p Param2
+// CHECK-NEXT: (char) $5 = 'a'
+// CHECK-NEXT: (lldb) p Local1
+// CHECK-NEXT: (unsigned int) $6 = 17
+// CHECK-NEXT: (lldb) step
+// CHECK-NEXT: Process {{.*}} stopped
+// CHECK-NEXT: * thread #1, stop reason = step in
+// CHECK-NEXT: frame #0: {{.*}} local-variables.cpp.tmp.exe`Function(Param1=16, Param2='a') at local-variables.cpp:{{.*}}
+// CHECK-NEXT: 8 int Function(int Param1, char Param2) {
+// CHECK-NEXT: 9 unsigned Local1 = Param1 + 1;
+// CHECK-NEXT: 10 char Local2 = Param2 + 1;
+// CHECK-NEXT: -> 11 ++Local1;
+// CHECK-NEXT: 12 ++Local2;
+// CHECK-NEXT: 13 return Local1;
+// CHECK-NEXT: 14 }
+
+// CHECK: (lldb) p Param1
+// CHECK-NEXT: (int) $7 = 16
+// CHECK-NEXT: (lldb) p Param2
+// CHECK-NEXT: (char) $8 = 'a'
+// CHECK-NEXT: (lldb) p Local1
+// CHECK-NEXT: (unsigned int) $9 = 17
+// CHECK-NEXT: (lldb) p Local2
+// CHECK-NEXT: (char) $10 = 'b'
+// CHECK-NEXT: (lldb) step
+// CHECK-NEXT: Process {{.*}} stopped
+// CHECK-NEXT: * thread #1, stop reason = step in
+// CHECK-NEXT: frame #0: {{.*}} local-variables.cpp.tmp.exe`Function(Param1=16, Param2='a') at local-variables.cpp:{{.*}}
+// CHECK-NEXT: 9 unsigned Local1 = Param1 + 1;
+// CHECK-NEXT: 10 char Local2 = Param2 + 1;
+// CHECK-NEXT: 11 ++Local1;
+// CHECK-NEXT: -> 12 ++Local2;
+// CHECK-NEXT: 13 return Local1;
+// CHECK-NEXT: 14 }
+// CHECK-NEXT: 15
+
+// CHECK: (lldb) p Param1
+// CHECK-NEXT: (int) $11 = 16
+// CHECK-NEXT: (lldb) p Param2
+// CHECK-NEXT: (char) $12 = 'a'
+// CHECK-NEXT: (lldb) p Local1
+// CHECK-NEXT: (unsigned int) $13 = 18
+// CHECK-NEXT: (lldb) p Local2
+// CHECK-NEXT: (char) $14 = 'b'
+// CHECK-NEXT: (lldb) step
+// CHECK-NEXT: Process {{.*}} stopped
+// CHECK-NEXT: * thread #1, stop reason = step in
+// CHECK-NEXT: frame #0: {{.*}} local-variables.cpp.tmp.exe`Function(Param1=16, Param2='a') at local-variables.cpp:{{.*}}
+// CHECK-NEXT: 10 char Local2 = Param2 + 1;
+// CHECK-NEXT: 11 ++Local1;
+// CHECK-NEXT: 12 ++Local2;
+// CHECK-NEXT: -> 13 return Local1;
+// CHECK-NEXT: 14 }
+// CHECK-NEXT: 15
+// CHECK-NEXT: 16 int main(int argc, char **argv) {
+
+// CHECK: (lldb) p Param1
+// CHECK-NEXT: (int) $15 = 16
+// CHECK-NEXT: (lldb) p Param2
+// CHECK-NEXT: (char) $16 = 'a'
+// CHECK-NEXT: (lldb) p Local1
+// CHECK-NEXT: (unsigned int) $17 = 18
+// CHECK-NEXT: (lldb) p Local2
+// CHECK-NEXT: (char) $18 = 'c'
+// CHECK-NEXT: (lldb) continue
+// CHECK-NEXT: Process {{.*}} resuming
+// CHECK-NEXT: Process {{.*}} exited with status = 18 (0x00000012)
+
+// CHECK: (lldb) target modules dump ast
+// CHECK-NEXT: Dumping clang ast for {{.*}} modules.
+// CHECK-NEXT: TranslationUnitDecl
+// CHECK-NEXT: |-FunctionDecl {{.*}} main 'int (int, char **)'
+// CHECK-NEXT: | |-ParmVarDecl {{.*}} argc 'int'
+// CHECK-NEXT: | `-ParmVarDecl {{.*}} argv 'char **'
+// CHECK-NEXT: `-FunctionDecl {{.*}} Function 'int (int, char)'
+// CHECK-NEXT: |-ParmVarDecl {{.*}} Param1 'int'
+// CHECK-NEXT: `-ParmVarDecl {{.*}} Param2 'char'
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/nested-types.cpp b/lldb/test/Shell/SymbolFile/NativePDB/nested-types.cpp
new file mode 100644
index 00000000000..e9bee690d30
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/nested-types.cpp
@@ -0,0 +1,153 @@
+// clang-format off
+// REQUIRES: lld
+
+// Test various interesting cases for AST reconstruction.
+// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/nested-types.lldbinit 2>&1 | FileCheck %s
+
+struct S {
+ struct NestedStruct {
+ int A = 0;
+ int B = 1;
+ };
+
+ enum class NestedEnum {
+ EnumValue1 = 0,
+ EnumValue2 = 1,
+ };
+ int C = 2;
+ int D = 3;
+ using VoidPtrT = void *;
+ VoidPtrT DD = nullptr;
+};
+struct T {
+ using NestedTypedef = int;
+ using NestedTypedef2 = S;
+
+ struct NestedStruct {
+ int E = 4;
+ int F = 5;
+ };
+
+ using NestedStructAlias = NestedStruct;
+ using NST = S::NestedStruct;
+
+ NestedTypedef NT = 4;
+
+ using U = struct {
+ int G = 6;
+ int H = 7;
+ };
+};
+
+template<typename Param>
+class U {
+public:
+ // See llvm.org/pr39607. clang-cl currently doesn't emit an important debug
+ // info record for nested template instantiations, so we can't reconstruct
+ // a proper DeclContext hierarchy for these. As such, U<X>::V<Y> will show up
+ // in the global namespace.
+ template<typename Param>
+ struct V {
+ Param I = 8;
+ Param J = 9;
+
+ using W = T::NestedTypedef;
+ using X = U<int>;
+ };
+
+ struct W {
+ Param M = 12;
+ Param N = 13;
+ };
+ Param K = 10;
+ Param L = 11;
+ using Y = V<int>;
+ using Z = V<T>;
+};
+
+constexpr S GlobalA;
+constexpr S::NestedStruct GlobalB;
+constexpr T GlobalC;
+constexpr T::NestedStruct GlobalD;
+constexpr T::U GlobalE;
+constexpr U<int> GlobalF;
+constexpr U<int>::V<int> GlobalG;
+constexpr U<int>::W GlobalH;
+constexpr S::NestedEnum GlobalEnum = S::NestedEnum::EnumValue1;
+
+
+int main(int argc, char **argv) {
+ return 0;
+}
+
+
+
+// CHECK: (lldb) target variable -T GlobalA
+// CHECK: (const S) GlobalA = {
+// CHECK: (int) C = 2
+// CHECK: (int) D = 3
+// CHECK: (void *) DD = 0x00000000
+// CHECK: }
+// CHECK: (lldb) target variable -T GlobalB
+// CHECK: (const S::NestedStruct) GlobalB = {
+// CHECK: (int) A = 0
+// CHECK: (int) B = 1
+// CHECK: }
+// CHECK: (lldb) target variable -T GlobalC
+// CHECK: (const T) GlobalC = {
+// CHECK: (int) NT = 4
+// CHECK: }
+// CHECK: (lldb) target variable -T GlobalD
+// CHECK: (const T::NestedStruct) GlobalD = {
+// CHECK: (int) E = 4
+// CHECK: (int) F = 5
+// CHECK: }
+// CHECK: (lldb) target variable -T GlobalE
+// CHECK: (const T::U) GlobalE = {
+// CHECK: (int) G = 6
+// CHECK: (int) H = 7
+// CHECK: }
+// CHECK: (lldb) target variable -T GlobalF
+// CHECK: (const U<int>) GlobalF = {
+// CHECK: (int) K = 10
+// CHECK: (int) L = 11
+// CHECK: }
+// CHECK: (lldb) target variable -T GlobalG
+// CHECK: (const U<int>::V<int>) GlobalG = {
+// CHECK: (int) I = 8
+// CHECK: (int) J = 9
+// CHECK: }
+// CHECK: (lldb) target variable -T GlobalEnum
+// CHECK: (const S::NestedEnum) GlobalEnum = EnumValue1
+// CHECK: (lldb) target modules dump ast
+// CHECK: Dumping clang ast for 1 modules.
+// CHECK: TranslationUnitDecl {{.*}}
+// CHECK: |-CXXRecordDecl {{.*}} struct S definition
+// CHECK: | |-FieldDecl {{.*}} C 'int'
+// CHECK: | |-FieldDecl {{.*}} D 'int'
+// CHECK: | |-FieldDecl {{.*}} DD 'void *'
+// CHECK: | |-CXXRecordDecl {{.*}} struct NestedStruct definition
+// CHECK: | | |-FieldDecl {{.*}} A 'int'
+// CHECK: | | `-FieldDecl {{.*}} B 'int'
+// CHECK: | `-EnumDecl {{.*}} NestedEnum
+// CHECK: | |-EnumConstantDecl {{.*}} EnumValue1 'S::NestedEnum'
+// CHECK: | `-EnumConstantDecl {{.*}} EnumValue2 'S::NestedEnum'
+// CHECK: |-CXXRecordDecl {{.*}} struct T definition
+// CHECK: | |-FieldDecl {{.*}} NT 'int'
+// CHECK: | |-CXXRecordDecl {{.*}} struct NestedStruct definition
+// CHECK: | | |-FieldDecl {{.*}} E 'int'
+// CHECK: | | `-FieldDecl {{.*}} F 'int'
+// CHECK: | `-CXXRecordDecl {{.*}} struct U definition
+// CHECK: | |-FieldDecl {{.*}} G 'int'
+// CHECK: | `-FieldDecl {{.*}} H 'int'
+// CHECK: |-CXXRecordDecl {{.*}} class U<int> definition
+// CHECK: | |-FieldDecl {{.*}} K 'int'
+// CHECK: | |-FieldDecl {{.*}} L 'int'
+// CHECK: | `-CXXRecordDecl {{.*}} struct W definition
+// CHECK: | |-FieldDecl {{.*}} M 'int'
+// CHECK: | `-FieldDecl {{.*}} N 'int'
+// CHECK: |-CXXRecordDecl {{.*}} struct U<int>::V<int> definition
+// CHECK: | |-FieldDecl {{.*}} I 'int'
+// CHECK: | `-FieldDecl {{.*}} J 'int'
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/s_constant.cpp b/lldb/test/Shell/SymbolFile/NativePDB/s_constant.cpp
new file mode 100644
index 00000000000..7603a4daba4
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/s_constant.cpp
@@ -0,0 +1,115 @@
+// clang-format off
+// REQUIRES: lld
+
+// Test that we can display S_CONSTANT records.
+
+// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-win32 %p/Inputs/s_constant.s > %t.obj
+// RUN: %build --compiler=clang-cl --nodefaultlib --mode=link -o %t.exe -- %t.obj
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/s_constant.lldbinit | FileCheck %s
+
+// clang-cl cannot generate S_CONSTANT records, but we need to test that we can
+// handle them for compatibility with MSVC, which does emit them. This test
+// case was generated by compiling this file with MSVC and copying the bytes
+// that they emit for S_CONSTANT records. Then we compile the same code with
+// clang to get a .s file, and replace all S_LDATA32 records with the bytes from
+// the S_CONSTANT records. This way we end up with a .s file that contains
+// symbol records that clang-cl won't generate.
+
+namespace A {
+namespace B {
+namespace C {
+ enum LargeUnsignedEnum : unsigned long long {
+ LUE_A = 0ULL,
+ LUE_B = 1000ULL,
+ LUE_C = 18446744073709551600ULL,
+ };
+
+ enum LargeSignedEnum : long long {
+ LSE_A = 0LL,
+ LSE_B = 9223372036854775000LL,
+ LSE_C = -9223372036854775000LL,
+ };
+
+ enum UnsignedEnum : unsigned int {
+ UE_A = 0,
+ UE_B = 1000,
+ UE_C = 4294000000,
+ };
+
+ enum SignedEnum : int {
+ SE_A = 0,
+ SE_B = 2147000000,
+ SE_C = -2147000000,
+ };
+
+ enum SmallUnsignedEnum : unsigned char {
+ SUE_A = 0,
+ SUE_B = 100,
+ SUE_C = 200,
+ };
+
+ enum SmallSignedEnum : char {
+ SSE_A = 0,
+ SSE_B = 100,
+ SSE_C = -100,
+ };
+}
+}
+}
+
+using namespace A::B::C;
+
+constexpr LargeUnsignedEnum GlobalLUEA = LUE_A;
+constexpr LargeUnsignedEnum GlobalLUEB = LUE_B;
+constexpr LargeUnsignedEnum GlobalLUEC = LUE_C;
+
+constexpr LargeSignedEnum GlobalLSEA = LSE_A;
+constexpr LargeSignedEnum GlobalLSEB = LSE_B;
+constexpr LargeSignedEnum GlobalLSEC = LSE_C;
+
+constexpr UnsignedEnum GlobalUEA = UE_A;
+constexpr UnsignedEnum GlobalUEB = UE_B;
+constexpr UnsignedEnum GlobalUEC = UE_C;
+
+constexpr SignedEnum GlobalSEA = SE_A;
+constexpr SignedEnum GlobalSEB = SE_B;
+constexpr SignedEnum GlobalSEC = SE_C;
+
+constexpr SmallUnsignedEnum GlobalSUEA = SUE_A;
+constexpr SmallUnsignedEnum GlobalSUEB = SUE_B;
+constexpr SmallUnsignedEnum GlobalSUEC = SUE_C;
+
+constexpr SmallSignedEnum GlobalSSEA = SSE_A;
+constexpr SmallSignedEnum GlobalSSEB = SSE_B;
+constexpr SmallSignedEnum GlobalSSEC = SSE_C;
+
+int main(int argc, char **argv) {
+ return 0;
+}
+
+// CHECK: (const A::B::C::LargeUnsignedEnum) GlobalLUEA = LUE_A
+// CHECK: (const A::B::C::LargeUnsignedEnum) GlobalLUEB = LUE_B
+
+// X-FAIL: Something is outputting bad debug info here, maybe cl.
+// CHECK: (const A::B::C::LargeUnsignedEnum) GlobalLUEC = {{.*}}
+
+// CHECK: (const A::B::C::LargeSignedEnum) GlobalLSEA = LSE_A
+// CHECK: (const A::B::C::LargeSignedEnum) GlobalLSEB = LSE_B
+// CHECK: (const A::B::C::LargeSignedEnum) GlobalLSEC = LSE_C
+
+// CHECK: (const A::B::C::UnsignedEnum) GlobalUEA = UE_A
+// CHECK: (const A::B::C::UnsignedEnum) GlobalUEB = UE_B
+// CHECK: (const A::B::C::UnsignedEnum) GlobalUEC = UE_C
+
+// CHECK: (const A::B::C::SignedEnum) GlobalSEA = SE_A
+// CHECK: (const A::B::C::SignedEnum) GlobalSEB = SE_B
+// CHECK: (const A::B::C::SignedEnum) GlobalSEC = SE_C
+
+// CHECK: (const A::B::C::SmallUnsignedEnum) GlobalSUEA = SUE_A
+// CHECK: (const A::B::C::SmallUnsignedEnum) GlobalSUEB = SUE_B
+// CHECK: (const A::B::C::SmallUnsignedEnum) GlobalSUEC = SUE_C
+
+// CHECK: (const A::B::C::SmallSignedEnum) GlobalSSEA = SSE_A
+// CHECK: (const A::B::C::SmallSignedEnum) GlobalSSEB = SSE_B
+// CHECK: (const A::B::C::SmallSignedEnum) GlobalSSEC = SSE_C
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/source-list.cpp b/lldb/test/Shell/SymbolFile/NativePDB/source-list.cpp
new file mode 100644
index 00000000000..6b749b082e3
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/source-list.cpp
@@ -0,0 +1,42 @@
+// clang-format off
+// REQUIRES: lld
+
+// Test that we can set display source of functions.
+// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/source-list.lldbinit | FileCheck %s
+
+
+
+// Some context lines before
+// the function.
+
+
+int main(int argc, char **argv) {
+ // Here are some comments.
+ // That we should print when listing source.
+ return 0;
+}
+
+// Some context lines after
+// the function.
+
+// check lines go at the end so that line numbers stay stable when
+// changing this file.
+
+// CHECK: (lldb) source list -n main
+// CHECK: File: {{.*}}source-list.cpp
+// CHECK: 10
+// CHECK: 11 // Some context lines before
+// CHECK: 12 // the function.
+// CHECK: 13
+// CHECK: 14
+// CHECK: 15 int main(int argc, char **argv) {
+// CHECK: 16 // Here are some comments.
+// CHECK: 17 // That we should print when listing source.
+// CHECK: 18 return 0;
+// CHECK: 19 }
+// CHECK: 20
+// CHECK: 21 // Some context lines after
+// CHECK: 22 // the function.
+// CHECK: 23
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/stack_unwinding01.cpp b/lldb/test/Shell/SymbolFile/NativePDB/stack_unwinding01.cpp
new file mode 100644
index 00000000000..701b843fa12
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/stack_unwinding01.cpp
@@ -0,0 +1,42 @@
+// clang-format off
+// REQUIRES: lld, system-windows
+
+// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/stack_unwinding01.lldbinit 2>&1 | FileCheck %s
+
+
+struct Struct {
+ void simple_method(int a, int b) {
+ a += 1;
+ simple_method(a, b);
+ }
+};
+
+
+
+int main(int argc, char **argv) {
+ Struct s;
+ s.simple_method(1,2);
+ return 0;
+}
+
+
+// CHECK: (lldb) thread backtrace
+// CHECK-NEXT: * thread #1, stop reason = breakpoint 1.1
+// CHECK-NEXT: * frame #0: {{.*}} stack_unwinding01.cpp.tmp.exe`Struct::simple_method at stack_unwinding01.cpp:12
+// CHECK-NEXT: frame #1: {{.*}} stack_unwinding01.cpp.tmp.exe`main(argc={{.*}}, argv={{.*}}) at stack_unwinding01.cpp:20
+
+
+// CHECK: (lldb) thread backtrace
+// CHECK-NEXT: * thread #1, stop reason = breakpoint 1.1
+// CHECK-NEXT: * frame #0: {{.*}} stack_unwinding01.cpp.tmp.exe`Struct::simple_method at stack_unwinding01.cpp:12
+// CHECK-NEXT: frame #1: {{.*}} stack_unwinding01.cpp.tmp.exe`Struct::simple_method at stack_unwinding01.cpp:12
+// CHECK-NEXT: frame #2: {{.*}} stack_unwinding01.cpp.tmp.exe`main(argc={{.*}}, argv={{.*}}) at stack_unwinding01.cpp:20
+
+// CHECK: (lldb) thread backtrace
+// CHECK-NEXT: * thread #1, stop reason = breakpoint 1.1
+// CHECK-NEXT: * frame #0: {{.*}} stack_unwinding01.cpp.tmp.exe`Struct::simple_method at stack_unwinding01.cpp:12
+// CHECK-NEXT: frame #1: {{.*}} stack_unwinding01.cpp.tmp.exe`Struct::simple_method at stack_unwinding01.cpp:12
+// CHECK-NEXT: frame #2: {{.*}} stack_unwinding01.cpp.tmp.exe`Struct::simple_method at stack_unwinding01.cpp:12
+// CHECK-NEXT: frame #3: {{.*}} stack_unwinding01.cpp.tmp.exe`main(argc={{.*}}, argv={{.*}}) at stack_unwinding01.cpp:20
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/tag-types.cpp b/lldb/test/Shell/SymbolFile/NativePDB/tag-types.cpp
new file mode 100644
index 00000000000..db981eafa6e
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/tag-types.cpp
@@ -0,0 +1,249 @@
+// clang-format off
+// REQUIRES: lld
+
+// Test that we can display tag types.
+// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN: %p/Inputs/tag-types.lldbinit | FileCheck %s
+
+// Test struct
+struct Struct {
+ // Test builtin types, which are represented by special CodeView type indices.
+ bool B;
+ char C;
+ signed char SC;
+ unsigned char UC;
+ char16_t C16;
+ char32_t C32;
+ wchar_t WC;
+ short S;
+ unsigned short US;
+ int I;
+ unsigned int UI;
+ long L;
+ unsigned long UL;
+ long long LL;
+ unsigned long long ULL;
+ float F;
+ double D;
+ long double LD;
+};
+
+// Test class
+class Class {
+public:
+ // Test pointers to builtin types, which are represented by different special
+ // CodeView type indices.
+ bool *PB;
+ char *PC;
+ signed char *PSC;
+ unsigned char *PUC;
+ char16_t *PC16;
+ char32_t *PC32;
+ wchar_t *PWC;
+ short *PS;
+ unsigned short *PUS;
+ int *PI;
+ unsigned int *PUI;
+ long *PL;
+ unsigned long *PUL;
+ long long *PLL;
+ unsigned long long *PULL;
+ float *PF;
+ double *PD;
+ long double *PLD;
+};
+
+// Test union
+union Union {
+ // Test modified types.
+ const bool *PB;
+ const char *PC;
+ const signed char *PSC;
+ const unsigned char *PUC;
+ const char16_t *PC16;
+ const char32_t *PC32;
+ const wchar_t *PWC;
+ const short *PS;
+ const unsigned short *PUS;
+ const int *PI;
+ const unsigned int *PUI;
+ const long *PL;
+ const unsigned long *PUL;
+ const long long *PLL;
+ const unsigned long long *PULL;
+ const float *PF;
+ const double *PD;
+ const long double *PLD;
+};
+
+struct OneMember {
+ int N = 0;
+};
+
+
+// Test single inheritance.
+class Derived : public Class {
+public:
+ explicit Derived()
+ : Reference(*this), RefMember(Member), RValueRefMember((OneMember&&)Member) {}
+
+ // Test reference to self, to make sure we don't end up in an
+ // infinite cycle.
+ Derived &Reference;
+
+ // Test aggregate class member.
+ OneMember Member;
+
+ // And modified aggregate class member.
+ const OneMember ConstMember;
+ volatile OneMember VolatileMember;
+ const volatile OneMember CVMember;
+
+ // And all types of pointers to class members
+ OneMember *PtrMember;
+ OneMember &RefMember;
+ OneMember &&RValueRefMember;
+};
+
+// Test multiple inheritance, as well as protected and private inheritance.
+class Derived2 : protected Class, private Struct {
+public:
+ // Test static data members
+ static unsigned StaticDataMember;
+};
+
+unsigned Derived2::StaticDataMember = 0;
+
+// Test virtual inheritance.
+class DerivedVirtual1 : public virtual Class {};
+
+// Test the correctness of the virtual bases order.
+class DerivedVirtual2 : public DerivedVirtual1, public virtual OneMember {};
+
+// Test scoped enums and unscoped enums.
+enum class EnumInt {
+ A = 1,
+ B = 2
+};
+
+// Test explicit underlying types
+enum EnumShort : short {
+ ES_A = 2,
+ ES_B = 3
+};
+
+int main(int argc, char **argv) {
+ Struct S;
+ Class C;
+ Union U;
+ Derived D;
+ Derived2 D2;
+ DerivedVirtual1 DV1;
+ DerivedVirtual2 DV2;
+ EnumInt EI;
+ EnumShort ES;
+
+ return 0;
+}
+
+// CHECK: (lldb) target create "{{.*}}tag-types.cpp.tmp.exe"
+// CHECK-NEXT: Current executable set to '{{.*}}tag-types.cpp.tmp.exe'
+// CHECK-NEXT: (lldb) command source -s 0 '{{.*}}tag-types.lldbinit'
+// CHECK-NEXT: Executing commands in '{{.*}}tag-types.lldbinit'.
+// CHECK-NEXT: (lldb) type lookup -- Struct
+// CHECK-NEXT: struct Struct {
+// CHECK-NEXT: bool B;
+// CHECK-NEXT: char C;
+// CHECK-NEXT: signed char SC;
+// CHECK-NEXT: unsigned char UC;
+// CHECK-NEXT: char16_t C16;
+// CHECK-NEXT: char32_t C32;
+// CHECK-NEXT: wchar_t WC;
+// CHECK-NEXT: short S;
+// CHECK-NEXT: unsigned short US;
+// CHECK-NEXT: int I;
+// CHECK-NEXT: unsigned int UI;
+// CHECK-NEXT: long L;
+// CHECK-NEXT: unsigned long UL;
+// CHECK-NEXT: long long LL;
+// CHECK-NEXT: unsigned long long ULL;
+// CHECK-NEXT: float F;
+// CHECK-NEXT: double D;
+// CHECK-NEXT: double LD;
+// CHECK-NEXT: }
+// CHECK-NEXT: (lldb) type lookup -- Class
+// CHECK-NEXT: class Class {
+// CHECK-NEXT: bool *PB;
+// CHECK-NEXT: char *PC;
+// CHECK-NEXT: signed char *PSC;
+// CHECK-NEXT: unsigned char *PUC;
+// CHECK-NEXT: char16_t *PC16;
+// CHECK-NEXT: char32_t *PC32;
+// CHECK-NEXT: wchar_t *PWC;
+// CHECK-NEXT: short *PS;
+// CHECK-NEXT: unsigned short *PUS;
+// CHECK-NEXT: int *PI;
+// CHECK-NEXT: unsigned int *PUI;
+// CHECK-NEXT: long *PL;
+// CHECK-NEXT: unsigned long *PUL;
+// CHECK-NEXT: long long *PLL;
+// CHECK-NEXT: unsigned long long *PULL;
+// CHECK-NEXT: float *PF;
+// CHECK-NEXT: double *PD;
+// CHECK-NEXT: double *PLD;
+// CHECK-NEXT: }
+// CHECK-NEXT: (lldb) type lookup -- Union
+// CHECK-NEXT: union Union {
+// CHECK-NEXT: const bool *PB;
+// CHECK-NEXT: const char *PC;
+// CHECK-NEXT: const signed char *PSC;
+// CHECK-NEXT: const unsigned char *PUC;
+// CHECK-NEXT: const char16_t *PC16;
+// CHECK-NEXT: const char32_t *PC32;
+// CHECK-NEXT: const wchar_t *PWC;
+// CHECK-NEXT: const short *PS;
+// CHECK-NEXT: const unsigned short *PUS;
+// CHECK-NEXT: const int *PI;
+// CHECK-NEXT: const unsigned int *PUI;
+// CHECK-NEXT: const long *PL;
+// CHECK-NEXT: const unsigned long *PUL;
+// CHECK-NEXT: const long long *PLL;
+// CHECK-NEXT: const unsigned long long *PULL;
+// CHECK-NEXT: const float *PF;
+// CHECK-NEXT: const double *PD;
+// CHECK-NEXT: const double *PLD;
+// CHECK-NEXT: }
+// CHECK-NEXT: (lldb) type lookup -- Derived
+// CHECK-NEXT: class Derived : public Class {
+// CHECK: Derived &Reference;
+// CHECK-NEXT: OneMember Member;
+// CHECK-NEXT: const OneMember ConstMember;
+// CHECK-NEXT: volatile OneMember VolatileMember;
+// CHECK-NEXT: const volatile OneMember CVMember;
+// CHECK-NEXT: OneMember *PtrMember;
+// CHECK-NEXT: OneMember &RefMember;
+// CHECK-NEXT: OneMember &&RValueRefMember;
+// CHECK: }
+// CHECK-NEXT: (lldb) type lookup -- Derived2
+// CHECK-NEXT: class Derived2 : protected Class, private Struct {
+// CHECK-NEXT: static unsigned int StaticDataMember;
+// CHECK-NEXT: }
+// CHECK-NEXT: (lldb) type lookup -- DerivedVirtual1
+// CHECK-NEXT: class DerivedVirtual1 : virtual public Class {
+// CHECK-NEXT: }
+// CHECK-NEXT: (lldb) type lookup -- DerivedVirtual2
+// CHECK-NEXT: class DerivedVirtual2 : public DerivedVirtual1, virtual public Class, virtual public OneMember {
+// CHECK-NEXT: }
+// CHECK-NEXT: (lldb) type lookup -- EnumInt
+// CHECK-NEXT: enum EnumInt {
+// CHECK-NEXT: A,
+// CHECK-NEXT: B
+// CHECK-NEXT: }
+// CHECK-NEXT: (lldb) type lookup -- EnumShort
+// CHECK-NEXT: enum EnumShort {
+// CHECK-NEXT: ES_A,
+// CHECK-NEXT: ES_B
+// CHECK-NEXT: }
+// CHECK-NEXT: (lldb) type lookup -- InvalidType
+// CHECK-NEXT: no type was found matching 'InvalidType'
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/typedefs.cpp b/lldb/test/Shell/SymbolFile/NativePDB/typedefs.cpp
new file mode 100644
index 00000000000..e303a4f4363
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/NativePDB/typedefs.cpp
@@ -0,0 +1,71 @@
+// clang-format off
+
+// REQUIRES: system-windows
+// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb-test symbols -dump-ast %t.exe | FileCheck %s
+
+namespace A {
+ namespace B {
+ using NamespaceTypedef = double;
+ }
+ template<typename T>
+ class C {
+ public:
+ using ClassTypedef = T;
+ };
+ using ClassTypedef = C<char>::ClassTypedef;
+ using ClassTypedef2 = C<wchar_t>::ClassTypedef;
+
+ template<typename T>
+ using AliasTemplate = typename C<T>::ClassTypedef;
+}
+
+namespace {
+ using AnonNamespaceTypedef = bool;
+}
+
+using IntTypedef = int;
+
+using ULongArrayTypedef = unsigned long[10];
+
+using RefTypedef = long double*&;
+
+using FuncPtrTypedef = long long(*)(int&, unsigned char**, short[], const double, volatile bool);
+
+using VarArgsFuncTypedef = char(*)(void*, long, unsigned short, unsigned int, ...);
+
+using VarArgsFuncTypedefA = float(*)(...);
+
+int main(int argc, char **argv) {
+ long double *Ptr;
+
+ A::B::NamespaceTypedef *X0;
+ A::C<char>::ClassTypedef *X1;
+ A::C<wchar_t>::ClassTypedef *X2;
+ AnonNamespaceTypedef *X3;
+ IntTypedef *X4;
+ ULongArrayTypedef *X5;
+ RefTypedef X6 = Ptr;
+ FuncPtrTypedef X7;
+ VarArgsFuncTypedef X8;
+ VarArgsFuncTypedefA X9;
+ A::AliasTemplate<float> X10;
+ return 0;
+}
+
+
+// CHECK: namespace {
+// CHECK-NEXT: typedef bool AnonNamespaceTypedef;
+// CHECK-NEXT: }
+// CHECK-NEXT: typedef unsigned long ULongArrayTypedef[10];
+// CHECK-NEXT: typedef double *&RefTypedef;
+// CHECK-NEXT: namespace A {
+// CHECK-NEXT: namespace B {
+// CHECK-NEXT: typedef double NamespaceTypedef;
+// CHECK-NEXT: }
+// CHECK-NEXT: typedef float AliasTemplate<float>;
+// CHECK-NEXT: }
+// CHECK-NEXT: typedef long long (*FuncPtrTypedef)(int &, unsigned char **, short *, const double, volatile bool);
+// CHECK-NEXT: typedef char (*VarArgsFuncTypedef)(void *, long, unsigned short, unsigned int, ...);
+// CHECK-NEXT: typedef float (*VarArgsFuncTypedefA)(...);
+// CHECK-NEXT: typedef int IntTypedef;
OpenPOWER on IntegriCloud