Skip to content

Commit 95918f8

Browse files
tromeyvadimcn
authored andcommitted
Add a missing TypeAndOrName constructor
Add a TypeAndOrName constructor that was declared but not defined. This is used in the Rust plugin. See https://reviews.llvm.org/D44752
1 parent 015c528 commit 95918f8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lldb/source/Symbol/Type.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,13 @@ TypeAndOrName::TypeAndOrName(const char *in_type_str)
747747
TypeAndOrName::TypeAndOrName(ConstString &in_type_const_string)
748748
: m_type_name(in_type_const_string) {}
749749

750+
TypeAndOrName::TypeAndOrName(const CompilerType &type)
751+
: m_compiler_type(type)
752+
{
753+
if (m_compiler_type)
754+
m_type_name = m_compiler_type.GetTypeName();
755+
}
756+
750757
bool TypeAndOrName::operator==(const TypeAndOrName &other) const {
751758
if (m_compiler_type != other.m_compiler_type)
752759
return false;

0 commit comments

Comments
 (0)