|
23 | 23 | // RUN: -fdebug-types-section -gpubnames -c %s -o %t.foo.o
|
24 | 24 | // RUN: ld.lld %t.main.o %t.foo.o -o %t
|
25 | 25 |
|
26 |
| -// First we check when we make the .dwp file with %t.main.dwo first so it will |
| 26 | +// Check when have no .dwp file that we can find the types in both .dwo files. |
| 27 | +// RUN: rm -f %t.dwp |
| 28 | +// RUN: %lldb \ |
| 29 | +// RUN: -o "type lookup IntegerType" \ |
| 30 | +// RUN: -o "type lookup FloatType" \ |
| 31 | +// RUN: -o "type lookup CustomType" \ |
| 32 | +// RUN: -b %t | FileCheck %s --check-prefix=NODWP |
| 33 | +// NODWP: (lldb) type lookup IntegerType |
| 34 | +// NODWP-NEXT: int |
| 35 | +// NODWP-NEXT: unsigned int |
| 36 | +// NODWP: (lldb) type lookup FloatType |
| 37 | +// NODWP-NEXT: double |
| 38 | +// NODWP-NEXT: float |
| 39 | +// NODWP: (lldb) type lookup CustomType |
| 40 | +// NODWP-NEXT: struct CustomType { |
| 41 | +// NODWP-NEXT: typedef int IntegerType; |
| 42 | +// NODWP-NEXT: typedef double FloatType; |
| 43 | +// NODWP-NEXT: CustomType::IntegerType x; |
| 44 | +// NODWP-NEXT: CustomType::FloatType y; |
| 45 | +// NODWP-NEXT: } |
| 46 | +// NODWP-NEXT: struct CustomType { |
| 47 | +// NODWP-NEXT: typedef unsigned int IntegerType; |
| 48 | +// NODWP-NEXT: typedef float FloatType; |
| 49 | +// NODWP-NEXT: CustomType::IntegerType x; |
| 50 | +// NODWP-NEXT: CustomType::FloatType y; |
| 51 | +// NODWP-NEXT: } |
| 52 | + |
| 53 | +// Check when we make the .dwp file with %t.main.dwo first so it will |
27 | 54 | // pick the type unit from %t.main.dwo. Verify we find only the types from
|
28 | 55 | // %t.main.dwo's type unit.
|
29 | 56 | // RUN: llvm-dwp %t.main.dwo %t.foo.dwo -o %t.dwp
|
30 | 57 | // RUN: %lldb \
|
31 | 58 | // RUN: -o "type lookup IntegerType" \
|
32 | 59 | // RUN: -o "type lookup FloatType" \
|
33 |
| -// RUN: -o "type lookup IntegerType" \ |
34 |
| -// RUN: -b %t | FileCheck %s |
35 |
| -// CHECK: (lldb) type lookup IntegerType |
36 |
| -// CHECK-NEXT: int |
37 |
| -// CHECK-NEXT: (lldb) type lookup FloatType |
38 |
| -// CHECK-NEXT: double |
39 |
| -// CHECK-NEXT: (lldb) type lookup IntegerType |
40 |
| -// CHECK-NEXT: int |
| 60 | +// RUN: -o "type lookup CustomType" \ |
| 61 | +// RUN: -b %t | FileCheck %s --check-prefix=DWPMAIN |
| 62 | +// DWPMAIN: (lldb) type lookup IntegerType |
| 63 | +// DWPMAIN-NEXT: int |
| 64 | +// DWPMAIN: (lldb) type lookup FloatType |
| 65 | +// DWPMAIN-NEXT: double |
| 66 | +// DWPMAIN: (lldb) type lookup CustomType |
| 67 | +// DWPMAIN-NEXT: struct CustomType { |
| 68 | +// DWPMAIN-NEXT: typedef int IntegerType; |
| 69 | +// DWPMAIN-NEXT: typedef double FloatType; |
| 70 | +// DWPMAIN-NEXT: CustomType::IntegerType x; |
| 71 | +// DWPMAIN-NEXT: CustomType::FloatType y; |
| 72 | +// DWPMAIN-NEXT: } |
41 | 73 |
|
42 | 74 | // Next we check when we make the .dwp file with %t.foo.dwo first so it will
|
43 | 75 | // pick the type unit from %t.main.dwo. Verify we find only the types from
|
|
46 | 78 | // RUN: %lldb \
|
47 | 79 | // RUN: -o "type lookup IntegerType" \
|
48 | 80 | // RUN: -o "type lookup FloatType" \
|
49 |
| -// RUN: -o "type lookup IntegerType" \ |
50 |
| -// RUN: -b %t | FileCheck %s --check-prefix=VARIANT |
| 81 | +// RUN: -o "type lookup CustomType" \ |
| 82 | +// RUN: -b %t | FileCheck %s --check-prefix=DWPFOO |
51 | 83 |
|
52 |
| -// VARIANT: (lldb) type lookup IntegerType |
53 |
| -// VARIANT-NEXT: unsigned int |
54 |
| -// VARIANT-NEXT: (lldb) type lookup FloatType |
55 |
| -// VARIANT-NEXT: float |
56 |
| -// VARIANT-NEXT: (lldb) type lookup IntegerType |
57 |
| -// VARIANT-NEXT: unsigned int |
| 84 | +// DWPFOO: (lldb) type lookup IntegerType |
| 85 | +// DWPFOO-NEXT: unsigned int |
| 86 | +// DWPFOO: (lldb) type lookup FloatType |
| 87 | +// DWPFOO-NEXT: float |
| 88 | +// DWPFOO: (lldb) type lookup CustomType |
| 89 | +// DWPFOO-NEXT: struct CustomType { |
| 90 | +// DWPFOO-NEXT: typedef unsigned int IntegerType; |
| 91 | +// DWPFOO-NEXT: typedef float FloatType; |
| 92 | +// DWPFOO-NEXT: CustomType::IntegerType x; |
| 93 | +// DWPFOO-NEXT: CustomType::FloatType y; |
| 94 | +// DWPFOO-NEXT: } |
58 | 95 |
|
59 | 96 |
|
60 | 97 | // We need to do this so we end with a type unit in each .dwo file and that has
|
|
0 commit comments