mirror of
https://github.com/intel/llvm.git
synced 2026-01-14 03:50:17 +08:00
[LLDB][NFC] Move some constructors to their cpp file
CompilerType constructors rely on the NDEBUG macro, so it's better to move them to their cpp file so that the header doesn't get confused when this macro is used differently for other compilation units.
This commit is contained in:
@@ -42,10 +42,7 @@ public:
|
||||
///
|
||||
/// \see lldb_private::TypeSystemClang::GetType(clang::QualType)
|
||||
CompilerType(lldb::TypeSystemWP type_system,
|
||||
lldb::opaque_compiler_type_t type)
|
||||
: m_type_system(type_system), m_type(type) {
|
||||
assert(Verify() && "verification failed");
|
||||
}
|
||||
lldb::opaque_compiler_type_t type);
|
||||
|
||||
/// This is a minimal wrapper of a TypeSystem shared pointer as
|
||||
/// returned by CompilerType which conventien dyn_cast support.
|
||||
@@ -88,10 +85,8 @@ public:
|
||||
lldb::TypeSystemSP GetSharedPointer() const { return m_typesystem_sp; }
|
||||
};
|
||||
|
||||
CompilerType(TypeSystemSPWrapper type_system, lldb::opaque_compiler_type_t type)
|
||||
: m_type_system(type_system.GetSharedPointer()), m_type(type) {
|
||||
assert(Verify() && "verification failed");
|
||||
}
|
||||
CompilerType(TypeSystemSPWrapper type_system,
|
||||
lldb::opaque_compiler_type_t type);
|
||||
|
||||
CompilerType(const CompilerType &rhs)
|
||||
: m_type_system(rhs.m_type_system), m_type(rhs.m_type) {}
|
||||
|
||||
@@ -951,6 +951,18 @@ bool CompilerType::GetValueAsScalar(const lldb_private::DataExtractor &data,
|
||||
return false;
|
||||
}
|
||||
|
||||
CompilerType::CompilerType(CompilerType::TypeSystemSPWrapper type_system,
|
||||
lldb::opaque_compiler_type_t type)
|
||||
: m_type_system(type_system.GetSharedPointer()), m_type(type) {
|
||||
assert(Verify() && "verification failed");
|
||||
}
|
||||
|
||||
CompilerType::CompilerType(lldb::TypeSystemWP type_system,
|
||||
lldb::opaque_compiler_type_t type)
|
||||
: m_type_system(type_system), m_type(type) {
|
||||
assert(Verify() && "verification failed");
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
bool CompilerType::Verify() const {
|
||||
if (!IsValid())
|
||||
|
||||
Reference in New Issue
Block a user