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

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 27 00:04:06 PDT 2021


craig.topper 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) {
----------------
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.


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