<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div></div><br><div><div>On 21 Jan 2013, at 18:48, Jordan Rose <<a href="mailto:jordan_rose@apple.com">jordan_rose@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 20, 2013, at 9:00 , Richard <<a href="mailto:tarka.t.otter@googlemail.com">tarka.t.otter@googlemail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><blockquote type="cite"><div>+</div><div>+  void setWeakSymbol(const SymbolExtent *S) {</div><div>+    // Only weak functions can have symbols.</div><div>+    assert(cast<ValueDecl>(FD)->isWeak());</div><div>+    WeakSym = S;</div><div>+  }</div></blockquote><div><br></div><div>MemRegions need to be immutable, so the setWeakSymbol() is not going to work.  Can we just have the symbol associated with the FunctionTextRegion when it gets created?</div></div></blockquote><div><br></div><div>I would like to do this, but I don't see how it is possible easily. The SymbolExtent requires the FunctionTextRegion in its constructor, and I don't see a nice way to get hold of the SymbolManager in the FunctionTextRegions constructor to create it. Any suggestions here?</div></div></blockquote><div><br></div><div>My new thought on this is that this should just be created lazily by SValBuilder and that it doesn't even need to live on the region. SValBuilder::getWeakSymbolForRegion, or something like that. </div><div><br></div><div>I'll talk to Anna and Ted about what to rename SymbolExtent and SymbolMetadata to properly include this new usage; if you have any opinions, I'd love to hear them!</div><div><br></div><div>SymbolExtent:</div><div>- based on the region itself</div><div>- does not get invalidated</div><div>- live as long as the region is live (in theory)</div><div><br></div><div>SymbolMetadata:</div><div>- based on the region contents</div><div>- is invalidated along with region contents</div><div>- live as long as the region is live <i>and</i> some checker is interested</div><div><br></div><div>Jordan</div></div></div></blockquote></div><br></body></html>