[PATCH] D156172: [clang][CodeGen] Emit annotations for function declarations.

Brendan Dahl via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 25 12:25:48 PDT 2023


brendandahl added a comment.

A little more context for the new reviewers. Over in this patch <https://reviews.llvm.org/D150803> I added support for annotations to be emitted into WebAssembly. We'd like to use this to mark imported (declarations) and exported (definitions) of functions with special attributes.

In D156172#4531885 <https://reviews.llvm.org/D156172#4531885>, @aaron.ballman wrote:

> The changes seem reasonable to me given that the annotation attribute is used to squirrel data from the frontend to the backend (including via plugin attributes) and so its usage is pretty general. But I'd like a second opinion given that this attribute has only passed data along for function definitions for a *long* time. I'm not certain if changing this will cause surprises for the backend.

Interestingly, I noticed the original patch <https://github.com/llvm/llvm-project/commit/5a6b6987dcb4592427f4f3fcee9b7ce5dd3ba4fe#diff-5300f14b89f31842d5ac41ae7fecb06112af1bff099c8614b1d4780169abbea5R11> that added annotations had support for merging annotations of declarations and definitions.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156172/new/

https://reviews.llvm.org/D156172



More information about the cfe-commits mailing list