[PATCH] D47201: [CUDA] Implement nv_weak attribute for functions

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 1 10:45:41 PDT 2018


aaron.ballman added a comment.

In https://reviews.llvm.org/D47201#1119249, @tra wrote:

> IIUIC, nv_weak is a synonym for weak (<rant>why, oh why did they need it?</rant>)
>  You may need to hunt down and change few other places that deal with the weak attribute.
>  E.g.: https://github.com/llvm-project/llvm-project-20170507/blob/master/clang/lib/AST/Decl.cpp#L4267
>  https://github.com/llvm-project/llvm-project-20170507/blob/master/clang/lib/CodeGen/ItaniumCXXABI.cpp#L3045


If it is truly a synonym for weak, then a better implementation would be to make no semantic distinction between the two attributes -- just add new spellings to weak. If you need to make minor distinctions between the spellings, you can do it using accessors on the attribute.



================
Comment at: include/clang/Basic/Attr.td:1515
   let LangOpts = [CUDA];
+  let Documentation = [Undocumented];
 }
----------------
No new, undocumented attributes, please.


Repository:
  rC Clang

https://reviews.llvm.org/D47201





More information about the cfe-commits mailing list