<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 17, 2014 at 11:00 AM, Adrian Prantl <span dir="ltr"><<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Mar 16, 2014, at 11:44, Manman Ren <<a href="mailto:manman.ren@gmail.com">manman.ren@gmail.com</a>> wrote:<br>

<br>
> Author: mren<br>
> Date: Sun Mar 16 13:44:23 2014<br>
> New Revision: 204019<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=204019&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=204019&view=rev</a><br>
> Log:<br>
> Add FIXMEs to use DIScopeRef instead of DIScope for LTO type uniqueing.<br>
><br>
> Modified:<br>
>    llvm/trunk/include/llvm/IR/DebugInfo.h<br>
><br>
> Modified: llvm/trunk/include/llvm/IR/DebugInfo.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfo.h?rev=204019&r1=204018&r2=204019&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DebugInfo.h?rev=204019&r1=204018&r2=204019&view=diff</a><br>

> ==============================================================================<br>
> --- llvm/trunk/include/llvm/IR/DebugInfo.h (original)<br>
> +++ llvm/trunk/include/llvm/IR/DebugInfo.h Sun Mar 16 13:44:23 2014<br>
> @@ -605,6 +605,7 @@ class DIGlobalVariable : public DIDescri<br>
> public:<br>
>   explicit DIGlobalVariable(const MDNode *N = 0) : DIDescriptor(N) {}<br>
><br>
> +  // FIXME: use DIScopeRef for LTO type uniqueing.<br>
>   DIScope getContext() const { return getFieldAs<DIScope>(2); }<br>
<br>
</div>Working on this now. Quick question — shouldn’t these comments rather refer to the getType() functions instead of the lexical scope?<br></blockquote><div><br></div><div>Yes, we should convert DIType to DITypeRef and DIScope to DIScopeRef when applicable (i.e when the scope can be a type with a type identifier).</div>
<div><br></div><div>Thanks,</div><div>Manman</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
-- adrian<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
>   StringRef getName() const { return getStringField(3); }<br>
>   StringRef getDisplayName() const { return getStringField(4); }<br>
> @@ -638,6 +639,7 @@ class DIVariable : public DIDescriptor {<br>
> public:<br>
>   explicit DIVariable(const MDNode *N = 0) : DIDescriptor(N) {}<br>
><br>
> +  // FIXME: use DIScopeRef for LTO type uniqueing.<br>
>   DIScope getContext() const { return getFieldAs<DIScope>(1); }<br>
>   StringRef getName() const { return getStringField(2); }<br>
>   DIFile getFile() const { return getFieldAs<DIFile>(3); }<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br>
</div></div></blockquote></div><br></div></div>