[PATCH] D92800: [Clang] Make nomerge attribute a function attribute as well as a statement attribute.
Zequan Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 10 16:37:38 PST 2020
zequanwu added inline comments.
================
Comment at: clang/test/CodeGen/attr-nomerge.cpp:17
+
+[[clang::nomerge]] bool bar() {
+ return true;
----------------
rnk wrote:
> zequanwu wrote:
> > rnk wrote:
> > > I would leave this declaration as it was, so that all the statement attribute test cases you wrote below remain as they were, and the attribute continues to appear at the call site.
> > >
> > > The `f` declaration below gives you coverage of the free function declaration case.
> > I added `[[clang::nomerge]]` to `bar` in order to test that the generated IR should attach `nomerge` to call-sites which callee function already has this attribute.
> Well, from the tests below, it seems like the attribute is *not* present on the call sites. Is that what you intended?
oops, I meant "shouldn't attach", because it's not necessary to have it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92800/new/
https://reviews.llvm.org/D92800
More information about the cfe-commits
mailing list