summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2019-11-28 15:14:24 +0100
committerRaphael Isemann <teemperor@gmail.com>2019-11-28 15:27:54 +0100
commite0203b25af92a3388580d6ef4eb386058720449e (patch)
tree88d73354e4f2e4410f89c307b62f69d79db89ac4
parent3cd8ba0e37a035a134dc01ce260040f1d57f4d40 (diff)
downloadbcm5719-llvm-e0203b25af92a3388580d6ef4eb386058720449e.tar.gz
bcm5719-llvm-e0203b25af92a3388580d6ef4eb386058720449e.zip
[lldb][NFC] Simplify CompilerDecl and CompilerDeclContext initialization
-rw-r--r--lldb/include/lldb/Symbol/CompilerDecl.h8
-rw-r--r--lldb/include/lldb/Symbol/CompilerDeclContext.h8
2 files changed, 6 insertions, 10 deletions
diff --git a/lldb/include/lldb/Symbol/CompilerDecl.h b/lldb/include/lldb/Symbol/CompilerDecl.h
index 7e4755a58c5..e4687ffb385 100644
--- a/lldb/include/lldb/Symbol/CompilerDecl.h
+++ b/lldb/include/lldb/Symbol/CompilerDecl.h
@@ -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);
diff --git a/lldb/include/lldb/Symbol/CompilerDeclContext.h b/lldb/include/lldb/Symbol/CompilerDeclContext.h
index e7958c08d83..c140a3df13d 100644
--- a/lldb/include/lldb/Symbol/CompilerDeclContext.h
+++ b/lldb/include/lldb/Symbol/CompilerDeclContext.h
@@ -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);
OpenPOWER on IntegriCloud