[PATCH] D110484: [clang-repl] Allow loading of plugins in clang-repl.

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 4 22:22:18 PDT 2021


v.g.vassilev added inline comments.


================
Comment at: clang/include/clang/Frontend/CompilerInstance.h:223
+  void LoadRequestedPlugins();
+
   /// }
----------------
sgraenitz wrote:
> This could have a minimal doxygen comment now that it's part of the public interface.
I somewhat hesitate to make this interface public. It needs to be called at a very specific time during the construction of the compiler instance, however all this is true for many of the existing interfaces.

Doxygen docs added.


================
Comment at: clang/test/Interpreter/plugins.cpp:5
+// RUN:            'extern "C" int printf(const char*,...);' \
+// RUN:            'auto r1 = printf("i = %d\n", i);' 2>&1 | FileCheck %s
+// REQUIRES: host-supports-jit, plugins, examples
----------------
sgraenitz wrote:
> You could write the code interleaved with the check-lines below and then do:
> ```
> // RUN: cat %s | clang-repl | FileCheck %s
> ```
> 
> Is there a good reason not to do so?
That saves me one `quit` command. Jokes aside, I had a weird problem when clang-repl processed the extra special chars in the RUN clauses.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110484



More information about the cfe-commits mailing list