[clang] [llvm] [mlir] [polly] [NFC] Rename `Intrinsic::getDeclaration` to `getOrInsertDeclaration` (PR #111752)

Rahul Joshi via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 11 14:55:25 PDT 2024


jurahul wrote:

That’s a possibility. I was trying to keep the naming consistent with
similar functions in the Module class.  But if folks feel its too much
churn and are ok with the inconsistent naming convention, I am fine with
reverting it and going with the naming scheme proposed above.

On Fri, Oct 11, 2024 at 2:51 PM Nikita Popov ***@***.***>
wrote:

> TBH I am wondering if we should revert this rename. I don't think it's a
> good idea to reuse getDeclaration with substantially different semantics,
> and if we're not reusing it, then there's not much point to rename...
>
> Instead of having getOrInsertDeclaration + getDeclaration with a meaning
> inversion, we can have getDeclaration and getDeclarationIfExists without
> the inversion.
>
>> Reply to this email directly, view it on GitHub
> <https://github.com/llvm/llvm-project/pull/111752#issuecomment-2408164255>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/APRMUB7YY3H7PL3DQAD3MOTZ3BB57AVCNFSM6AAAAABPVHZ3QGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBYGE3DIMRVGU>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>


https://github.com/llvm/llvm-project/pull/111752


More information about the cfe-commits mailing list