[PATCH] D36904: Add llvm.codeview.annotation to implement MSVC __annotation

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 18 17:25:32 PDT 2017


rnk added a comment.

In https://reviews.llvm.org/D36904#846066, @majnemer wrote:

> I wonder if the right way to model it is with inaccessiblememonly?


Oh, I forgot about that.

In general, I was just aiming for something conservatively correct that would survive the optimizer at all costs. It should be code generated at most once (so noduplicate). In practice, MSVC removes annotations during inlining, and does not appear to duplicate them in any other way. We could try lambdas or other tricks that force them to double-emit them, though.


https://reviews.llvm.org/D36904





More information about the llvm-commits mailing list