forked from OSchip/llvm-project
Fix a bug introduced in r235737 where code with important side
effects was passed as an expression to assert() calls. If lldb is built without asserts, the expression was eliminated and we lost the side effects -- these methods stopped working. <rdar://problem/30342959> llvm-svn: 295271
This commit is contained in:
parent
d3e5cb77e4
commit
a1a864631a
|
@ -54,7 +54,8 @@ static bool FileAtPathContainsArchAndUUID(const FileSpec &file_fspec,
|
|||
if (ObjectFile::GetModuleSpecifications(file_fspec, 0, 0, module_specs)) {
|
||||
ModuleSpec spec;
|
||||
for (size_t i = 0; i < module_specs.GetSize(); ++i) {
|
||||
assert(module_specs.GetModuleSpecAtIndex(i, spec));
|
||||
bool got_spec = module_specs.GetModuleSpecAtIndex(i, spec);
|
||||
assert(got_spec);
|
||||
if ((uuid == NULL || (spec.GetUUIDPtr() && spec.GetUUID() == *uuid)) &&
|
||||
(arch == NULL || (spec.GetArchitecturePtr() &&
|
||||
spec.GetArchitecture().IsCompatibleMatch(*arch)))) {
|
||||
|
|
|
@ -263,7 +263,8 @@ FileSpec Symbols::FindSymbolFileInBundle(const FileSpec &dsym_bundle_fspec,
|
|||
module_specs)) {
|
||||
ModuleSpec spec;
|
||||
for (size_t i = 0; i < module_specs.GetSize(); ++i) {
|
||||
assert(module_specs.GetModuleSpecAtIndex(i, spec));
|
||||
bool got_spec = module_specs.GetModuleSpecAtIndex(i, spec);
|
||||
assert(got_spec);
|
||||
if ((uuid == NULL ||
|
||||
(spec.GetUUIDPtr() && spec.GetUUID() == *uuid)) &&
|
||||
(arch == NULL ||
|
||||
|
|
Loading…
Reference in New Issue