Author: jmolenda Date: Wed Sep 7 21:26:58 2016 New Revision: 280902 URL: http://llvm.org/viewvc/llvm-project?rev=280902&view=rev Log: Force the initialization of the m_type ivar in Function::GetStartLineSourceInfo before we try to return the start line information about a function; this function requires it to have been initialized.
Modified: lldb/trunk/source/Symbol/Function.cpp Modified: lldb/trunk/source/Symbol/Function.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Function.cpp?rev=280902&r1=280901&r2=280902&view=diff ============================================================================== --- lldb/trunk/source/Symbol/Function.cpp (original) +++ lldb/trunk/source/Symbol/Function.cpp Wed Sep 7 21:26:58 2016 @@ -163,6 +163,9 @@ void Function::GetStartLineSourceInfo(Fi if (m_comp_unit == nullptr) return; + // Initialize m_type if it hasn't been initialized already + GetType(); + if (m_type != nullptr && m_type->GetDeclaration().GetLine() != 0) { source_file = m_type->GetDeclaration().GetFile(); line_no = m_type->GetDeclaration().GetLine(); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits