[Lldb-commits] [lldb] [lldb] Remove SymbolFilePDB and make the native one the default (PR #113647)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Oct 24 22:14:04 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff a31ce36f568723ffa5b4155d0ba009403ccd0d9e c11f8f87156e630f9fed1e5bc615217353bba56d --extensions h,cpp -- lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h lldb/test/Shell/Process/Windows/exception_access_violation.cpp lldb/test/Shell/Process/Windows/process_load.cpp lldb/test/Shell/SymbolFile/NativePDB/ast-functions-msvc.cpp lldb/test/Shell/SymbolFile/NativePDB/ast-functions.cpp lldb/test/Shell/SymbolFile/NativePDB/ast-methods.cpp lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp lldb/test/Shell/SymbolFile/NativePDB/bitfields.cpp lldb/test/Shell/SymbolFile/NativePDB/break-by-function.cpp lldb/test/Shell/SymbolFile/NativePDB/break-by-line.cpp lldb/test/Shell/SymbolFile/NativePDB/class_layout.cpp lldb/test/Shell/SymbolFile/NativePDB/disassembly.cpp lldb/test/Shell/SymbolFile/NativePDB/function-types-builtins.cpp lldb/test/Shell/SymbolFile/NativePDB/function-types-calling-conv.cpp lldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp lldb/test/Shell/SymbolFile/NativePDB/global-classes.cpp lldb/test/Shell/SymbolFile/NativePDB/global-ctor-dtor.cpp lldb/test/Shell/SymbolFile/NativePDB/globals-bss.cpp lldb/test/Shell/SymbolFile/NativePDB/globals-fundamental.cpp lldb/test/Shell/SymbolFile/NativePDB/icf.cpp lldb/test/Shell/SymbolFile/NativePDB/incomplete-tag-type.cpp lldb/test/Shell/SymbolFile/NativePDB/inline_sites_live.cpp lldb/test/Shell/SymbolFile/NativePDB/load-pdb.cpp lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp lldb/test/Shell/SymbolFile/NativePDB/locate-pdb.cpp lldb/test/Shell/SymbolFile/NativePDB/lookup-by-address.cpp lldb/test/Shell/SymbolFile/NativePDB/lookup-by-types.cpp lldb/test/Shell/SymbolFile/NativePDB/nested-types.cpp lldb/test/Shell/SymbolFile/NativePDB/s_constant.cpp lldb/test/Shell/SymbolFile/NativePDB/source-list.cpp lldb/test/Shell/SymbolFile/NativePDB/stack_unwinding01.cpp lldb/test/Shell/SymbolFile/NativePDB/tag-types.cpp lldb/test/Shell/SymbolFile/NativePDB/typedefs.cpp lldb/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp lldb/test/Shell/SymbolFile/NativePDB/Inputs/AstRestoreTest.cpp lldb/test/Shell/SymbolFile/NativePDB/Inputs/CallingConventionsTest.cpp lldb/test/Shell/SymbolFile/NativePDB/Inputs/ClassLayoutTest.cpp lldb/test/Shell/SymbolFile/NativePDB/Inputs/CompilandsTest.cpp lldb/test/Shell/SymbolFile/NativePDB/Inputs/ExpressionsTest.cpp lldb/test/Shell/SymbolFile/NativePDB/Inputs/FuncSymbols.cpp lldb/test/Shell/SymbolFile/NativePDB/Inputs/FuncSymbolsTestMain.cpp lldb/test/Shell/SymbolFile/NativePDB/Inputs/FunctionLevelLinkingTest.cpp lldb/test/Shell/SymbolFile/NativePDB/Inputs/FunctionLevelLinkingTest.h lldb/test/Shell/SymbolFile/NativePDB/Inputs/FunctionNestedBlockTest.cpp lldb/test/Shell/SymbolFile/NativePDB/Inputs/PointerTypeTest.cpp lldb/test/Shell/SymbolFile/NativePDB/Inputs/SimpleTypesTest.cpp lldb/test/Shell/SymbolFile/NativePDB/Inputs/TypeQualsTest.cpp lldb/test/Shell/SymbolFile/NativePDB/Inputs/UdtLayoutTest.cpp lldb/test/Shell/SymbolFile/NativePDB/Inputs/VBases.cpp lldb/test/Shell/SymbolFile/NativePDB/Inputs/VariablesLocationsTest.cpp lldb/test/Shell/SymbolFile/NativePDB/Inputs/VariablesTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/AstRestoreTest.cpp b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/AstRestoreTest.cpp
index fb20c9d734..05a4d872b0 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/AstRestoreTest.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/AstRestoreTest.cpp
@@ -4,7 +4,7 @@ namespace N1 {
namespace {
enum Enum { Enum_0 = 1, Enum_1 = 2, Enum_2 = 4, Enum_3 = 8 };
enum class ScopedEnum { Enum_0 = 1, Enum_1 = 2, Enum_2 = 4, Enum_3 = 8 };
-}
+} // namespace
Enum Global = Enum_3;
@@ -16,9 +16,7 @@ class Class : public Base {
public:
Class(Enum e) : m_ce(e) {}
- static int StaticFunc(const Class &c) {
- return c.PrivateFunc(c.m_inner) + Global + ClassStatic;
- }
+ static int StaticFunc(const Class &c) { return c.PrivateFunc(c.m_inner) + Global + ClassStatic; }
const Enum m_ce;
@@ -44,12 +42,8 @@ private:
};
int Class::ClassStatic = 7;
-template<typename T>
-struct Template {
- template<Enum E>
- void TemplateFunc() {
- T::StaticFunc(T(E));
- }
+template <typename T> struct Template {
+ template <Enum E> void TemplateFunc() { T::StaticFunc(T(E)); }
};
void foo() { Template<Class>().TemplateFunc<Enum_0>(); }
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/CallingConventionsTest.cpp b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/CallingConventionsTest.cpp
index 60854c04c6..26f544b123 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/CallingConventionsTest.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/CallingConventionsTest.cpp
@@ -15,6 +15,4 @@ struct S {
};
auto FuncThisCallPtr = &S::FuncThisCall;
-int main() {
- return 0;
-}
+int main() { return 0; }
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ClassLayoutTest.cpp b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ClassLayoutTest.cpp
index 34a0895ea7..0c6830c959 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ClassLayoutTest.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ClassLayoutTest.cpp
@@ -79,9 +79,7 @@ public:
explicit Class(int a) { m_public = a; } // Test first reference of m_public.
~Class() {}
- static int StaticMemberFunc(int a, ...) {
- return 1;
- } // Test static member function.
+ static int StaticMemberFunc(int a, ...) { return 1; } // Test static member function.
int Get() { return 1; }
int f(Friend c) { return c.f(); }
inline bool operator==(const Class &rhs) const // Test operator.
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/CompilandsTest.cpp b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/CompilandsTest.cpp
index 4cce7f667f..76e8197013 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/CompilandsTest.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/CompilandsTest.cpp
@@ -1,3 +1 @@
-int main() {
- return 0;
-}
+int main() { return 0; }
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/FuncSymbols.cpp b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/FuncSymbols.cpp
index ccccf6ffd1..f6552960b9 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/FuncSymbols.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/FuncSymbols.cpp
@@ -1,16 +1,12 @@
// Static function
namespace {
-static long StaticFunction(int a)
-{
- return 2;
-}
-}
+static long StaticFunction(int a) { return 2; }
+} // namespace
// Inlined function
static inline int InlinedFunction(long a) { return 10; }
-void FunctionCall()
-{
+void FunctionCall() {
StaticFunction(1);
InlinedFunction(1);
}
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/FuncSymbolsTestMain.cpp b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/FuncSymbolsTestMain.cpp
index 17eeab7117..c6837fbf73 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/FuncSymbolsTestMain.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/FuncSymbolsTestMain.cpp
@@ -1,4 +1,4 @@
-
+
// Global functions
int Func_arg_array(int array[]) { return 1; }
void Func_arg_void(void) { return; }
@@ -7,34 +7,26 @@ void Func_varargs(...) { return; }
// Class
namespace MemberTest {
- class A {
- public:
- int Func(int a, ...) { return 1; }
- };
-}
+class A {
+public:
+ int Func(int a, ...) { return 1; }
+};
+} // namespace MemberTest
// Template
-template <int N=1, class ...T>
-void TemplateFunc(T ...Arg) {
- return;
-}
+template <int N = 1, class... T> void TemplateFunc(T... Arg) { return; }
// namespace
namespace {
- void Func(int a, const long b, volatile bool c, ...) { return; }
-}
+void Func(int a, const long b, volatile bool c, ...) { return; }
+} // namespace
namespace NS {
- void Func(char a, int b) {
- return;
- }
-}
+void Func(char a, int b) { return; }
+} // namespace NS
// Static function
-static long StaticFunction(int a)
-{
- return 2;
-}
+static long StaticFunction(int a) { return 2; }
// Inlined function
inline void InlinedFunction(long a) { return; }
@@ -43,13 +35,13 @@ extern void FunctionCall();
int main() {
MemberTest::A v1;
- v1.Func('a',10);
+ v1.Func('a', 10);
Func(1, 5, true, 10, 8);
NS::Func('c', 2);
TemplateFunc(10);
- TemplateFunc(10,11,88);
+ TemplateFunc(10, 11, 88);
StaticFunction(2);
InlinedFunction(1);
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/FunctionLevelLinkingTest.cpp b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/FunctionLevelLinkingTest.cpp
index fa0030bacb..060cfcf841 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/FunctionLevelLinkingTest.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/FunctionLevelLinkingTest.cpp
@@ -1,9 +1,5 @@
#include "FunctionLevelLinkingTest.h"
-int foo() {
- return 0;
-}
+int foo() { return 0; }
-int main() {
- return foo() + bar() + baz();
-}
+int main() { return foo() + bar() + baz(); }
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/FunctionLevelLinkingTest.h b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/FunctionLevelLinkingTest.h
index 0cc9d80d85..eccb7a73ab 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/FunctionLevelLinkingTest.h
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/FunctionLevelLinkingTest.h
@@ -1,12 +1,8 @@
#ifndef FUNCTION_LEVEL_LINKING_TEST_H
#define FUNCTION_LEVEL_LINKING_TEST_H
-int bar() {
- return 0;
-}
+int bar() { return 0; }
-int baz() {
- return 0;
-}
+int baz() { return 0; }
#endif
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/SimpleTypesTest.cpp b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/SimpleTypesTest.cpp
index de13a5b430..a0064afde6 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/SimpleTypesTest.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/SimpleTypesTest.cpp
@@ -2,14 +2,14 @@
typedef unsigned long ULongArrayTypedef[10];
ULongArrayTypedef ULongArrayVar;
-typedef long double*& RefTypedef;
-long double* LongDoublePtrVar = 0;
+typedef long double *&RefTypedef;
+long double *LongDoublePtrVar = 0;
RefTypedef RefVar = LongDoublePtrVar;
-typedef long long (*FuncPtrTypedef)(int&, unsigned char**, short[], const double, volatile bool);
+typedef long long (*FuncPtrTypedef)(int &, unsigned char **, short[], const double, volatile bool);
FuncPtrTypedef FuncVar;
-typedef char (*VarArgsFuncTypedef)(void*, long, unsigned short, unsigned int, ...);
+typedef char (*VarArgsFuncTypedef)(void *, long, unsigned short, unsigned int, ...);
VarArgsFuncTypedef VarArgsFuncVar;
typedef float (*VarArgsFuncTypedefA)(...);
@@ -47,6 +47,4 @@ WChar32Typedef WC32Var;
typedef wchar_t WCharTypedef;
WCharTypedef WCVar;
-int main() {
- return 0;
-}
+int main() { return 0; }
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/TypeQualsTest.cpp b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/TypeQualsTest.cpp
index bedafcdacf..18d91fc4d5 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/TypeQualsTest.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/TypeQualsTest.cpp
@@ -1,46 +1,32 @@
// Rank > 0 array
-typedef volatile int* RankNArray[10][100];
+typedef volatile int *RankNArray[10][100];
RankNArray ArrayVar;
typedef int __unaligned *UnalignedTypedef;
UnalignedTypedef UnVar;
-typedef long* __restrict RestrictTypedef;
+typedef long *__restrict RestrictTypedef;
RestrictTypedef RestrictVar;
-void Func1(const int* a, int const* b, const int ** const c, const int* const* d) {
- return;
-}
+void Func1(const int *a, int const *b, const int **const c, const int *const *d) { return; }
-void Func2(volatile int* a, int volatile* b) {
- return;
-}
+void Func2(volatile int *a, int volatile *b) { return; }
-void Func3(int*& a, int& b, const int&c, int&& d) {
- return;
-}
+void Func3(int *&a, int &b, const int &c, int &&d) { return; }
-void Func4(int* __unaligned a, __unaligned int* b) {
- return;
-}
+void Func4(int *__unaligned a, __unaligned int *b) { return; }
-void Func5(int a, int* __restrict b, int& __restrict c) {
- return;
-}
+void Func5(int a, int *__restrict b, int &__restrict c) { return; }
-void Func6(const volatile int* __restrict b) {
- return;
-}
+void Func6(const volatile int *__restrict b) { return; }
// LValue
-typedef int& IntRef;
+typedef int &IntRef;
int x = 0;
IntRef IVar = x;
// RValue
-typedef int&& IIRef;
+typedef int &&IIRef;
IIRef IIVar = int(1);
-int main() {
- return 0;
-}
+int main() { return 0; }
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/UdtLayoutTest.cpp b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/UdtLayoutTest.cpp
index 59a4fc585d..e495918deb 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/UdtLayoutTest.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/UdtLayoutTest.cpp
@@ -29,10 +29,7 @@ private:
#pragma pack(push, 16)
class C : private virtual B<0>, public virtual B<1>, private B<2>, public B<3> {
public:
- C(char x, char y, char z)
- : A(x - y + z), B<0>(x, y, z), B<1>(x * 2, y * 2, z * 2),
- B<2>(x * 3, y * 3, z * 3), B<3>(x * 4, y * 4, z * 4), _x(x * 5),
- _y(y * 5), _z(z * 5) {}
+ C(char x, char y, char z) : A(x - y + z), B<0>(x, y, z), B<1>(x * 2, y * 2, z * 2), B<2>(x * 3, y * 3, z * 3), B<3>(x * 4, y * 4, z * 4), _x(x * 5), _y(y * 5), _z(z * 5) {}
static int abc;
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/VariablesLocationsTest.cpp b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/VariablesLocationsTest.cpp
index 7b7180a3ec..e7e58ef333 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/VariablesLocationsTest.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/VariablesLocationsTest.cpp
@@ -10,11 +10,10 @@ __declspec(align(128)) struct S {
};
void bar(int arg_0) {
- S loc_0;
- int loc_1 = 5678;
+ S loc_0;
+ int loc_1 = 5678;
}
-
int main(int argc, char *argv[]) {
bool loc_0 = true;
int loc_1 = 3333;
diff --git a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/VariablesTest.cpp b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/VariablesTest.cpp
index 304d905660..99c62e9943 100644
--- a/lldb/test/Shell/SymbolFile/NativePDB/Inputs/VariablesTest.cpp
+++ b/lldb/test/Shell/SymbolFile/NativePDB/Inputs/VariablesTest.cpp
@@ -1,26 +1,27 @@
typedef int IntTypedef;
-IntTypedef g_IntVar; // Testing globals.
+IntTypedef g_IntVar; // Testing globals.
typedef enum Enum { // Testing constants.
RED,
GREEN,
BLUE
} EnumTypedef;
-EnumTypedef g_EnumVar; // Testing members.
+EnumTypedef g_EnumVar; // Testing members.
// FIXME: `sg_IntVar` appears both in global scope's children and compiland's
// children but with different symbol's id.
-static int sg_IntVar = -1; // Testing file statics.
+static int sg_IntVar = -1; // Testing file statics.
// FIXME: `g_Const` appears both in global scope's children and compiland's
// children but with different symbol's id.
-const int g_Const = 0x88; // Testing constant data.
+const int g_Const = 0x88; // Testing constant data.
const int *g_pConst = &g_Const; // Avoid optimizing the const away
-thread_local int g_tls = 0; // Testing thread-local storage.
+thread_local int g_tls = 0; // Testing thread-local storage.
class Class {
static int m_StaticClassMember;
+
public:
explicit Class(int a) {}
void Func() {}
@@ -28,18 +29,18 @@ public:
int Class::m_StaticClassMember = 10; // Testing static class members.
Class ClassVar(1);
-int f(int var_arg1, int var_arg2) { // Testing parameters.
+int f(int var_arg1, int var_arg2) { // Testing parameters.
long same_name_var = -1;
return 1;
}
int same_name_var = 100;
int main() {
- int same_name_var = 0; // Testing locals.
+ int same_name_var = 0; // Testing locals.
const char local_const = 0x1;
// FIXME: 'local_CString` is not found through compiland's children.
- const char local_CString[] = "abc"; // Testing constant string.
+ const char local_CString[] = "abc"; // Testing constant string.
const char *local_pCString = local_CString; // Avoid optimizing the const away
int a = 10;
``````````
</details>
https://github.com/llvm/llvm-project/pull/113647
More information about the lldb-commits
mailing list