[PATCH] D96033: [clang-repl] Land initial infrastructure for incremental parsing
Vassil Vassilev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun May 16 08:48:13 PDT 2021
v.g.vassilev added a comment.
In D96033#2761581 <https://reviews.llvm.org/D96033#2761581>, @hubert.reinterpretcast wrote:
> In D96033#2761428 <https://reviews.llvm.org/D96033#2761428>, @hubert.reinterpretcast wrote:
>
>> If you have some ideas, please let me know. Meanwhile, I am trying out `system-aix` as the "feature" to XFAIL on.
>
> https://reviews.llvm.org/D102560 posted to use `system-aix` so other PPC configurations will run the test. Possible further changes is for the code to choose the process triple, for the test to possibly specify `-fintegrated-as`, and (alternatively) for the system assembler step to be integrated into this use scenario.
Thanks for the fix. Indeed I will commit the change wrt getting the process triple although it may require further adjustments for out-of-process execution.
I'd like to avoid requiring addition of the intricate `fintegrated-as` in the test (but also from users). It seems that the clang driver creates a program action. In cases where we have `fintegrated-as` it appends `-emit-obj` which is then converted to the `frontend::EmitObj` action. In that case clang-repl, just ignores this and replaces it with `frontend::EmitLLVMOnly`. IIUC, AIX has a default `fno-integrated-as` and I am still puzzled (and cannot find the relevant code) what is the program action kind for AIX in that case (`frontend::???`). FWIW, I tried to add some functionality to write it to the diagnostics message but it requires opening too many interfaces.
Maybe applying that diff can give us a hint:
diff --git a/clang/lib/Interpreter/IncrementalParser.cpp b/clang/lib/Interpreter/IncrementalParser.cpp
index 70baabfeb8fb..4c2292e0bde9 100644
--- a/clang/lib/Interpreter/IncrementalParser.cpp
+++ b/clang/lib/Interpreter/IncrementalParser.cpp
@@ -55,6 +55,7 @@ public:
std::errc::state_not_recoverable,
"Driver initialization failed. "
"Incremental mode for action is not supported");
+ printf("ActionKind=%d\n", CI.getFrontendOpts().ProgramAction);
return Act;
case frontend::ASTDump:
LLVM_FALLTHROUGH;
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