[PATCH] D25796: [CUDA] Create __host__ and device variants of standard allocator declarations.
Justin Lebar via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 21 12:54:10 PDT 2016
jlebar accepted this revision.
jlebar added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lib/Sema/SemaExprCXX.cpp:2596
- QualType FnType = Context.getFunctionType(Return, Params, EPI);
- FunctionDecl *Alloc =
- FunctionDecl::Create(Context, GlobalCtx, SourceLocation(),
- SourceLocation(), Name,
- FnType, /*TInfo=*/nullptr, SC_None, false, true);
- Alloc->setImplicit();
+ auto CreateAllocationFunctionDecl = [&](Attr *ExtraAttr) {
+ QualType FnType = Context.getFunctionType(Return, Params, EPI);
----------------
Oh, I like this way better than a bool arg.
https://reviews.llvm.org/D25796
More information about the cfe-commits
mailing list