diff options
author | Greg Clayton <gclayton@apple.com> | 2012-04-23 22:00:21 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-04-23 22:00:21 +0000 |
commit | 2dafd8ed4bc3a55e14c32794143f76c5f63218a0 (patch) | |
tree | 0aacc9bb2f56f4c99eab2ba25f18571d280a418a /lldb/source/Core/Module.cpp | |
parent | 3f8acfc3c40e8dad68a3deb13a9fbb31f1b82b99 (diff) | |
download | bcm5719-llvm-2dafd8ed4bc3a55e14c32794143f76c5f63218a0.tar.gz bcm5719-llvm-2dafd8ed4bc3a55e14c32794143f76c5f63218a0.zip |
<rdar://problem/11282938>
Fixed an issue where we get NULL compile units back from the symbol vendor. We need symbol vendors to be able to quickly give an estimate of the compile units that they have without having to fully vette them first, so anyone getting compile units from a module should be able to deal with a NULL compile unit being returned for a given index.
llvm-svn: 155398
Diffstat (limited to 'lldb/source/Core/Module.cpp')
-rw-r--r-- | lldb/source/Core/Module.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index 30e9e17ec04..d2606576aa0 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -535,8 +535,11 @@ Module::FindCompileUnits (const FileSpec &path, for (uint32_t i=0; i<num_compile_units; ++i) { sc.comp_unit = GetCompileUnitAtIndex(i).get(); - if (FileSpec::Equal (*sc.comp_unit, path, compare_directory)) - sc_list.Append(sc); + if (sc.comp_unit) + { + if (FileSpec::Equal (*sc.comp_unit, path, compare_directory)) + sc_list.Append(sc); + } } return sc_list.GetSize() - start_size; } |