summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/Function.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2016-09-08 02:26:58 +0000
committerJason Molenda <jmolenda@apple.com>2016-09-08 02:26:58 +0000
commitf81f15a7061c7725a4287bde548bb5e437805863 (patch)
tree3d100a91b0dd45a863d9eace7bb2e70f54d43b72 /lldb/source/Symbol/Function.cpp
parent5e0a20697e5e57d7306d4b335cb5aa9cd359e99b (diff)
downloadbcm5719-llvm-f81f15a7061c7725a4287bde548bb5e437805863.tar.gz
bcm5719-llvm-f81f15a7061c7725a4287bde548bb5e437805863.zip
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
Diffstat (limited to 'lldb/source/Symbol/Function.cpp')
-rw-r--r--lldb/source/Symbol/Function.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/Symbol/Function.cpp b/lldb/source/Symbol/Function.cpp
index 06f8ad56bde..96346167053 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();
OpenPOWER on IntegriCloud