[llvm] r233030 - DebugInfo: Overload get() in DIDescriptor subclasses

Duncan P. N. Exon Smith dexonsmith at apple.com
Mon Mar 23 15:09:55 PDT 2015


> On 2015-Mar-23, at 15:00, David Blaikie <dblaikie at gmail.com> wrote:
> 
> 
>    void replaceFunction(Function *F) {
> -    if (auto *N = getRaw())
> +    if (auto *N = get())
> 
> Can we just write that as "auto *N = *this" (not sure if that's better - but I'm wondering how much we need the 'get()' function?)?

I don't mind too much either way, but I find `get()` to be a little
clearer than `*this`.  I feel stronger in other spots, where
`get()->` would be changed to `(*this)->`.  It's a little too easy
to misread that, IMO.



More information about the llvm-commits mailing list