rsmith accepted this revision. ================ Comment at: lib/AST/ItaniumMangle.cpp:504 @@ +503,3 @@ + if (FD->hasAttr<CUDADeviceAttr>() && FD->hasAttr<CUDAHostAttr>()) + Out << "Ua6deviceUa4host"; + ---------------- If we have `enable_if` on a `__host__` `__device__` function, I think we should mangle as `Ua6deviceUa9enable_ifI...EUa4host`. (The relative order of `enable_if` attributes matters, but the order of them relative to `host` and `device` does not, so retaining alphabetical order seems best.)
================ Comment at: lib/Sema/SemaCUDA.cpp:216 @@ +215,3 @@ + Sema &S, const FunctionDecl *Caller, llvm::SmallVectorImpl<T> &Matches, + std::function<const FunctionDecl *(const T)> FetchDecl) { + assert(S.getLangOpts().CUDATargetOverloads && ---------------- We don't need the overhead of `std::function` here. Use this instead: template<typename T, typename FetchDeclFn> static void Erase...( ..., FetchDeclFn FetchDecl) { http://reviews.llvm.org/D12453 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits