Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit e8ba344

Browse files
committed
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 707df0a commit e8ba344

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

source/Symbol/Type.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,13 @@ TypeAndOrName::TypeAndOrName(const TypeAndOrName &rhs)
697697
TypeAndOrName::TypeAndOrName(ConstString &in_type_const_string)
698698
: m_type_name(in_type_const_string) {}
699699

700+
TypeAndOrName::TypeAndOrName(const CompilerType &type)
701+
: m_type_pair(type)
702+
{
703+
if (m_type_pair)
704+
m_type_name = m_type_pair.GetName();
705+
}
706+
700707
TypeAndOrName &TypeAndOrName::operator=(const TypeAndOrName &rhs) {
701708
if (this != &rhs) {
702709
m_type_name = rhs.m_type_name;

0 commit comments

Comments
 (0)