forked from OSchip/llvm-project
[lldb][NFC] Simplify CompilerDecl and CompilerDeclContext initialization
This commit is contained in:
parent
3cd8ba0e37
commit
e0203b25af
|
@ -18,13 +18,11 @@ namespace lldb_private {
|
|||
class CompilerDecl {
|
||||
public:
|
||||
// Constructors and Destructors
|
||||
CompilerDecl() : m_type_system(nullptr), m_opaque_decl(nullptr) {}
|
||||
CompilerDecl() = default;
|
||||
|
||||
CompilerDecl(TypeSystem *type_system, void *decl)
|
||||
: m_type_system(type_system), m_opaque_decl(decl) {}
|
||||
|
||||
~CompilerDecl() {}
|
||||
|
||||
// Tests
|
||||
|
||||
explicit operator bool() const { return IsValid(); }
|
||||
|
@ -73,8 +71,8 @@ public:
|
|||
CompilerType GetFunctionArgumentType(size_t arg_idx) const;
|
||||
|
||||
private:
|
||||
TypeSystem *m_type_system;
|
||||
void *m_opaque_decl;
|
||||
TypeSystem *m_type_system = nullptr;
|
||||
void *m_opaque_decl = nullptr;
|
||||
};
|
||||
|
||||
bool operator==(const CompilerDecl &lhs, const CompilerDecl &rhs);
|
||||
|
|
|
@ -19,13 +19,11 @@ namespace lldb_private {
|
|||
class CompilerDeclContext {
|
||||
public:
|
||||
// Constructors and Destructors
|
||||
CompilerDeclContext() : m_type_system(nullptr), m_opaque_decl_ctx(nullptr) {}
|
||||
CompilerDeclContext() = default;
|
||||
|
||||
CompilerDeclContext(TypeSystem *type_system, void *decl_ctx)
|
||||
: m_type_system(type_system), m_opaque_decl_ctx(decl_ctx) {}
|
||||
|
||||
~CompilerDeclContext() {}
|
||||
|
||||
// Tests
|
||||
|
||||
explicit operator bool() const { return IsValid(); }
|
||||
|
@ -105,8 +103,8 @@ public:
|
|||
bool IsStructUnionOrClass() const;
|
||||
|
||||
private:
|
||||
TypeSystem *m_type_system;
|
||||
void *m_opaque_decl_ctx;
|
||||
TypeSystem *m_type_system = nullptr;
|
||||
void *m_opaque_decl_ctx = nullptr;
|
||||
};
|
||||
|
||||
bool operator==(const CompilerDeclContext &lhs, const CompilerDeclContext &rhs);
|
||||
|
|
Loading…
Reference in New Issue