<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 2, 2015 at 10:21 AM, Mehdi Amini <span dir="ltr"><<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> On Mar 2, 2015, at 9:40 AM, Eric Christopher <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>> wrote:<br>
><br>
> Few small comments:<br>
><br>
> a) You've got Function::getDataLayout - I think I'd prefer people to generally have to ask the Function parent to get the data layout. (It's also a little inconsistent in the code, but should be fairly sed'able).<br>
<br>
</span>Not sure I understand what you mean. Are you saying that getDataLayout() should be available on the module only?<br>
Note: I haven’t added this, there is a getDataLayout() in Instruction, BasicBlock, and GlobalValue.<br>
It saves some space when the only thing you have is an instruction:<br>
   I->getParent()->getParent()->getParent()->getDataLayout();</blockquote></div><br>Rather than replicating all of the things we want to dig out of the module at each layer, I'd rather add a "getModule" along side the "getParent".</div></div>