<br><br><div class="gmail_quote">On Wed, Dec 17, 2008 at 2:40 AM, Ted Kremenek <span dir="ltr"><<a href="mailto:kremenek@apple.com">kremenek@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style="">Hi Zhongxing,<div><br></div><div>Thanks for doing this.  A couple comments inline.</div><div><br><div><div class="Ih2E3d"><div>On Dec 15, 2008, at 6:36 PM, Zhongxing Xu wrote:</div><br></div><blockquote type="cite">
<span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div class="Ih2E3d">
URL:<span> </span><a href="http://llvm.org/viewvc/llvm-project?rev=61069&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=61069&view=rev</a><br>Log:<br>Implement RegionStoreManager::Remove().<br><br>
Modified:<br>   cfe/trunk/lib/Analysis/RegionStore.cpp<br><br>Modified: cfe/trunk/lib/Analysis/RegionStore.cpp<br>URL:<span> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/RegionStore.cpp?rev=61069&r1=61068&r2=61069&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/RegionStore.cpp?rev=61069&r1=61068&r2=61069&view=diff</a><br>
<br>==============================================================================<br>--- cfe/trunk/lib/Analysis/RegionStore.cpp (original)<br>+++ cfe/trunk/lib/Analysis/RegionStore.cpp Mon Dec 15 20:36:30 2008<br>@@ -111,10 +111,7 @@<br>
<br></div><div class="Ih2E3d">+Store RegionStoreManager::Remove(Store store, Loc L) {<br>+  RegionBindingsTy B = GetRegionBindings(store);<br>+<br>+  const MemRegion* R = cast<loc::MemRegionVal>(L).getRegion();<br>+  assert(R);</div>
</span></blockquote><div><br></div><div>This assertion seems bogus.  If Remove should always expect a MemRegion* then we should change its interface to accept that as an argument instead of a Loc value.  Otherwise, Remove should handle the case when 'L' isn't a region.</div>
<div class="Ih2E3d"><div><br></div><blockquote type="cite"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">+<br>
+  return RBFactory.Remove(B, R).getRoot();<br>+}</span></blockquote><div><br></div></div><div>Do we plan on inserting Unknown into the map to marked the value as killed?  If so, we should only do that if it was in the map in the first place.</div>
</div></div></div></blockquote></div><br>I am doing an overhaul on the bind/remove methods of storemanager to implement the lazy binding idea. These are fixed there.<br>