[clang] [clang-repl] [codegen] Reduce the state in TBAA. NFC for static compilation. (PR #98138)

2024-07-27 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Hi @AaronBallman, could we move that forward? https://github.com/llvm/llvm-project/pull/98138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-17 Thread Vassil Vassilev via cfe-commits
@@ -905,6 +912,7 @@ void Preprocessor::Lex(Token ) { // This token is injected to represent the translation of '#include "a.h"' // into "import a.h;". Mimic the notional ';'. case tok::annot_module_include: +case tok::annot_repl_input_end:

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-12 Thread Vassil Vassilev via cfe-commits
@@ -905,6 +912,7 @@ void Preprocessor::Lex(Token ) { // This token is injected to represent the translation of '#include "a.h"' // into "import a.h;". Mimic the notional ';'. case tok::annot_module_include: +case tok::annot_repl_input_end:

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-07-12 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/94166 >From d2d533d0962e4260f052179c199a2e5ebe44edb1 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Thu, 30 May 2024 05:05:41 + Subject: [PATCH 1/2] [clang-repl] Teach clang-repl how to load PCHs. ---

[clang] [clang-repl] [codegen] Reduce the state in TBAA. NFC for static compilation. (PR #98138)

2024-07-09 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > Would it be possible to add a test case? Good point. Forgot to `git add` it. > Could you add a bit more detail how different mange contexts cause crashes in > TBAA? On a high level clang's CodeGen is designed to work with a single llvm::Module. However, incremental

[clang] [clang-repl] [codegen] Reduce the state in TBAA. NFC for static compilation. (PR #98138)

2024-07-09 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/98138 >From 734f8d80a92a957efbcbf3755b2dd35383745ddf Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Tue, 9 Jul 2024 09:30:19 + Subject: [PATCH] [clang-repl] [codegen] Reduce the state in TBAA. NFC for

[clang] [clang-repl] [codegen] Reduce the state in TBAA. NFC for static compilation. (PR #98138)

2024-07-09 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/98138 >From a8cdff404d81a677f696280d765b4b1c398b66ce Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Tue, 9 Jul 2024 09:30:19 + Subject: [PATCH] [clang-repl] [codegen] Reduce the state in TBAA. NFC for

[clang] [clang-repl] [codegen] Reduce the state in TBAA. NFC for static compilation. (PR #98138)

2024-07-09 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev created https://github.com/llvm/llvm-project/pull/98138 In incremental compilation clang works with multiple `llvm::Module`s. Our current approach is to create a CodeGenModule entity for every new module request (via StartModule). However, some of the state such

[clang] [clang][docs] Move entries around (PR #97416)

2024-07-02 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Thank you! https://github.com/llvm/llvm-project/pull/97416 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support C++20 Modules in clang-repl (PR #79261)

2024-07-02 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Oh, understood. Perhaps would be better if you move it. I am currently on vacation for a while… https://github.com/llvm/llvm-project/pull/79261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Support C++20 Modules in clang-repl (PR #79261)

2024-07-02 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Do you mean the documentation? If so, yes, that’s probably not the right place. I am on my phone but can you suggest a place where we should move this or just move it? I think that was an oversight. https://github.com/llvm/llvm-project/pull/79261

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-07-02 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/86402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-07-02 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/86402 >From ac273dc784a356f6b61e0928b02cdd74418846ce Mon Sep 17 00:00:00 2001 From: Anubhab Ghosh Date: Sat, 23 Mar 2024 15:13:57 + Subject: [PATCH] [clang-repl] Support wasm execution. This commit introduces

[clang] [clang-repl] Fix RuntimeInterfaceBuilder for 32-bit systems (PR #97071)

2024-06-29 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gr=C3=A4nitz?= Message-ID: In-Reply-To: https://github.com/vgvassilev approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/97071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-06-28 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Thank you for letting this move forward! https://github.com/llvm/llvm-project/pull/86402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix RuntimeInterfaceBuilder for 32-bit systems (PR #97071)

2024-06-28 Thread Vassil Vassilev via cfe-commits
@@ -673,10 +673,12 @@ class InterfaceKindVisitor } private: - // Force cast these types to uint64 to reduce the number of overloads of - // `__clang_Interpreter_SetValueNoAlloc`. + // Force cast these types to the uint that fits the register size. That way we + //

[clang] [clang-repl] Fix RuntimeInterfaceBuilder for 32-bit systems (PR #97071)

2024-06-28 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. Oh, that's a good catch. Any chance of adding a test case? Maybe something like: ```enum X : short {...}```? https://github.com/llvm/llvm-project/pull/97071 ___ cfe-commits mailing list

[clang] [clang-repl] Fix RuntimeInterfaceBuilder for 32-bit systems (PR #97071)

2024-06-28 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev edited https://github.com/llvm/llvm-project/pull/97071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-13 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Our current theory is that somehow the build system does not mark this symbol as exported. Maybe we can confirm that by making the symbol resolution for that particular one via the JIT absolute symbol definition. This is rather a workaround and the real fix should be in the

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-12 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > So actually even the `export_executable_symbols_for_plugins` doesn't fix our > bots. I've narrowed it down to `-DLLVM_ENABLE_PIC=ON/OFF`. Perhaps we're not > exporting symbols when `-DLLVM_ENABLE_PIC=OFF`. That’s quite strange. Is that somehow related to ld64? @lhames

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-10 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > Would dropping this conditional make it work for your case? > > I don't have a mac handy to try it right now. If you commit it, our system > will test it automatically :) Or maybe @Thakis could give it a try? I am on my phone in the next couple of hours and I am not sure

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-10 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Ah, that’s well spotted. The current test should not require plugins. Would dropping this conditional make it work for your case? https://github.com/llvm/llvm-project/pull/89811 ___ cfe-commits mailing list

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-06-10 Thread Vassil Vassilev via cfe-commits
@@ -0,0 +1,14 @@ +// REQUIRES: host-supports-jit +// UNSUPPORTED: system-aix + +// RUN: rm -f %t.pch +// RUN: %clang_cc1 -fmax-type-align=16 -pic-level 2 -fdeprecated-macro -stack-protector 1 -fblocks -fskip-odr-check-in-gmf -fexceptions -fcxx-exceptions -fgnuc-version=0

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-10 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > You can debug it by cross-compiling a debug build, then running the unit > tests binary and connecting to qemu's built in gdbserver. The Arm toolchain > might have a copy of gdb in it already, but if not, gdb multiarch and lldb > would also work (which are both installable

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-07 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Perhaps we can disable this platform if we have a way to express the setup in lit. https://github.com/llvm/llvm-project/pull/89811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-07 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Could be. Is there a way for me to debug this? https://github.com/llvm/llvm-project/pull/89811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-06 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > Not sure, nothing in cmake cmd: > > ``` > cmake -DLLVM_APPEND_VC_REV=OFF -GNinja -DCMAKE_BUILD_TYPE=Release > -DLLVM_CCACHE_BUILD=ON -DLLVM_USE_LINKER=lld -DLLVM_ENABLE_ASSERTIONS=ON > -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF >

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-06 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Very strange. I did not see a lot of platforms failing. If we decide to keep that commit, is there a way to disable this test for exactly that platform? https://github.com/llvm/llvm-project/pull/89811 ___ cfe-commits mailing list

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-06 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > It's broken here https://lab.llvm.org/buildbot/#/builders/236/builds/11633 It seems broken for a different reason. Somehow we did not export that `__clang_Interpreter_SetValueNoAlloc` symbol. Is that some `-fvisibility=hidden` build?

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-06 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > So I am wondering if someone of the assumptions about types being larger than > one another do not hold on 32 bit. Or your change has exposed an existing > issue, it wouldn't be the first time. My feeling is the latter but how can we get a debug build and debug?

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-06 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Is the bot configured to build for arm64 and run on arm32 somehow? But in either case the width of the `int` type should be the same, right? https://github.com/llvm/llvm-project/pull/89811 ___ cfe-commits mailing list

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-06 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/89811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-05 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/89811 >From 0c1c53e7d12bf8398c1a18dca2fa472a1b7acb3f Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Tue, 23 Apr 2024 19:33:00 + Subject: [PATCH] [clang-repl] Lay the foundation of pretty printing for C.

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-05 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/89811 >From eb5d2ec5bb77626542671ac713714e723f66d62d Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Tue, 23 Apr 2024 19:33:00 + Subject: [PATCH] [clang-repl] Lay the foundation of pretty printing for C.

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-06-05 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: @AaronBallman do we have access to some existing bot to set it up as @argentite suggests? https://github.com/llvm/llvm-project/pull/86402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Fix clang reject valid C++ code after d999ce0302f06d250f6d496b56a5a5f (PR #94471)

2024-06-05 Thread Vassil Vassilev via cfe-commits
@@ -413,7 +413,9 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit ) { if (!ND) continue; // Check if we need to clean up the IdResolver chain. -if (ND->getDeclName().getFETokenInfo()) +if (ND->getDeclName().getFETokenInfo() && +

[clang] Fix clang reject valid C++ code after d999ce0302f06d250f6d496b56a5a5f (PR #94471)

2024-06-05 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > Oh, we need to adjust > > https://github.com/root-project/root/blob/be5d34934de883270683030b3af2cd1195d17ea8/cmake/modules/RootMacros.cmake#L272 > > to skip in case of C++... > > The link points to an irrelevant project, I assume you mean here >

[clang] Fix clang reject valid C++ code after d999ce0302f06d250f6d496b56a5a5f (PR #94471)

2024-06-05 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Oh, we need to adjust https://github.com/root-project/root/blob/be5d34934de883270683030b3af2cd1195d17ea8/cmake/modules/RootMacros.cmake#L272 to skip in case of C++... https://github.com/llvm/llvm-project/pull/94471 ___ cfe-commits

[clang] Fix clang reject valid C++ code after d999ce0302f06d250f6d496b56a5a5f (PR #94471)

2024-06-05 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM, can you include the produced errors and the steps to reproduce the failure in the commit log? Or refer to the github post describing it? https://github.com/llvm/llvm-project/pull/94471

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-06-05 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > Out of curiosity, in what context you use -fincremental-extensions? > > The code snippet I provided is extracted from our internal test. We have an > internal clang-tool (with the `incremental-extensions` on) to generate headers I am a bit overwhelmed right now, are you

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-06-05 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > > > @AaronBallman, to be fair, clang is testing the wasm features in terms > > > > of output. So this is wiring up a bunch of tested features that will > > > > allow execution. Clang generally does not test execution but output, so > > > > we are not creating a precedent

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-06-05 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > Thanks for the prompt response. I think limiting it to C-only will fix the > issue (note that there is no `C` in `LangOpts`, you may want to use > `!getLangOpts().CPlusPlus` to exclude C++). Makes sense. If that works for you, we can check this in. I want to somehow

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-06-05 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: I realize I do not entirely understand the role of the IdResolver chain in c++. Perhaps we are better of changing this line to: ```cpp if (!PP.isIncrementalProcessingEnabled() || getLangOpts().ObjC) IdResolver.RemoveDecl(D); ``` to ``` if

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-06-05 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: @hokein, ah, that's annoying. Can you provide the entire proprocessed file that does not work? I'd like to bisect and debug. https://github.com/llvm/llvm-project/pull/89804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-06-05 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > > > @AaronBallman, to be fair, clang is testing the wasm features in terms > > > > of output. So this is wiring up a bunch of tested features that will > > > > allow execution. Clang generally does not test execution but output, so > > > > we are not creating a precedent

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-06-05 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > @AaronBallman, to be fair, clang is testing the wasm features in terms of > > output. So this is wiring up a bunch of tested features that will allow > > execution. Clang generally does not test execution but output, so we are > > not creating a precedent here since that

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-06-05 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: @AaronBallman, to be fair, clang is testing the wasm features in terms of output. So this is wiring up a bunch of tested features that will allow execution. Clang generally does not test execution but output, so we are not creating a precedent here since that PR can be

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-06-05 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: That would make sense. I am not sure if we can set a post commit bot though. @argentite what do you think? https://github.com/llvm/llvm-project/pull/86402 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-06-05 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Hi @AaronBallman, we need some leadership here. This pull request teaches clang-repl to work inside a browser. It enables webassembly [xeus-cpp](https://github.com/compiler-research/xeus-cpp) (through clang-repl) which connects to the JupyterLite infrastructure. This change

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-06-05 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/86402 >From e1e3b1ec07133fb67b4f98c6696e330fdedf2460 Mon Sep 17 00:00:00 2001 From: Anubhab Ghosh Date: Sat, 23 Mar 2024 15:13:57 + Subject: [PATCH] [clang-repl] Support wasm execution. This commit introduces

[clang] [clang-tools-extra] [libcxx] Reland "[clang] Enable sized deallocation by default in C++14 onwards" (PR #90373)

2024-06-05 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: It seems we have troubles with exporting the right symbols on windows. I am cc-ing @compnerd and @fsfod for more expertise. https://github.com/llvm/llvm-project/pull/90373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-06-04 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/89811 >From 3094e6026925ebcba6da86dd16111f4f70f9a700 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Tue, 23 Apr 2024 19:33:00 + Subject: [PATCH] [clang-repl] Lay the foundation of pretty printing for C.

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-06-04 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: @jasonmolenda, I struggled quite a bit in reproducing the test failures and everything but I have a fix. Thanks a lot for your time and I hope the fix works! https://github.com/llvm/llvm-project/pull/89804 ___ cfe-commits mailing

[clang] d999ce0 - Reland "[clang-repl] Extend the C support. (#89804)"

2024-06-04 Thread Vassil Vassilev via cfe-commits
Author: Vassil Vassilev Date: 2024-06-04T13:55:03Z New Revision: d999ce0302f06d250f6d496b56a5a5f2dc331e61 URL: https://github.com/llvm/llvm-project/commit/d999ce0302f06d250f6d496b56a5a5f2dc331e61 DIFF: https://github.com/llvm/llvm-project/commit/d999ce0302f06d250f6d496b56a5a5f2dc331e61.diff

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-06-03 Thread Vassil Vassilev via cfe-commits
@@ -138,6 +138,8 @@ namespace { assert(!M && "Replacing existing Module?"); M.reset(new llvm::Module(ExpandModuleName(ModuleName, CodeGenOpts), C)); + IRGenFinished = false; vgvassilev wrote: It's a double negation: it is /not/ finished when

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-06-03 Thread Vassil Vassilev via cfe-commits
@@ -282,6 +288,8 @@ namespace { } void HandleTranslationUnit(ASTContext ) override { + IRGenFinished = true; vgvassilev wrote: Good point. I guess I was avoiding this early return which I have now removed. In fact this change fixed some of the

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-06-03 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/94166 >From 896f3090ca2eadf650459caee9a4106fc7dd381d Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Thu, 30 May 2024 05:05:41 + Subject: [PATCH 1/2] [clang-repl] Teach clang-repl how to load PCHs. ---

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-06-02 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/86402 >From 6b94e0cd67e59a7fcde2a327d6565a3850dc5f50 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Thu, 30 May 2024 05:08:17 + Subject: [PATCH 1/2] Revert "Revert "[clang-repl] Extend the C support.

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-06-02 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/86402 >From 4434ceeef152b95998ebd0a3b09a56d105490c4d Mon Sep 17 00:00:00 2001 From: Anubhab Ghosh Date: Sat, 23 Mar 2024 15:13:57 + Subject: [PATCH 1/3] [clang-repl] Support wasm execution. This commit

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-06-02 Thread Vassil Vassilev via cfe-commits
@@ -0,0 +1,14 @@ +// REQUIRES: host-supports-jit +// UNSUPPORTED: system-aix + +// RUN: rm -f %t.pch +// RUN: %clang_cc1 -fmax-type-align=16 -pic-level 2 -fdeprecated-macro -stack-protector 1 -fblocks -fskip-odr-check-in-gmf -fexceptions -fcxx-exceptions -fgnuc-version=0

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-06-02 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev created https://github.com/llvm/llvm-project/pull/94166 None >From 896f3090ca2eadf650459caee9a4106fc7dd381d Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Thu, 30 May 2024 05:05:41 + Subject: [PATCH] [clang-repl] Teach clang-repl how to load PCHs. ---

[clang] [clang-repl] Test explicit emission of dtors in runtime interface builder (NFC) (PR #89734)

2024-05-30 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: vgvassilev wrote: We generally have to put a switch for the late parsed templates. We have it in some other tests. https://github.com/llvm/llvm-project/pull/89734

[clang] [clang-repl] Introduce common fixture class in unittests (NFC) (PR #93816)

2024-05-30 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/93816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-30 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: vgvassilev wrote: > > Looks like you already implemented it. Nice. > > Well, it's gonna be a bit more churn. Eventually, it will reduce coverage for > the incremental features in

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-29 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gr=C3=A4nitz?= , Stefan =?utf-8?q?Gr=C3=A4nitz?= , Stefan =?utf-8?q?Gr=C3=A4nitz?= Message-ID: In-Reply-To: vgvassilev wrote: Looks like you already implemented it. Nice. https://github.com/llvm/llvm-project/pull/84758 ___

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-29 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: @mysterymath, @jasonmolenda, ping -- I am still stuck in reproducing this issue. https://github.com/llvm/llvm-project/pull/89804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-29 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: vgvassilev wrote: Can we create some text fixture that will do that automatically for us and reduce this copy-paste? https://github.com/llvm/llvm-project/pull/84758

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-28 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: vgvassilev wrote: I am not sure how this patch changed these tests to start failing on Windows. Do you have any clue? https://github.com/llvm/llvm-project/pull/84758

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-28 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gr=C3=A4nitz?= , Stefan =?utf-8?q?Gr=C3=A4nitz?= , Stefan =?utf-8?q?Gr=C3=A4nitz?= Message-ID: In-Reply-To: vgvassilev wrote: What do you mean? https://github.com/llvm/llvm-project/pull/84758 ___ cfe-commits mailing list

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-25 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= , Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/84758 >From 917e4e0e07c5a312543732d6101742e709a6b429 Mon Sep 17 00:00:00 2001 From:

[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-25 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gr=C3=A4nitz?= , Stefan =?utf-8?q?Gr=C3=A4nitz?= , Stefan =?utf-8?q?Gr=C3=A4nitz?= Message-ID: In-Reply-To: vgvassilev wrote: @weliveindetail, I was wondering what's the fate of this patch? https://github.com/llvm/llvm-project/pull/84758

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-22 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > Just found out this keeps popping up from my notification, and I would like > give my 2 cents, maybe can provide some insights: > > Looking at the backtrace of the failing tests, I noticed we ran into > `clang::Parser::ParseTopLevelStmtDecl()` which makes me very confused.

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-22 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > fwiw if you have access to a mac, I don't think it's hard to build > lldb+clang? I have swig, cmake, and ninja installed on my mac via homebrew. > > ``` > lldb/scripts/macos-setup-codesign.sh > > mkdir build > cd build > cmake ../llvm -G Ninja

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-22 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: Ok, maybe I can you test this patch for a temporary fix until we figure out what's going wrong. ```diff diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 7f6921ea22be..d771a060f305 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-22 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > I was able to verify that the revert fixed the tests at least. I am pretty sure that the failure ha to do with the incremental processing if-stmt in SemaDecl. I can provide a fix that does not trigger this for lldb but that would be a workaround. I suspect that change

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-22 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > > @jasonmolenda, I am stuck. I could not find how the bot configures llvm and > > lldb. I built lldb and ran `make check-lldb` but did not fail in the same > > way. Can you provide a recipe to reproduce the failure? > > For some reason it only fails on our Mac LLDB

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-22 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: @jasonmolenda, I am stuck. I could not find how the bot configures llvm and lldb. I built lldb and ran `make check-lldb` but did not fail in the same way. Can you provide a recipe to reproduce the failure? https://github.com/llvm/llvm-project/pull/89804

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-21 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > I reverted in > > ``` > commit dfdf1c5fe45a82b9c578306f3d7627fd251d63f8 > Author: Jason Molenda > Date: Tue May 21 18:00:11 2024 -0700 > > Revert "[clang-repl] Extend the C support. (#89804)" > > This reverts commit 253c28fa829cee0104c2fc59ed1a958980b5138c.

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-05-21 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > LGTM, feel free to apply my suggestion if you like it. Applied it. Thanks for the review this unblock whole bunch of work for us.. https://github.com/llvm/llvm-project/pull/89811 ___ cfe-commits mailing list

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-05-21 Thread Vassil Vassilev via cfe-commits
@@ -269,7 +267,10 @@ const char *const Runtimes = R"( void __clang_Interpreter_SetValueCopyArr(const T (*Src)[N], void* Placement, unsigned long Size) { __clang_Interpreter_SetValueCopyArr(Src[0], Placement, Size); } +extern "C" vgvassilev

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-05-21 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/89811 >From 0ff8aca868bfd78d4bcfd31f299e253e83c150a2 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Tue, 23 Apr 2024 19:33:00 + Subject: [PATCH] [clang-repl] Lay the foundation of pretty printing for C.

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-05-21 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: > Generally looks good, but it seems that some parts of this PR are also > incorporated into another PR, so it's a bit hard to review. Rebased, should be only the commit in question now, as the other one landed. https://github.com/llvm/llvm-project/pull/89811

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-05-21 Thread Vassil Vassilev via cfe-commits
@@ -42,6 +42,9 @@ #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" #include "llvm/TargetParser/Host.h" + +#include vgvassilev wrote: Fixed. https://github.com/llvm/llvm-project/pull/89811

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-05-21 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/89811 >From 3e922935bc551dd5c3f76dae22a94318d0abd210 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Tue, 23 Apr 2024 19:33:00 + Subject: [PATCH] [clang-repl] Lay the foundation of pretty printing for C.

[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)

2024-05-21 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/89811 >From 4a73cd3c3daca1cb1856a8e175dc9cb531ca Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Tue, 23 Apr 2024 19:33:00 + Subject: [PATCH] [clang-repl] Lay the foundation of pretty printing for C.

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-21 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/89804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-21 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: The failures on windows are due to "out of heap" error. Let's land this to test on the "real" bots. https://github.com/llvm/llvm-project/pull/89804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-21 Thread Vassil Vassilev via cfe-commits
@@ -407,6 +406,16 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit ) { } } } + + // FIXME: We should de-allocate MostRecentTU + for (Decl *D : MostRecentTU->decls()) { +auto *ND = dyn_cast(D); +if (!ND) + continue; +// Check if we

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-21 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/89804 >From 0621608c575d9e4f7da5b08db143dbe88a45745a Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Tue, 23 Apr 2024 18:07:06 + Subject: [PATCH] [clang-repl] Extend the C support. The IdResolver chain is

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-21 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: The bots fail on windows due to `TEST 'Clang :: CoverageMapping/mcdc-system-headers.cpp' FAILED` which does not seem related to this PR. https://github.com/llvm/llvm-project/pull/89804 ___ cfe-commits mailing list

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-20 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/89804 >From 7acf367f2bd36409bcbb7443451ec83188ab589d Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Tue, 23 Apr 2024 18:07:06 + Subject: [PATCH] [clang-repl] Extend the C support. The IdResolver chain is

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-20 Thread Vassil Vassilev via cfe-commits
@@ -2282,7 +2282,8 @@ void Sema::ActOnPopScope(SourceLocation Loc, Scope *S) { // Remove this name from our lexical scope, and warn on it if we haven't // already. -IdResolver.RemoveDecl(D); +if (!PP.isIncrementalProcessingEnabled()) +

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-20 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev updated https://github.com/llvm/llvm-project/pull/89804 >From 72d655c919ae29f83f1a39db2a63aa5468fb52cc Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Tue, 23 Apr 2024 18:07:06 + Subject: [PATCH] [clang-repl] Extend the C support. The IdResolver chain is

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-20 Thread Vassil Vassilev via cfe-commits
@@ -407,6 +406,16 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit ) { } } } + + // FIXME: We should de-allocate MostRecentTU + for (Decl *D : MostRecentTU->decls()) { +if (!isa(D)) + continue; +// Check if we need to clean up the

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-20 Thread Vassil Vassilev via cfe-commits
@@ -407,6 +406,16 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit ) { } } } + + // FIXME: We should de-allocate MostRecentTU + for (Decl *D : MostRecentTU->decls()) { +if (!isa(D)) + continue; +// Check if we need to clean up the

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-20 Thread Vassil Vassilev via cfe-commits
@@ -407,6 +406,16 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit ) { } } } + + // FIXME: We should de-allocate MostRecentTU + for (Decl *D : MostRecentTU->decls()) { +if (!isa(D)) + continue; +// Check if we need to clean up the

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-20 Thread Vassil Vassilev via cfe-commits
@@ -2282,7 +2282,8 @@ void Sema::ActOnPopScope(SourceLocation Loc, Scope *S) { // Remove this name from our lexical scope, and warn on it if we haven't // already. -IdResolver.RemoveDecl(D); +if (!PP.isIncrementalProcessingEnabled()) +

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-20 Thread Vassil Vassilev via cfe-commits
@@ -407,6 +406,16 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit ) { } } } + + // FIXME: We should de-allocate MostRecentTU + for (Decl *D : MostRecentTU->decls()) { +if (!isa(D)) + continue; +// Check if we need to clean up the

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-19 Thread Vassil Vassilev via cfe-commits
@@ -407,6 +406,16 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit ) { } } } + + // FIXME: We should de-allocate MostRecentTU + for (Decl *D : MostRecentTU->decls()) { +if (!isa(D)) + continue; +// Check if we need to clean up the

[clang] [clang-repl] Extend the C support. (PR #89804)

2024-05-10 Thread Vassil Vassilev via cfe-commits
vgvassilev wrote: @AaronBallman, can you take a look at that patch, hopefully to move forward as seems the other reviewers are busy. https://github.com/llvm/llvm-project/pull/89804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

  1   2   3   4   5   6   7   8   >