eliben added inline comments. ================ Comment at: include/clang/Basic/Builtins.h:85 @@ +84,3 @@ + /// \brief Return true if this function is a target-specific builtin + bool isTSBuiltin(unsigned ID) const { + return ID >= Builtin::FirstTSBuiltin; ---------------- You can also use it in SemaChecking now
================ Comment at: lib/Sema/SemaDecl.cpp:11166 @@ +11165,3 @@ + !FD->hasAttr<CUDADeviceAttr>() && !FD->hasAttr<CUDAHostAttr>()) { + if (getLangOpts().CUDAIsDevice) + FD->addAttr(CUDADeviceAttr::CreateImplicit(Context, FD->getLocation())); ---------------- It is not immediately clear why you would mark target-specific builtins as __host__ in host compilation mode. So for example __builtin_ptx_read_tid_x would be callable from a host function when compiling in host mode? Can you clarify this with a comment here, and also add a relevant test? http://reviews.llvm.org/D12122 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits