This is an archive of the discontinued LLVM Phabricator instance.

Expr evaluation - Avoid to check when the memory handle is zero
Needs RevisionPublic

Authored by dean on Jul 16 2015, 9:57 AM.



This change avoids to check whether the handle returned for an allocation of memory in IRForTarget::CompleteDataAllocation is zero, which is apparently a valid handle. The method IRForTarget::StaticDataAllocator::Allocate() returns LLDB_INVALID_ADDRESS in case of error, whereas, when the policy is eAllocationPolicyHostOnly, the first allocation performed by IRMemoryMap::Malloc and FindSpace is the value 0 for the first allocation.

This fix should restore the fall-back mode to evaluate expressions through local interpretation when an allocation by IRForTarget::CompleteDataAllocation is performed.

Diff Detail

Event Timeline

dean updated this revision to Diff 29920.Jul 16 2015, 9:57 AM
dean retitled this revision from to Expr evaluation - Avoid to check when the memory handle is zero.
dean updated this object.
dean added reviewers: jingham, spyffe.
dean added a subscriber: lldb-commits.
dean added a comment.Aug 4 2015, 6:49 AM

Hi, as friendly *bump*, can you please provide any feedback regarding this patch? Let me know whether further details or info are required...

spyffe requested changes to this revision.Jul 11 2016, 11:11 AM
spyffe edited edge metadata.

This code has been eliminated as -part of a refactoring of the way IRForTarget works.
I'm sorry that I didn't get to this review earlier, but at this point the patch probably isn't worth resurrecting.
I've hunted around for "equivalent" code after the refactor and I don't think it's there any more.

This revision now requires changes to proceed.Jul 11 2016, 11:11 AM