<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div></div><div><br><div><div><div>On Dec 9, 2010, at 18:32, Chris Lattner wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Dec 9, 2010, at 4:50 AM, Garrison Venn wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Is there a reason that RecordKeeper:: getAllDerivedDefinitions(...)implementation </div></blockquote></div></div></blockquote><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>accesses the global Records instance instead of just referencing itself?<div><br></div><div>As far as I can tell from the usage:</div><div><br></div><div>1) Records has the linkage as extern RecordKeeper Records in Record.h</div><div>2) Is instantiated as a global in TableGen</div><div>3) All llvm uses of getAllDerivedDefinitions SEEM to be manifested as a </div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>message to this global RecordKeeper</div></div><div><br></div></blockquote>In short getAllDerivedDefinitions(...) sort of (non-static) treats RecordKeeper <div>as a singleton but it is never accessed this way. It is always accessed via</div><div>the global: Records.</div></div></blockquote><br></div><div>Hi Garrison,</div><div><br></div><div>There is no good reason.  This is one of many instances of tblgen just being poorly designed because noone gives it much love.  It would be great if you could send in or commit a patch to tidy this up, thanks!</div><div><br></div><div>-Chris</div><br></div></blockquote></div><br></div></div></body></html>