[clang] Fix undefined lld::wasm::link symbol while building clangInterpreter for wasm (PR #113446)

2024-10-23 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/113446 While building llvm (clang, lld) for wasm using emscripten (recipe hosted on emscripten-forge https://github.com/emscripten-forge/recipes/tree/main/recipes/recipes_emscripten/llvm) I ended up with this erro

[clang] Fix undefined lld::wasm::link symbol while building clangInterpreter for wasm (PR #113446)

2024-10-23 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/113446 >From a19fb1d00dfd9a3be9463396d476ef7415391a0f Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Wed, 23 Oct 2024 16:58:57 +0530 Subject: [PATCH] Fix undefined lld::wasm::link symbol while building clangInterp

[clang] [clang-repl] Fix undefined lld::wasm::link symbol while building clangInterpreter for wasm (PR #113446)

2024-10-23 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/113446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix undefined lld::wasm::link symbol while building clangInterpreter for wasm (PR #113446)

2024-10-23 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/113446 >From 921d6d4f2acdd85d95bb8c5904177b0d39b5393b Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Wed, 23 Oct 2024 16:58:57 +0530 Subject: [PATCH] Fix undefined lld::wasm::link symbol while building clangInterp

[clang] [clang-repl] Fix undefined lld::wasm::link symbol while building clangInterpreter for wasm (PR #113446)

2024-10-23 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/113446 >From d61f58f66839652ec4c1101521c2a7297cffacff Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Wed, 23 Oct 2024 16:58:57 +0530 Subject: [PATCH] Fix undefined lld::wasm::link symbol while building clangInterp

[clang] [clang-repl] Fix generation of wasm binaries while running clang-repl in browser (PR #117978)

2024-11-29 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/117978 >From 987f77db9d45dee264c60f434652131438784f6f Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Thu, 28 Nov 2024 14:02:00 +0530 Subject: [PATCH 1/4] Fix generation of wasm binaries while running clang-repl in

[clang] [clang-repl] Fix generation of wasm binaries while running clang-repl in browser (PR #117978)

2024-11-29 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/117978 >From 987f77db9d45dee264c60f434652131438784f6f Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Thu, 28 Nov 2024 14:02:00 +0530 Subject: [PATCH 1/4] Fix generation of wasm binaries while running clang-repl in

[clang] [clang-repl] Fix generation of wasm binaries while running clang-repl in browser (PR #117978)

2024-11-29 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: Hey @vgvassilev thanks for the reviews. Addressed them. Once merged, I shall do a cherry pick of the required commit ! https://github.com/llvm/llvm-project/pull/117978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [clang-repl] Fix generation of wasm binaries while running clang-repl in browser (PR #117978)

2024-11-29 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: /cherry-pick a174aa1e416c4e27945f5a8c646b119126dc8441 https://github.com/llvm/llvm-project/pull/117978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Remove redundant shared flag while running clang-repl in browser (PR #118107)

2024-11-29 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/118107 While running clang-repl in the browser, we would be interested in this cc1 command ` "" -cc1 -triple wasm32-unknown-emscripten -emit-obj -disable-free -clear-ast-before-backend -disable-llvm-verifier -dis

[clang] [clang-repl] Remove redundant shared flag while running clang-repl in browser (PR #118107)

2024-11-29 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/118107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix generation of wasm binaries while running clang-repl in browser (PR #117978)

2024-11-28 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/117978 >From 987f77db9d45dee264c60f434652131438784f6f Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Thu, 28 Nov 2024 14:02:00 +0530 Subject: [PATCH 1/3] Fix generation of wasm binaries while running clang-repl in

[clang] [clang-repl] Fix generation of wasm binaries while running clang-repl in browser (PR #117978)

2024-11-28 Thread Anutosh Bhat via cfe-commits
@@ -109,12 +139,12 @@ llvm::Error WasmIncrementalExecutor::runCtors() const { return llvm::Error::success(); } -llvm::Error WasmIncrementalExecutor::cleanUp() const { anutosh491 wrote: I think we would need it. I see a build error otherwise ``` │ │ /home

[clang] Fix generation of wasm binaries while running clang-repl in browser (PR #117978)

2024-11-28 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/117978 None >From 987f77db9d45dee264c60f434652131438784f6f Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Thu, 28 Nov 2024 14:02:00 +0530 Subject: [PATCH] Fix generation of wasm binaries while running clang-repl i

[clang] [clang-repl] Fix generation of wasm binaries while running clang-repl in browser (PR #117978)

2024-11-28 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/117978 >From 987f77db9d45dee264c60f434652131438784f6f Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Thu, 28 Nov 2024 14:02:00 +0530 Subject: [PATCH 1/2] Fix generation of wasm binaries while running clang-repl in

[clang] [clang-repl] Fix generation of wasm binaries while running clang-repl in browser (PR #117978)

2024-11-28 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/117978 >From 987f77db9d45dee264c60f434652131438784f6f Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Thu, 28 Nov 2024 14:02:00 +0530 Subject: [PATCH 1/2] Fix generation of wasm binaries while running clang-repl in

[clang] [clang-repl] Fix generation of wasm binaries while running clang-repl in browser (PR #117978)

2024-11-28 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/117978 >From 987f77db9d45dee264c60f434652131438784f6f Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Thu, 28 Nov 2024 14:02:00 +0530 Subject: [PATCH 1/2] Fix generation of wasm binaries while running clang-repl in

[clang] [clang-repl] Fix generation of wasm binaries while running clang-repl in browser (PR #117978)

2024-11-28 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/117978 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Use default visibility for symbols while building CompilerInstance against emscripten (PR #116779)

2024-11-28 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 closed https://github.com/llvm/llvm-project/pull/116779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Use default visibility for symbols while building CompilerInstance against emscripten (PR #116779)

2024-11-28 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: Closing as superseded by https://github.com/llvm/llvm-project/pull/116779 https://github.com/llvm/llvm-project/pull/116779 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [clang-repl] Improve flags responsible for generating shared wasm binaries (PR #116735)

2024-11-18 Thread Anutosh Bhat via cfe-commits
@@ -72,13 +72,13 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { OutputFile.close(); std::vector LinkerArgs = {"wasm-ld", - "-pie", + "-shared",

[clang] [clang-repl] Improve flags responsible for generating shared wasm binaries (PR #116735)

2024-11-18 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/116735 There are a couple changes in this PR that help getting clang-repl to run in the browser. Using a jupyterlite instance for the example pasted below 1) Updating flags responsible for generating shared wasm bi

[clang] [clang-repl] Use default visibility for symbols while building CompilerInstance against emscripten (PR #116779)

2024-11-20 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: I just realized that cleanUp shouldn't use const. While building against emscripten, I go this error ``` │ │ /home/runner/work/recipes/recipes/output/bld/rattler-build_llvm_1732028457/work/clang/lib/Interpreter/Wasm.cpp:111:38: error: out-of-line definition of 'cl │ │ eanU

[clang] [clang-repl] Use default visibility for symbols while building CompilerInstance against emscripten (PR #116779)

2024-11-20 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/116779 >From 616ebd6b6487eeaa302e6d33de3a371e6c9843f5 Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Tue, 19 Nov 2024 15:38:37 +0530 Subject: [PATCH 1/2] Use default visibility for symbols while building CompilerI

[clang] [clang-repl] Use default visibility for symbols while building CompilerInstance against emscripten (PR #116779)

2024-11-19 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/116779 >From 616ebd6b6487eeaa302e6d33de3a371e6c9843f5 Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Tue, 19 Nov 2024 15:38:37 +0530 Subject: [PATCH 1/2] Use default visibility for symbols while building CompilerI

[clang] [clang-repl] Use default visibility for symbols while building CompilerInstance against emscripten (PR #116779)

2024-11-19 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/116779 >From 616ebd6b6487eeaa302e6d33de3a371e6c9843f5 Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Tue, 19 Nov 2024 15:38:37 +0530 Subject: [PATCH 1/3] Use default visibility for symbols while building CompilerI

[clang] [clang-repl] Use default visibility for symbols while building CompilerInstance against emscripten (PR #116779)

2024-11-19 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/116779 When running clang-repl in the browser we end up having something like the following ` "" -cc1 -triple wasm32-unknown-emscripten .. -main-file-name "<<< inputs >>>" -fvisibility=hidden -o "<<<

[clang] [clang-repl] Remove redundant shared flag while running clang-repl in browser (PR #118107)

2024-12-05 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: cc @vgvassilev Now that 19.1.5 is out. We can run clang-repl in the browser. And this flag is just adding redundancy and doesn't play a role. Small change. Should be ready ! https://github.com/llvm/llvm-project/pull/118107 ___ cfe

[clang] [clang-repl] Implement value printing of custom types (PR #84769)

2025-01-05 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: Hey @vgvassilev Just curious to know as to what work is left here and if any help is needed for the same ? https://github.com/llvm/llvm-project/pull/84769 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] Fix error recovery while PTU cleanup (PR #127467)

2025-02-17 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/127467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix error recovery while PTU cleanup (PR #127467)

2025-02-17 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: cc @ferdymercury @vgvassilev https://github.com/llvm/llvm-project/pull/127467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix error recovery while PTU cleanup (PR #127467)

2025-02-17 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: Hmmm, the code formatter has a suggestion. Just increases the lines on a simple test. Not sure if the code formatter should be respected here ! https://github.com/llvm/llvm-project/pull/127467 ___ cfe-commits mailing list cfe-commits

[clang] Fix error recovery while PTU cleanup (PR #127467)

2025-02-17 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: For anyone interested in seeing the error at realtime, I am just leaving the static link for xeus-cpp-lite here. https://compiler-research.org/xeus-cpp/lab/index.html Possibly trying something like ``` int x = 5; auto capture = [&]() { return x * 2; }; ``` Should display the

[clang] Fix error recovery while PTU cleanup (PR #127467)

2025-02-17 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/127467 Fixes #123300 What is seen ``` clang-repl> int x = 42; clang-repl> auto capture = [&]() { return x * 2; }; In file included from <<< inputs >>>:1: input_line_4:1:17: error: non-local lambda expression cannot

[clang] Fix error recovery while PTU cleanup (PR #127467)

2025-02-17 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: Should be fixed now ``` clang-repl> int x = 5; auto capture = [&]() { return x * 2; }; In file included from <<< inputs >>>:1: input_line_1:1:28: error: non-local lambda expression cannot have a capture-default 1 | int x = 5; auto capture = [&]() { return x * 2; }; |

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-02-26 Thread Anutosh Bhat via cfe-commits
@@ -114,6 +114,13 @@ TEST_F(InterpreterTest, Errors) { RecoverErr = Interp->Parse("var1 = 424;"); EXPECT_TRUE(!!RecoverErr); + + Err = Interp->Parse("int x = 5; auto capture = [&]() { return x * 2; };").takeError(); anutosh491 wrote: Shall shift it ther

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-02-26 Thread Anutosh Bhat via cfe-commits
@@ -114,6 +114,13 @@ TEST_F(InterpreterTest, Errors) { RecoverErr = Interp->Parse("var1 = 424;"); EXPECT_TRUE(!!RecoverErr); + + Err = Interp->Parse("int x = 5; auto capture = [&]() { return x * 2; };").takeError(); anutosh491 wrote: Hmmm @vgvassilev

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-02-26 Thread Anutosh Bhat via cfe-commits
@@ -114,6 +114,13 @@ TEST_F(InterpreterTest, Errors) { RecoverErr = Interp->Parse("var1 = 424;"); EXPECT_TRUE(!!RecoverErr); + + Err = Interp->Parse("int x = 5; auto capture = [&]() { return x * 2; };").takeError(); anutosh491 wrote: I meant I see quite

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-02-26 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/127467 >From 6ff448ed506e0ef75db2c9974a628a965e85df2f Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Mon, 17 Feb 2025 15:33:20 +0530 Subject: [PATCH 1/2] Fix error recovery while PTU cleanup --- clang/lib/Interpr

[clang] [clang-repl] Update Docs related to Annotation Token (PR #127571)

2025-02-26 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: cc @vgvassilev https://github.com/llvm/llvm-project/pull/127571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-02-26 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: cc @vgvassilev https://github.com/llvm/llvm-project/pull/127467 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] fix error recovery while parsing completely fails (PR #127087)

2025-02-18 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: Maybe @vgvassilev might know more about this behaviour and if it is expected. For some context you can read the discussion from here https://github.com/llvm/llvm-project/pull/127087#issuecomment-2664564232 https://github.com/llvm/llvm-project/pull/127087 _

[clang] [clang-repl] fix error recovery while parsing completely fails (PR #127087)

2025-02-18 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: Hmmm confused ! So does it really come down to the flag responsible for enabling assertions. `LLVM_ENABLE_ASSERTIONS=ON` https://github.com/llvm/llvm-project/pull/127087 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [clang-repl] fix error recovery while parsing completely fails (PR #127087)

2025-02-17 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: There are quite some made by @kr-2003 and me here. 1) We realize even without this fix, stuff worked perfectly on our Macos ARM devices. So looks like a Ubuntu issue anyways ![image](https://github.com/user-attachments/assets/666d5cc4-1f42-4c4a-8ff6-81aa67bc4650) 2) Obviousl

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-02-17 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/127467 ___ 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)

2025-02-17 Thread Anutosh Bhat via cfe-commits
@@ -571,11 +571,8 @@ StmtResult Parser::ParseExprStatement(ParsedStmtContext StmtCtx) { } Token *CurTok = nullptr; - // If the semicolon is missing at the end of REPL input, consider if - // we want to do value printing. Note this is only enabled in C++ mode - // since

[clang] [clang-repl] Address error recovery fixing infinite loop while parsing (PR #127569)

2025-02-17 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/127569 I was interested in recovering error for some use cases. Before the change ``` clang-repl> void foo() { int x = 5; <<< inputs >>>:1:1: error: expected expression <<< inputs >>>:1:1: error: expected expression

[clang] [clang-repl] Address error recovery fixing infinite loop while parsing (PR #127569)

2025-02-17 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: This happens because the while loop is running only taking `eof` into account and not `annot_repl_input_end` which is specific to clang-repl i'd assume hence it never terminates. I need to add tests for the same. But that being said here is something concerning I think

[clang] [clang-repl] Address error recovery fixing infinite loop while parsing (PR #127569)

2025-02-17 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: cc @ferdymercury https://github.com/llvm/llvm-project/pull/127569 ___ 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)

2025-02-17 Thread Anutosh Bhat via cfe-commits
@@ -571,11 +571,8 @@ StmtResult Parser::ParseExprStatement(ParsedStmtContext StmtCtx) { } Token *CurTok = nullptr; - // If the semicolon is missing at the end of REPL input, consider if - // we want to do value printing. Note this is only enabled in C++ mode - // since

[clang] [clang-repl] Update Docs related to Annotation Token (PR #127571)

2025-02-17 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/127571 The update in the source code was made through #89811 >From a22878cde1e22796bdd629fda9c30be99c82ca79 Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Tue, 18 Feb 2025 11:42:24 +0530 Subject: [PATCH] [clang-r

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-03-10 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/127467 >From 6ff448ed506e0ef75db2c9974a628a965e85df2f Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Mon, 17 Feb 2025 15:33:20 +0530 Subject: [PATCH 1/4] Fix error recovery while PTU cleanup --- clang/lib/Interpr

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-03-10 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/127467 >From bd1b0b2a14afeb73755db3a7deb6bffd4f50778c Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Mon, 17 Feb 2025 15:33:20 +0530 Subject: [PATCH] Fix error recovery while PTU cleanup --- clang/lib/Interpreter

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-03-10 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/127467 >From 6ff448ed506e0ef75db2c9974a628a965e85df2f Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Mon, 17 Feb 2025 15:33:20 +0530 Subject: [PATCH 1/3] Fix error recovery while PTU cleanup --- clang/lib/Interpr

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-03-10 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/127467 >From 6ff448ed506e0ef75db2c9974a628a965e85df2f Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Mon, 17 Feb 2025 15:33:20 +0530 Subject: [PATCH 1/3] Fix error recovery while PTU cleanup --- clang/lib/Interpr

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-03-11 Thread Anutosh Bhat via cfe-commits
@@ -1,7 +1,8 @@ // REQUIRES: host-supports-jit // UNSUPPORTED: system-aix // RUN: cat %s | clang-repl | FileCheck %s -// RUN: cat %s | clang-repl -Xcc -O2 | FileCheck %s +// RUN: cat %s | not clang-repl -Xcc -Xclang -Xcc -verify -Xcc -O2 | FileCheck %s anutosh

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-03-11 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/127467 >From 6ff448ed506e0ef75db2c9974a628a965e85df2f Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Mon, 17 Feb 2025 15:33:20 +0530 Subject: [PATCH 1/5] Fix error recovery while PTU cleanup --- clang/lib/Interpr

[clang] [clang-repl] Fix target creation in Wasm.cpp (PR #130909)

2025-03-12 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/130909 After #129868 went in, I realize some updates have been made to the Triple. Not sure if @nikic overlooked including this change in his PR (hence I have having build issue when compiling clang against emscrip

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-03-12 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/127467 >From bd1b0b2a14afeb73755db3a7deb6bffd4f50778c Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Mon, 17 Feb 2025 15:33:20 +0530 Subject: [PATCH 1/2] Fix error recovery while PTU cleanup --- clang/lib/Interpr

[clang] [clang-repl] Fix error recovery while PTU cleanup (PR #127467)

2025-03-12 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/127467 >From bd1b0b2a14afeb73755db3a7deb6bffd4f50778c Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Mon, 17 Feb 2025 15:33:20 +0530 Subject: [PATCH 1/3] Fix error recovery while PTU cleanup --- clang/lib/Interpr

[clang] [clang-repl] Fix target creation in Wasm.cpp (PR #130909)

2025-03-12 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/130909 >From 18e1f9713b34bf1f9c0e946cd915c0ae04748607 Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Wed, 12 Mar 2025 12:32:02 +0530 Subject: [PATCH 1/2] Fix target creation in Wasm.cpp --- clang/lib/Interpreter/

[clang] [clang-repl] Fix target creation in Wasm.cpp (PR #130909)

2025-03-12 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/130909 >From 18e1f9713b34bf1f9c0e946cd915c0ae04748607 Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Wed, 12 Mar 2025 12:32:02 +0530 Subject: [PATCH 1/3] Fix target creation in Wasm.cpp --- clang/lib/Interpreter/

[clang] [clang-repl] Fix target creation in Wasm.cpp (PR #130909)

2025-03-12 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/130909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Define LLVM_ABI and CLANG_ABI for __EMSCRIPTEN__ builds (PR #131578)

2025-03-17 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: Hey, Thanks for the review. The CI is green now ! https://github.com/llvm/llvm-project/pull/131578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Define LLVM_ABI and CLANG_ABI for __EMSCRIPTEN__ builds (PR #131578)

2025-03-17 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: /cherry-pick [e57cd10](https://github.com/llvm/llvm-project/commit/e57cd100ca297cf81854e35cccbf703e4aad) https://github.com/llvm/llvm-project/pull/131578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [llvm] Define LLVM_ABI and CLANG_ABI for __EMSCRIPTEN__ builds (PR #131578)

2025-03-17 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/131578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Address error recovery fixing infinite loop while parsing (PR #127569)

2025-03-16 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: Hi @vgvassilev, Would be nice to know your thoughts here https://github.com/llvm/llvm-project/pull/127569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Define LLVM_ABI and CLANG_ABI for __EMSCRIPTEN__ builds (PR #131578)

2025-03-17 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: Hey @serge-sans-paille One final request here would be if you could add the milestone (**LLVM 20.X Release** I think) So that this is picked up in the next release (20.0.2) and we wouldn't need to use the patch then ! https://github.com/llvm/llvm-project/pull/131578 __

[clang] [Clang-repl] Implementation for removeModule for wasm use case (PR #131558)

2025-03-16 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: Has some debug logs for now (shall be removed once ready) Also the issue tracking this on emscripten is https://github.com/emscripten-core/emscripten/issues/23793 https://github.com/llvm/llvm-project/pull/131558 ___ cfe-commits mail

[clang] [Clang-repl] Implementation for removeModule for wasm use case (PR #131558)

2025-03-16 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/131558 Raising as draft for now. This PR implements the removeModule function that can be put to use while running clang-repl in the browser. The implementation works as we would like it to. But due to some issues

[clang] [llvm] Define LLVM_ABI and CLANG_ABI for __EMSCRIPTEN__ builds (PR #131578)

2025-03-17 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/131578 While building llvm (clang, lld) against emscripten we see this [error](https://github.com/emscripten-forge/recipes/actions/runs/13803029307/job/38608794602#step:9:1715) ``` │ │ In file included from $SRC_D

[clang] [llvm] Define LLVM_ABI and CLANG_ABI for __EMSCRIPTEN__ builds (PR #131578)

2025-03-17 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 ready_for_review https://github.com/llvm/llvm-project/pull/131578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Define LLVM_ABI and CLANG_ABI for __EMSCRIPTEN__ builds (PR #131578)

2025-03-17 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: cc @serge-sans-paille for review. https://github.com/llvm/llvm-project/pull/131578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Define LLVM_ABI and CLANG_ABI for __EMSCRIPTEN__ builds (PR #131578)

2025-03-17 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/131578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Handle frontend options for clang-repl before calling executeAction (PR #132670)

2025-03-23 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: After handling these args we should see ``` (base) anutosh491@Anutoshs-MacBook-Air bin % ./clang-repl --Xcc -Xclang --Xcc -version LLVM (http://llvm.org/): LLVM version 21.0.0git Optimized build. clang-repl: Version displayed ``` rathe

[clang] [clang-repl] Handle frontend options for clang-repl before calling executeAction (PR #132670)

2025-03-23 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/132670 1) How usual clang works It goes from Creating the Compiler Instance -> [Addressing these llvmargs](https://github.com/llvm/llvm-project/blob/4e4e4a190fb7c74453994935c843b09cc682f4bb/clang/lib/FrontendTool/E

[clang] [clang-repl] Handle frontend options for clang-repl before calling executeAction (PR #132670)

2025-03-23 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/132670 >From 6545414a97b6458333f399c7252ae55c88a42d62 Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Mon, 24 Mar 2025 10:09:59 +0530 Subject: [PATCH 1/2] Handle frontend options for clang-repl before calling execu

[clang] [clang-repl] Handle frontend options for clang-repl before calling executeAction (PR #132670)

2025-03-23 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: I see clang handle 4 types of FrontendOpts before calling ExecuteAction 1) help 2) version 3) Plugins through [LoadRequestedPlugins](https://github.com/llvm/llvm-project/blob/4e4e4a190fb7c74453994935c843b09cc682f4bb/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp#L225) 4)

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/133037 >From dfe49e826705a5e9371e17e66e40c31602beea8e Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Wed, 26 Mar 2025 10:33:37 +0530 Subject: [PATCH 1/3] Implement LoadDynamicLibrary for clang-repl wasm use cases

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/133037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-04-02 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: The above failure reported doesn't look related. Cherry picking commit for 20.1.3 /cherry-pick [8f56394](https://github.com/llvm/llvm-project/commit/8f56394487a4d454be0637667267ad37bd636d0f) https://github.com/llvm/llvm-project/pull/133037 ___

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-25 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/133037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-25 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/133037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-25 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/133037 >From dfe49e826705a5e9371e17e66e40c31602beea8e Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Wed, 26 Mar 2025 10:33:37 +0530 Subject: [PATCH 1/2] Implement LoadDynamicLibrary for clang-repl wasm use cases

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-25 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: For anyone concerned, Such a feature would be tested out in downstream projects like [cppinterop](https://github.com/compiler-research/CppInterOp) and [xeus-cpp](https://github.com/compiler-research/xeus-cpp) as currently llvm doesn't have a concrete structure to test clang-

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-25 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 created https://github.com/llvm/llvm-project/pull/133037 None >From dfe49e826705a5e9371e17e66e40c31602beea8e Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Wed, 26 Mar 2025 10:33:37 +0530 Subject: [PATCH] Implement LoadDynamicLibrary for clang-repl wasm use cases

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/133037 >From a7ccd0e0b261c303639d3880fc51b0ed99e17363 Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Wed, 26 Mar 2025 10:33:37 +0530 Subject: [PATCH 1/3] Implement LoadDynamicLibrary for clang-repl wasm use cases

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/133037 >From a7ccd0e0b261c303639d3880fc51b0ed99e17363 Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Wed, 26 Mar 2025 10:33:37 +0530 Subject: [PATCH 1/2] Implement LoadDynamicLibrary for clang-repl wasm use cases

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
@@ -711,6 +712,14 @@ llvm::Error Interpreter::Undo(unsigned N) { } llvm::Error Interpreter::LoadDynamicLibrary(const char *name) { +#ifdef __EMSCRIPTEN__ + void *handle = dlopen(name, RTLD_NOW | RTLD_GLOBAL); + if (!handle) { +llvm::errs() << dlerror() << '\n'; +retu

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/133037 >From dfe49e826705a5e9371e17e66e40c31602beea8e Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Wed, 26 Mar 2025 10:33:37 +0530 Subject: [PATCH 1/4] Implement LoadDynamicLibrary for clang-repl wasm use cases

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
@@ -711,6 +712,14 @@ llvm::Error Interpreter::Undo(unsigned N) { } llvm::Error Interpreter::LoadDynamicLibrary(const char *name) { +#ifdef __EMSCRIPTEN__ + void *handle = dlopen(name, RTLD_NOW | RTLD_GLOBAL); + if (!handle) { +llvm::errs() << dlerror() << '\n'; +retu

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/133037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
@@ -711,6 +712,14 @@ llvm::Error Interpreter::Undo(unsigned N) { } llvm::Error Interpreter::LoadDynamicLibrary(const char *name) { +#ifdef __EMSCRIPTEN__ + void *handle = dlopen(name, RTLD_NOW | RTLD_GLOBAL); + if (!handle) { +llvm::errs() << dlerror() << '\n'; +retu

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-27 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 edited https://github.com/llvm/llvm-project/pull/133037 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-31 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: > We really need to figure out how to add in-tree tests. Yupp sadly I was only able to test this through cppinterop and xeus-cpp as I've commented above (https://github.com/llvm/llvm-project/pull/133037#discussion_r2015819533) where it works as expected :\ I shall take out

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-03-31 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: > I am wondering if we can add such CI for llvm, too... maybe you can discuss > that at the llvm discord's infrastructure channel... Absolutely, I shall do that and get back to you on this (I think there are people at llvm looking into llvm+emscripten use cases and should sup

[clang] [clang-repl] Implement LoadDynamicLibrary for clang-repl wasm use cases (PR #133037)

2025-04-01 Thread Anutosh Bhat via cfe-commits
https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/133037 >From a7ccd0e0b261c303639d3880fc51b0ed99e17363 Mon Sep 17 00:00:00 2001 From: anutosh491 Date: Wed, 26 Mar 2025 10:33:37 +0530 Subject: [PATCH 1/4] Implement LoadDynamicLibrary for clang-repl wasm use cases