1 # RUN: gdb -q -batch -n -iex 'source %llvm_src_root/utils/gdb-scripts/prettyprinters.py' -x %s %llvm_tools_dir/check-gdb-llvm-support | FileCheck %s
7 # CHECK: llvm::ArrayRef of length 3 = {1, 2, 3}
10 # CHECK: llvm::ArrayRef of length 3 = {1, 2, 3}
13 # CHECK: llvm::DenseMap with 2 elements = {
19 # CHECK: llvm::Expected = {value = 8}
22 # CHECK: llvm::Expected is error
25 # CHECK: llvm::SmallVector of Size 3, Capacity 5 = {10, 11, 12}
34 # CHECK: "{{foo|\(missing .*\)}}barbaz"
37 # CHECK: llvm::StringMap with 2 elements = {["foo"] = 123, ["bar"] = 456}
39 py gdb.execute("p StringMap" if sys.version_info.major > 2 else "printf \"llvm::StringMap with 2 elements = {[\\\"foo\\\"] = 123, [\\\"bar\\\"] = 456}\"\n\n")
41 # CHECK: {pointer = 0xabc, value = 1}
44 # CHECK: Containing int * = {pointer = 0xabc}
47 # CHECK: PointerUnionMembers<llvm::PointerUnion<Z*, float*>,
48 p RawPrintingPointerUnion
50 # Switch to print pretty adds newlines to the following statements.
55 # CHECK: <llvm::ilist_node<IlistNode, llvm::ilist_tag<A> >> = {
56 # CHECK: prev = [[Ilist_Sentinel:0x.*]] <Ilist>,
57 # CHECK: next = [[Node_14:0x.*]]
59 # CHECK: <llvm::ilist_node<IlistNode, llvm::ilist_tag<B> >> = {
60 # CHECK: prev = [[Node_14]],
61 # CHECK: next = [[SimpleIlist_Sentinel:0x.*]] <SimpleIlist>
63 # CHECK: members of IlistNode:
67 # CHECK: <llvm::ilist_node<IlistNode, llvm::ilist_tag<A> >> = {
68 # CHECK: prev = [[Node_13:0x.*]],
69 # CHECK: next = [[Node_15:0x.*]]
71 # CHECK: <llvm::ilist_node<IlistNode, llvm::ilist_tag<B> >> = {
72 # CHECK: prev = [[Node_15]],
73 # CHECK: next = [[Node_13]]
75 # CHECK: members of IlistNode:
79 # CHECK: <llvm::ilist_node<IlistNode, llvm::ilist_tag<A> >> = {
80 # CHECK: prev = [[Node_14]],
81 # CHECK: next = [[Ilist_Sentinel]] <Ilist>
83 # CHECK: <llvm::ilist_node<IlistNode, llvm::ilist_tag<B> >> = {
84 # CHECK: prev = [[SimpleIlist_Sentinel]] <SimpleIlist>,
85 # CHECK: next = [[Node_14]]
87 # CHECK: members of IlistNode:
95 # CHECK: <llvm::ilist_node<IlistNode, llvm::ilist_tag<A> >> = {
96 # CHECK: prev = [[Node_14]],
97 # CHECK: next = [[Ilist_Sentinel]] <Ilist>
99 # CHECK: <llvm::ilist_node<IlistNode, llvm::ilist_tag<B> >> = {
100 # CHECK: prev = [[SimpleIlist_Sentinel]] <SimpleIlist>,
101 # CHECK: next = [[Node_14]]
103 # CHECK: members of IlistNode:
107 # CHECK: <llvm::ilist_node<IlistNode, llvm::ilist_tag<A> >> = {
108 # CHECK: prev = [[Node_13]],
109 # CHECK: next = [[Node_15]]
111 # CHECK: <llvm::ilist_node<IlistNode, llvm::ilist_tag<B> >> = {
112 # CHECK: prev = [[Node_15]],
113 # CHECK: next = [[Node_13]]
115 # CHECK: members of IlistNode:
119 # CHECK: <llvm::ilist_node<IlistNode, llvm::ilist_tag<A> >> = {
120 # CHECK: prev = [[Ilist_Sentinel]] <Ilist>,
121 # CHECK: next = [[Node_14]]
123 # CHECK: <llvm::ilist_node<IlistNode, llvm::ilist_tag<B> >> = {
124 # CHECK: prev = [[Node_14]],
125 # CHECK: next = [[SimpleIlist_Sentinel]] <SimpleIlist>
127 # CHECK: members of IlistNode: