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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 28 08:03:40 PDT 2023


aaron.ballman added a comment.

In D156172#4540025 <https://reviews.llvm.org/D156172#4540025>, @brendandahl wrote:

> I looked into the above issue with mixing declarations and definitions and I think I can fix that by leaving the AddGlobalAnnotations call in EmitGlobalFunctionDefinition and only calling AddGlobalAnnotations from GetOrCreateLLVMFunction when it's for a definition.  However, with that I'm running into some duplicate annotations being created with C++ templates that I need to fix.
>
> While looking into the duplicate annotations, I noticed someone else already implemented annotations for declarations <https://reviews.llvm.org/D111109>, but it was rolled back.

I *thought* this seemed familiar! :-D Be sure to add the test case from the rolled-back review to make sure your patch doesn't trip on the same issue.


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