Re: Spelling change in LLVM 14 API - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Spelling change in LLVM 14 API
Date
Msg-id CA+hUKG+9ZGWJqTDGE0WyJV_HXmS4DzpQdTbAAQC_V8JKM07oMw@mail.gmail.com
Whole thread Raw
In response to Re: Spelling change in LLVM 14 API  (Andres Freund <andres@anarazel.de>)
Responses Re: Spelling change in LLVM 14 API
List pgsql-hackers
On Mon, Aug 30, 2021 at 5:41 AM Andres Freund <andres@anarazel.de> wrote:
> -       if (F.getAttributes().hasFnAttribute(llvm::Attribute::NoInline))
> +       if (F.getAttributes().hasAttribute(llvm::Attribute::FunctionIndex, llvm::Attribute::NoInline))

Yeah, that's already stopped working since you wrote it a few weeks
ago... There's also been a second breakage site in our code due to
LLVM commit 85b732b5.  New fix attached.  Tested on LLVM 7, 9, 13, 14
(= LLVM main branch commit 945df8bc4cf3 built 2021-09-15).

Even though the macro approach is ugly, we're already handling every
other API change that way, and at least it's at least very clear which
lines to delete in a few years when older LLVMs fall off the conveyor
belt of time.  Admittedly renaming an identifiers is a new kludge, but
I didn't want to duplicate the whole if block or confuse pgindent.

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Gather performance analysis
Next
From: Masahiko Sawada
Date:
Subject: Re: Skipping logical replication transactions on subscriber side