[PATCH] D96033: [clang-repl] Land initial infrastructure for incremental parsing

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 15 04:09:48 PDT 2021


v.g.vassilev added a comment.

In D96033#2760067 <https://reviews.llvm.org/D96033#2760067>, @hubert.reinterpretcast wrote:

> In D96033#2759808 <https://reviews.llvm.org/D96033#2759808>, @v.g.vassilev wrote:
>
>> Hi @hubert.reinterpretcast,
>>
>> Would you mind testing this patch:
>
> Does the test try to generate native object files in some way? There is functionality (with some limitations) for that under 32-bit AIX; however, we're running a 64-bit build and we don't have integrated-as capability for that at this time. This is what I'm seeing:
>
>   ******************** TEST 'Clang :: Interpreter/execute.cpp' FAILED ********************
>   Script:
>   --
>   : 'RUN: at line 1';   cat /home/hstong/.Liodine/llvmproj/clang/test/Interpreter/execute.cpp | /home/hstong/.Nrtphome/.Liodine/llcrossbld/dev/build/bin/clang-repl | /home/hstong/.Nrtphome/.Liodine/llcrossbld/dev/build/bin/FileCheck /home/hstong/.Liodine/llvmproj/clang/test/Interpreter/execute.cpp
>   --
>   Exit Code: 2
>   
>   Command Output (stderr):
>   --
>   clang-repl: Driver initialization failed. Incremental mode for action is not supported
>   FileCheck error: '<stdin>' is empty.
>   FileCheck command line:  /home/hstong/.Nrtphome/.Liodine/llcrossbld/dev/build/bin/FileCheck /home/hstong/.Liodine/llvmproj/clang/test/Interpreter/execute.cpp
>   
>   --
>   
>   ********************

That looks like progress! Thanks a lot for investing the time to do that. I tried to get access to such a machine but we don't have them off the shelf.

The test is supposed to create an incremental Clang and create a JIT. clang-repl will take the original `ProgramAction` was and try to turn it into an incremental action using the `WrappedFrontendAction` and add `EmitLLVMOnlyAction`. That is done here <https://github.com/llvm/llvm-project/blob/fb9ed1979a712a86c246dc136f8134e8e97a883c/clang/lib/Interpreter/IncrementalParser.cpp#L49-L73>.

The diagnostics tells us that we cannot turn some `ProgramAction` into an incremental one. I am wondering what that action is. `clang-repl -Xcc -v` should be able to tell us.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96033



More information about the cfe-commits mailing list