Superfluous dyn_cast in DISubprogram::getFunction()

Yaron Keren yaron.keren at gmail.com
Thu Apr 9 13:27:31 PDT 2015


For your upcoming patch, some helper functions in DI* should be migrated to
the MD hierarchy:

DISubprogram::getFunction()
DIGlobalVariable::getGlobal()
*DIDerivedType::getClassType()
*DIDerivedType::getConstant()
(* already in the TODO:)

Either the new Function *getFunction or the existing one should be renamed.
Thanks!




2015-04-09 21:36 GMT+03:00 Yaron Keren <yaron.keren at gmail.com>:

> Sure, no use in fixing this and another cast in the header file.
>
>
> 2015-04-09 20:06 GMT+03:00 Duncan P. N. Exon Smith <dexonsmith at apple.com>:
>
>>
>> > On 2015-Apr-09, at 08:38, Yaron Keren <yaron.keren at gmail.com> wrote:
>> >
>> > This dyn_cast does not seem to be required.
>> >
>> > Yaron
>> >
>> > <cast.diff>
>>
>> For that matter, the `if (N = get()` above it shouldn't be conditional.
>>
>> Feel free to commit, but as it happens I'm currently working on deleting
>> the entire `DIDescriptor` hierarchy so it won't last long anyway ;).
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150409/935b4b19/attachment.html>


More information about the llvm-commits mailing list