[LLVMdev] what are those *Ref used for

Hui Zhang wayne.huizhang at gmail.com
Fri Feb 20 13:25:10 PST 2015


Hi, all

Is there anyone who can address this question for me ? really appreciate ...

On Fri, Feb 20, 2015 at 1:09 PM, Hui Zhang <wayne.huizhang at gmail.com> wrote:

> Hello,
>
> I'm a little confused about the DIScopeRef ,or other names end with
> Ref...Why and when shall we use them ?
>
> Like StringRef, it has a function str() to change it to normal
> std::string, but DIScopeRef, its full definition is:
>
> typedef DIRef<DIScope> <http://llvm.org/docs/doxygen/html/classllvm_1_1DIRef.html> DIScopeRef <http://llvm.org/docs/doxygen/html/namespacellvm.html#ad3fed63164a27d11963083c621293298>
>
> DIRef: Represents reference to a DIDescriptor <http://llvm.org/docs/doxygen/html/classllvm_1_1DIDescriptor.html>. abstracts over direct and identifier-based metadata references.
>
>
> ​Therefore, when I get a DIScopeRef dsf, shall I just treat it just like
> DIScope ? means I can directly call dsf.func(), where func() represents all
> the member functions of DIScope, right ??
>
> Thanks​
>
> --
> Best regards
>
>
> Hui Zhang
>



-- 
Best regards


Hui Zhang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150220/e54e480b/attachment.html>


More information about the llvm-dev mailing list