summaryrefslogtreecommitdiffstats
path: root/lldb/include
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2020-01-01 22:42:25 +0100
committerRaphael Isemann <teemperor@gmail.com>2020-01-01 22:56:16 +0100
commit8dbe2f02c6d300e7222b5064b28c4d82a031647d (patch)
treee0a01e5ce68b48498dd9d6c5602c1c2a3deb0955 /lldb/include
parent8ca79dac559219358b0c6bb00bded30935c7aa6a (diff)
downloadbcm5719-llvm-8dbe2f02c6d300e7222b5064b28c4d82a031647d.tar.gz
bcm5719-llvm-8dbe2f02c6d300e7222b5064b28c4d82a031647d.zip
[lldb][NFC] Simplify CompilerType constructors/destructors and fix unused variable warning
CompilerType has no virtual functions and no statements in its constructors, so we can simplify this code. This also allows Clang to emit unused variable warnings for CompilerType, so I also removed one unused variable that otherwise causes -Werror builds to fail.
Diffstat (limited to 'lldb/include')
-rw-r--r--lldb/include/lldb/Symbol/CompilerType.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/lldb/include/lldb/Symbol/CompilerType.h b/lldb/include/lldb/Symbol/CompilerType.h
index ee87b53942b..660466be6b3 100644
--- a/lldb/include/lldb/Symbol/CompilerType.h
+++ b/lldb/include/lldb/Symbol/CompilerType.h
@@ -30,14 +30,13 @@ class DataExtractor;
class CompilerType {
public:
// Constructors and Destructors
- CompilerType(TypeSystem *type_system, lldb::opaque_compiler_type_t type);
+ CompilerType(TypeSystem *type_system, lldb::opaque_compiler_type_t type)
+ : m_type(type), m_type_system(type_system) {}
CompilerType(const CompilerType &rhs)
: m_type(rhs.m_type), m_type_system(rhs.m_type_system) {}
- CompilerType() : m_type(nullptr), m_type_system(nullptr) {}
-
- ~CompilerType();
+ CompilerType() = default;
// Operators
@@ -368,8 +367,8 @@ public:
}
private:
- lldb::opaque_compiler_type_t m_type;
- TypeSystem *m_type_system;
+ lldb::opaque_compiler_type_t m_type = nullptr;
+ TypeSystem *m_type_system = nullptr;
};
bool operator==(const CompilerType &lhs, const CompilerType &rhs);
OpenPOWER on IntegriCloud