rnk added a comment.
Nice! Looks like this wasn't too bad.
================
Comment at: clang/lib/Sema/SemaCUDA.cpp:546
+ // Externally-visible and similar functions are always emitted.
+ if (S.getASTContext().GetGVALinkageForFunction(FD) > GVA_DiscardableODR)
+ return true;
----------------
There are two other instances of conditions equivalent to this in
`ASTContext::DeclMustBeEmitted`. You should add a predicate like
`isDiscardableGVALinkage(GVALinkage)` to Linkage.h and call it in
`DeclMustBeEmitted`.
================
Comment at: clang/lib/Sema/SemaCUDA.cpp:654
+
+ for (FunctionDecl *Callee : CGIt->second) {
+ if (Seen.count(Callee) || IsKnownEmitted(S, Callee))
----------------
This is iterating a DenseSet of pointers, so it'll be non-determinstic. Use
SetVector to get a determinstically ordered set.
https://reviews.llvm.org/D25541
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits