Anastasia added inline comments.

================
Comment at: lib/CodeGen/CGBuiltin.cpp:2491
+    llvm::Value *Range = NDRangeL.getAddress().getPointer();
+    llvm::Type *RangeTy = NDRangeL.getAddress().getType();
 
----------------
I think following standard Clang CodeGen convention we should add byval 
attribute for structs. 

However, I am not sure if the best approach would be to use classifyType(...) 
of ABIInfo and then check what type of argument passing ABIArgInfo returns 
(direct/indirect/byval). Based on this we could add an attr 
llvm::Attribute::ByVal to the argument. Perhaps, this should be done with all 
arguments then. Or I am wondering if better approach would be to just use 
GetOrCreateLLVMFunction() helper from CodeGen!

Does anyone have any suggestion here?



https://reviews.llvm.org/D28058



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

Reply via email to