summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-08-05 11:29:01 +0000
committerPavel Labath <pavel@labath.sk>2019-08-05 11:29:01 +0000
commit5a7e1e978f04f06a63c70107d6b2d42cc4f7b19d (patch)
treebbf56a8c2b4bf7bf0854abc32c8664a8b3d15f84
parenteaf13044bda2f58562a7e5f4ee762e70294299a9 (diff)
downloadbcm5719-llvm-5a7e1e978f04f06a63c70107d6b2d42cc4f7b19d.tar.gz
bcm5719-llvm-5a7e1e978f04f06a63c70107d6b2d42cc4f7b19d.zip
Fix PDB tests after r367820
The commit changed Module dumping code to call SymbolFile::Dump directly, which meant that we were no longer showing the plugin name in the output (as that was done in the SymbolVendor). This adds the plugin name printing code to the SymbolFile dump method, and tweak the assertions in the PDB tests to match it correctly. llvm-svn: 367835
-rw-r--r--lldb/lit/SymbolFile/PDB/class-layout.test2
-rw-r--r--lldb/lit/SymbolFile/PDB/compilands.test2
-rw-r--r--lldb/lit/SymbolFile/PDB/func-symbols.test2
-rw-r--r--lldb/lit/SymbolFile/PDB/type-quals.test2
-rw-r--r--lldb/lit/SymbolFile/PDB/typedefs.test2
-rw-r--r--lldb/lit/SymbolFile/PDB/variables.test2
-rw-r--r--lldb/source/Symbol/SymbolFile.cpp2
7 files changed, 8 insertions, 6 deletions
diff --git a/lldb/lit/SymbolFile/PDB/class-layout.test b/lldb/lit/SymbolFile/PDB/class-layout.test
index 5c0194485d7..fcd6b610826 100644
--- a/lldb/lit/SymbolFile/PDB/class-layout.test
+++ b/lldb/lit/SymbolFile/PDB/class-layout.test
@@ -13,7 +13,7 @@ RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=FRI
RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=CLASS %s
CHECK: Module [[MOD:.*]]
-CHECK: {{^[0-9A-F]+}}: SymbolVendor pdb ([[MOD]])
+CHECK: SymbolFile pdb ([[MOD]])
CHECK: {{^[0-9A-F]+}}: CompileUnit{{[{]0x[0-9a-f]+[}]}}, language = "c++", file = '{{.*}}\ClassLayoutTest.cpp'
ENUM: name = "Enum", size = 4, decl = ClassLayoutTest.cpp:5
diff --git a/lldb/lit/SymbolFile/PDB/compilands.test b/lldb/lit/SymbolFile/PDB/compilands.test
index d719ab7669d..0bda82ee236 100644
--- a/lldb/lit/SymbolFile/PDB/compilands.test
+++ b/lldb/lit/SymbolFile/PDB/compilands.test
@@ -7,5 +7,5 @@ RUN: env LLDB_USE_NATIVE_PDB_READER=0 lldb-test symbols %T/CompilandsTest.cpp.ex
; Link default libraries
CHECK: Module [[CU:.*]]
-CHECK: {{^[0-9A-F]+}}: SymbolVendor pdb ([[CU]])
+CHECK: SymbolFile pdb ([[CU]])
CHECK: {{^[0-9A-F]+}}: CompileUnit{{[{]0x[0-9a-f]+[}]}}, language = "c++", file = '{{.*}}\CompilandsTest.cpp'
diff --git a/lldb/lit/SymbolFile/PDB/func-symbols.test b/lldb/lit/SymbolFile/PDB/func-symbols.test
index fbbf5ddfb85..676be1c632b 100644
--- a/lldb/lit/SymbolFile/PDB/func-symbols.test
+++ b/lldb/lit/SymbolFile/PDB/func-symbols.test
@@ -7,7 +7,7 @@ RUN: lldb-test symbols %T/FuncSymbolsTest.exe | FileCheck --check-prefix=CHECK-T
; In this test, We don't check demangled name of a mangled function.
CHECK-ONE: Module [[MD:.*]]
-CHECK-ONE-DAG: {{.*}}: SymbolVendor pdb ([[MD]])
+CHECK-ONE-DAG: SymbolFile pdb ([[MD]])
CHECK-ONE-DAG: [[TY0:.*]]: Type{[[UID0:.*]]} , name = "Func_arg_array", decl = FuncSymbolsTestMain.cpp:3, compiler_type = {{.*}} int (int *)
CHECK-ONE-DAG: [[TY1:.*]]: Type{[[UID1:.*]]} , name = "Func_arg_void", decl = FuncSymbolsTestMain.cpp:4, compiler_type = {{.*}} void (void)
CHECK-ONE-DAG: [[TY2:.*]]: Type{[[UID2:.*]]} , name = "Func_arg_none", decl = FuncSymbolsTestMain.cpp:5, compiler_type = {{.*}} void (void)
diff --git a/lldb/lit/SymbolFile/PDB/type-quals.test b/lldb/lit/SymbolFile/PDB/type-quals.test
index 734509f7834..cf65c79223b 100644
--- a/lldb/lit/SymbolFile/PDB/type-quals.test
+++ b/lldb/lit/SymbolFile/PDB/type-quals.test
@@ -4,7 +4,7 @@ RUN: %build --compiler=msvc --mode=link --arch=32 --nodefaultlib --output=%T/Typ
RUN: lldb-test symbols %T/TypeQualsTest.cpp.exe | FileCheck %s
CHECK: Module [[MOD:.*]]
-CHECK-DAG: {{^[0-9A-F]+}}: SymbolVendor pdb ([[MOD]])
+CHECK-DAG: SymbolFile pdb ([[MOD]])
CHECK-DAG: Type{{.*}} , name = "const int", size = 4, compiler_type = {{.*}} const int
CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} const int *
CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} const int **const
diff --git a/lldb/lit/SymbolFile/PDB/typedefs.test b/lldb/lit/SymbolFile/PDB/typedefs.test
index caf23a8c166..5f70d878230 100644
--- a/lldb/lit/SymbolFile/PDB/typedefs.test
+++ b/lldb/lit/SymbolFile/PDB/typedefs.test
@@ -12,7 +12,7 @@ RUN: lldb-test symbols %T/SimpleTypesTest.cpp.typedefs.exe | FileCheck %s
; both of them is the same.
CHECK: Module [[MOD:.*]]
-CHECK: {{^[0-9A-F]+}}: SymbolVendor pdb ([[MOD]])
+CHECK: SymbolFile pdb ([[MOD]])
CHECK-DAG: name = "char32_t", size = 4, compiler_type = {{.*}} char32_t
CHECK-DAG: name = "char16_t", size = 2, compiler_type = {{.*}} char16_t
CHECK-DAG: Type{{.*}} , name = "unsigned long", size = 4, compiler_type = {{.*}} unsigned long
diff --git a/lldb/lit/SymbolFile/PDB/variables.test b/lldb/lit/SymbolFile/PDB/variables.test
index 2e9b5947109..ae14f02754c 100644
--- a/lldb/lit/SymbolFile/PDB/variables.test
+++ b/lldb/lit/SymbolFile/PDB/variables.test
@@ -9,7 +9,7 @@ RUN: FileCheck --check-prefix=FUNC-CONSTRUCTOR --input-file=%T/VariablesTest.out
RUN: FileCheck --check-prefix=FUNC-MEMBER --input-file=%T/VariablesTest.out %s
GLOBALS: Module [[MOD:.*]]
-GLOBALS: SymbolVendor pdb ([[MOD]])
+GLOBALS: SymbolFile pdb ([[MOD]])
GLOBALS: CompileUnit{{.*}}, language = "c++", file = '{{.*}}\VariablesTest.cpp'
GLOBALS-DAG: Variable{{.*}}, name = "g_IntVar"
GLOBALS-SAME: scope = global, location = {{.*}}, external
diff --git a/lldb/source/Symbol/SymbolFile.cpp b/lldb/source/Symbol/SymbolFile.cpp
index d59945962b0..8b9d8d31144 100644
--- a/lldb/source/Symbol/SymbolFile.cpp
+++ b/lldb/source/Symbol/SymbolFile.cpp
@@ -231,6 +231,8 @@ void SymbolFile::SectionFileAddressesChanged() {
}
void SymbolFile::Dump(Stream &s) {
+ s.Format("SymbolFile {0} ({1})\n", GetPluginName(),
+ GetMainObjectFile()->GetFileSpec());
s.PutCString("Types:\n");
m_type_list.Dump(&s, /*show_context*/ false);
s.PutChar('\n');
OpenPOWER on IntegriCloud