This is an archive of the discontinued LLVM Phabricator instance.

[clang] Do not require GNUInlineAttr for inline builtins
ClosedPublic

Authored by serge-sans-paille on Mar 31 2023, 2:00 AM.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMar 31 2023, 2:00 AM
serge-sans-paille requested review of this revision.Mar 31 2023, 2:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 31 2023, 2:00 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

I don't feel particularly qualified to review this, but my reading of the GCC docs suggest that this attribute should only impact debug information and nothing else about codegen. However, FunctionDecl::isInlineBuiltinDeclaration() is used within CodeGenFunction::GenerateCode() and so I wonder if the change is correct or not.

I'd be fine with just dropping the check for GNUInline.

serge-sans-paille retitled this revision from [clang] Consider artificial always inline builtin as inline builtins to [clang] Do not require GNUInlineAttr for inline builtins.

DO not require gnu inline, period.

This revision is now accepted and ready to land.Apr 12 2023, 10:47 AM
jyu2 added a subscriber: jyu2.Apr 18 2023, 9:16 PM

This change seems cause assert:

https://godbolt.org/z/z9G87Wr37

jsji added a subscriber: jsji.Apr 19 2023, 7:42 AM

This change seems cause assert:

https://godbolt.org/z/z9G87Wr37

I can reproduce, investigating...