[PATCH] D68746: [Clang][OpenMP Offload] Move offload registration code to the wrapper
Sergey Dmitriev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 10 15:03:17 PDT 2019
sdmitriev added inline comments.
================
Comment at: clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp:174
+ /// Global variable that represents BinDesc is returned.
+ GlobalVariable *createBinDesc(ArrayRef<ArrayRef<char>> Bufs) {
+ // Create external begin/end symbols for the offload entries table.
----------------
ABataev wrote:
> Why `ArrayRef<char>`, not `StringRef`? It has a constructor for pointer/length pair.
Well, in this context StringRef type would be similar to ArrayRef<char>, but with extra operations for string manipulations. Since we know that device images are not strings, we do not really need any string operations for image buffers and therefore I think ArrayRef<char> is a better choice here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68746/new/
https://reviews.llvm.org/D68746
More information about the cfe-commits
mailing list