This is an archive of the discontinued LLVM Phabricator instance.

[clang-repl] Allow loading of plugins in clang-repl.
ClosedPublic

Authored by v.g.vassilev on Sep 25 2021, 10:34 AM.

Diff Detail

Event Timeline

v.g.vassilev created this revision.Sep 25 2021, 10:34 AM
v.g.vassilev requested review of this revision.Sep 25 2021, 10:34 AM
v.g.vassilev updated this revision to Diff 375050.

add forgotten test file

Two minor comments. Otherwise LGTM.

clang/include/clang/Frontend/CompilerInstance.h
223

This could have a minimal doxygen comment now that it's part of the public interface.

clang/test/Interpreter/plugins.cpp
6

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?

rsmith added a comment.Oct 4 2021, 1:35 PM

LGTM modulo existing comments.

v.g.vassilev marked 2 inline comments as done.

Address comments.

This revision was not accepted when it landed; it landed in state Needs Review.Oct 4 2021, 10:21 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2021, 10:21 PM
v.g.vassilev added inline comments.Oct 4 2021, 10:22 PM
clang/include/clang/Frontend/CompilerInstance.h
223

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.

clang/test/Interpreter/plugins.cpp
6

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.