From f81f15a7061c7725a4287bde548bb5e437805863 Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Thu, 8 Sep 2016 02:26:58 +0000 Subject: [PATCH] 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. llvm-svn: 280902 --- lldb/source/Symbol/Function.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lldb/source/Symbol/Function.cpp b/lldb/source/Symbol/Function.cpp index 06f8ad5..9634616 100644 --- a/lldb/source/Symbol/Function.cpp +++ b/lldb/source/Symbol/Function.cpp @@ -163,6 +163,9 @@ void Function::GetStartLineSourceInfo(FileSpec &source_file, 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(); -- 2.7.4