Skip to content

Commit 5697cad

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 0171000 commit 5697cad

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
@@ -762,6 +762,13 @@ TypeAndOrName::TypeAndOrName(const char *in_type_str)
762762
TypeAndOrName::TypeAndOrName(ConstString &in_type_const_string)
763763
: m_type_name(in_type_const_string) {}
764764

765+
TypeAndOrName::TypeAndOrName(const CompilerType &type)
766+
: m_compiler_type(type)
767+
{
768+
if (m_compiler_type)
769+
m_type_name = m_compiler_type.GetTypeName();
770+
}
771+
765772
bool TypeAndOrName::operator==(const TypeAndOrName &other) const {
766773
if (m_compiler_type != other.m_compiler_type)
767774
return false;

0 commit comments

Comments
 (0)