[PATCH] D103228: [PoC][RISCV] Using pragma to register vector intrinsic

Kito Cheng via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 27 00:33:39 PDT 2021


kito-cheng added inline comments.


================
Comment at: clang/lib/Sema/SemaRISCV.cpp:21
+      PP.getIdentifierTable(), PP.getLangOpts(), Builtin::RISCV_VECTOR_KIND);
+  Builtin::RegisterOverloadBuiltinFunc F = [](Sema &S, const Builtin::Info &BI,
+                                              unsigned ID) {
----------------
craig.topper wrote:
> Can we capture Sema in the lambda capture list here so that it's not really passed to initializeTargetOverloadBuiltins. I don't think forward declaring Sema in Builtins.h is a good idea since the "Basic" library isn't supposed to know about Sema. That probably means you need to use a std::function instead of a function pointer.
Thanks for the input, I am not family with modern C++ since GCC still using limited set of C++98 :P


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103228/new/

https://reviews.llvm.org/D103228



More information about the cfe-commits mailing list