yaxunl marked 9 inline comments as done.
yaxunl added inline comments.

================
Comment at: clang/include/clang/AST/GlobalDecl.h:61
     assert(!isa<CXXDestructorDecl>(D) && "Use other ctor with dtor decls!");
+    assert(!D->hasAttr<CUDAGlobalAttr>() && "Use other ctor with HIP 
kernels!");
 
----------------
tra wrote:
> Wording inconsitency -- we're checking for `CUDAGlobalAttr` but complaining 
> about 'HIP kernels'. Just drop 'HIP' or replace with 'GPU'?
will use GPU kernel


================
Comment at: clang/lib/CodeGen/CGCUDARuntime.h:69
   virtual llvm::Function *makeModuleDtorFunction() = 0;
-
-  /// Construct and return the stub name of a kernel.
-  virtual std::string getDeviceStubName(llvm::StringRef Name) const = 0;
+  virtual std::string getDeviceSideName(const Decl *ND) = 0;
 };
----------------
tra wrote:
> Adding a descriptive comment would be great. Otherwise anyone looking at the 
> function decl without the context of this patch will be puzzled about its 
> meaning and purpose.
> 
> Also, perhaps the argument type should be a `NamedDecl` -- the function is 
> not used on or useful for regular `Decl`. It will save us few casts in other 
> places, too.
done


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68578/new/

https://reviews.llvm.org/D68578



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to