[PATCH] D127284: [clang-repl] Support statements on global scope in incremental mode.

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 4 12:17:41 PST 2022


v.g.vassilev added a comment.

In D127284#3969446 <https://reviews.llvm.org/D127284#3969446>, @v.g.vassilev wrote:

>> UPDATE: fails with clean build too
>>
>> Might be best to revert it for now while we figure out what's wrong
>
> I fail to reproduce it, can you give me access to some node where I can debug? I suspect that should be something easy to fix.
>
> UPDATE: Reproduced it. Debugging.

@Michael137, I think I understand what happens. This patch introduces a new language option which is not benign from modules perspective. However, lldb sets up modules the old way and then switches to the incremental processing mode. We have two ways to fix this:

- Pass `-Xclang -fincremental-extensions` in `ClangModulesDeclVendor.cpp` and delete `instance->getPreprocessor().enableIncrementalProcessing();`; or
- Apply https://reviews.llvm.org/D139258 which already does that.

Can you check if https://reviews.llvm.org/D139258 passes the lldb testsuite. It does pass my reproduction by hand (I still cannot run full of the lldb-api tests)?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D127284



More information about the cfe-commits mailing list