History log of /llvm-project/clang/test/Interpreter/execute.cpp (Results 1 – 25 of 30)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7
# cb7995a1 28-May-2024 Stefan Gränitz <stefan.graenitz@gmail.com>

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

Until now the IncrExecutor was created lazily on the first execution
request. In order to process the PTUs that come from

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

Until now the IncrExecutor was created lazily on the first execution
request. In order to process the PTUs that come from initialization, we
have to do it upfront implicitly.

show more ...


Revision tags: llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1
# ac6e9e69 27-Jul-2023 Jonas Hahnfeld <jonas.hahnfeld@cern.ch>

[clang-repl] Remove redundant tests

They only need to be tested once in execute.cpp and fail.cpp.

Differential Revision: https://reviews.llvm.org/D156425


Revision tags: llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2
# a8f2e24e 30-Jul-2022 Sunho Kim <ksunhokim123@gmail.com>

[clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON.

We have seen random symbol not found "__cxa_throw" error in fuschia build bots and out-of-tree users. The understanding have bee

[clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON.

We have seen random symbol not found "__cxa_throw" error in fuschia build bots and out-of-tree users. The understanding have been that they are built without exception support, but it turned out that these platforms have LLVM_STATIC_LINK_CXX_STDLIB ON so that they link libstdc++ to llvm statically. The reason why this is problematic for clang-repl is that by default clang-repl tries to find symbols from symbol table of executable and dynamic libraries loaded by current process. It needs to load another libstdc++, but the platform that had LLVM_STATIC_LINK_CXX_STDLIB turned on is usally those with missing or obsolate shared libstdc++ in the first place -- trying to load it again would be destined to fail eventually with a risk to introuduce mixed libstdc++ versions.

A proper solution that doesn't take a workaround is statically link the same libstdc++ by clang-repl side, but this is not possible with old JIT linker runtimedyld. New just-in-time linker JITLink handles this relatively well, but it's not availalbe in majority of platforms. For now, this patch just disables the building of clang-repl when LLVM_STATIC_LINK_CXX_STDLIB is ON and removes the "__cxa_throw" check in exception unittest as well as reverting previous exception check flag patch.

Reviewed By: v.g.vassilev

Differential Revision: https://reviews.llvm.org/D130788

show more ...


Revision tags: llvmorg-15.0.0-rc1
# c619d4f8 28-Jul-2022 Sunho Kim <ksunhokim123@naver.com>

[clang-repl] Support destructors of global objects.

Supports destructors of global objects by properly calling jitdylib deinitialize which calls the global dtors of ir modules.

This supersedes http

[clang-repl] Support destructors of global objects.

Supports destructors of global objects by properly calling jitdylib deinitialize which calls the global dtors of ir modules.

This supersedes https://reviews.llvm.org/D127945. There was an issue when calling deinitialize on windows but it got fixed by https://reviews.llvm.org/D128037.

Reviewed By: v.g.vassilev

Differential Revision: https://reviews.llvm.org/D128589

show more ...


Revision tags: llvmorg-16-init
# 58c94808 23-Jul-2022 Jun Zhang <jun@junz.org>

[CodeGen] Consider MangleCtx when move lazy emission States

Also move MangleCtx when moving some lazy emission states in
CodeGenModule. Without this patch clang-repl hits an invalid address
access w

[CodeGen] Consider MangleCtx when move lazy emission States

Also move MangleCtx when moving some lazy emission states in
CodeGenModule. Without this patch clang-repl hits an invalid address
access when passing `-Xcc -O2` flag.

Signed-off-by: Jun Zhang <jun@junz.org>

Differential Revision: https://reviews.llvm.org/D130420

show more ...


# eee6a122 07-Jul-2022 Jun Zhang <jun@junz.org>

[clang-repl][NFC] Split weak symbol test to a new test

Windows has some issues when we try to use `__attribute__((weak))` in
JIT, so we disabled that. But it's not worth to disable the whole test
ju

[clang-repl][NFC] Split weak symbol test to a new test

Windows has some issues when we try to use `__attribute__((weak))` in
JIT, so we disabled that. But it's not worth to disable the whole test
just for this single feature. This patch split that part from the
original test so we can keep testing stuff that normally working in
Windows.

Signed-off-by: Jun Zhang <jun@junz.org>

Differential Revision: https://reviews.llvm.org/D129250

show more ...


# bc366183 05-Jul-2022 Jun Zhang <jun@junz.org>

Correct XFAIL according to bot owner's advice

Signed-off-by: Jun Zhang <jun@junz.org>


# f03b876e 05-Jul-2022 Jun Zhang <jun@junz.org>

Reland "Reland "[NFC] Add a missing test for for clang-repl""

This reverts commit 6956840b5c0029d7f8e043b3c77bb1ffc230e4d5.
Try to use `XFAIL: windows-msvc || ps4` to disable all unsupported targets

Reland "Reland "[NFC] Add a missing test for for clang-repl""

This reverts commit 6956840b5c0029d7f8e043b3c77bb1ffc230e4d5.
Try to use `XFAIL: windows-msvc || ps4` to disable all unsupported targets.

Signed-off-by: Jun Zhang <jun@junz.org>

show more ...


# 6956840b 03-Jul-2022 Jun Zhang <jun@junz.org>

Revert "Reland "[NFC] Add a missing test for for clang-repl""

This reverts commit 8679cbc29fb76195544956fe233060bb7a1a6453.
See https://lab.llvm.org/buildbot/#/builders/216/builds/6799


# 8679cbc2 03-Jul-2022 Jun Zhang <jun@junz.org>

Reland "[NFC] Add a missing test for for clang-repl"

This reverts 3668d1264e2d246f7e222338b8a5cab18ce1bdab
As far as we know, `__attribute__((weak))` support has been really bad
in runtimeldyld, so

Reland "[NFC] Add a missing test for for clang-repl"

This reverts 3668d1264e2d246f7e222338b8a5cab18ce1bdab
As far as we know, `__attribute__((weak))` support has been really bad
in runtimeldyld, so we just disable it in Windows at this moment. This
should fix the angry Windows buildbot.

Differential Revision: https://reviews.llvm.org/D129042

show more ...


# 3668d126 01-Jul-2022 Jun Zhang <jun@junz.org>

Revert "[NFC] Add a missing test for for clang-repl"

This reverts commit 2750985a5ccb97f4630c3443e75d78ed435d2bd0.
This has caused Windows buildbot unhappy :(


# 2750985a 01-Jul-2022 Jun Zhang <jun@junz.org>

[NFC] Add a missing test for for clang-repl

This adds a missing test for 0ecbedc0986bd4b7b90a60a5f31d32337160d4c4
Signed-off-by: Jun Zhang <jun@junz.org>

Differential Revision: https://reviews.llvm

[NFC] Add a missing test for for clang-repl

This adds a missing test for 0ecbedc0986bd4b7b90a60a5f31d32337160d4c4
Signed-off-by: Jun Zhang <jun@junz.org>

Differential Revision: https://reviews.llvm.org/D128991

show more ...


# 45b6c381 26-Jun-2022 Sunho Kim <ksunhokim123@gmail.com>

Revert "[clang-repl] Support destructors of global objects."

This reverts commit 9de8b05bfe0de2915d2443d06159396c5f9d389f.


Revision tags: llvmorg-14.0.6
# dea5a9cc 19-Jun-2022 Jun Zhang <jun@junz.org>

[clang-repl] Implement code undo.

In interactive C++ it is convenient to roll back to a previous state of the
compiler. For example:
clang-repl> int x = 42;
clang-repl> %undo
clang-repl> float x = 2

[clang-repl] Implement code undo.

In interactive C++ it is convenient to roll back to a previous state of the
compiler. For example:
clang-repl> int x = 42;
clang-repl> %undo
clang-repl> float x = 24 // not an error

To support this, the patch extends the functionality used to recover from
errors and adds functionality to recover the low-level execution infrastructure.

The current implementation is based on watermarks. It exploits the fact that
at each incremental input the underlying compiler infrastructure is in a valid
state. We can only go N incremental inputs back to a previous valid state. We do
not need and do not do any further dependency tracking.

This patch was co-developed with V. Vassilev, relies on the past work of Purva
Chaudhari in clang-repl and is inspired by the past work on the same feature
in the Cling interpreter.

Co-authored-by: Purva-Chaudhari <purva.chaudhari02@gmail.com>
Co-authored-by: Vassil Vassilev <v.g.vassilev@gmail.com>
Signed-off-by: Jun Zhang <jun@junz.org>

show more ...


# 9de8b05b 26-Jun-2022 Sunho Kim <ksunhokim123@gmail.com>

[clang-repl] Support destructors of global objects.

Supports destructors of global objects by properly calling jitdylib deinitialize which calls the global dtors of ir modules.

This supersedes http

[clang-repl] Support destructors of global objects.

Supports destructors of global objects by properly calling jitdylib deinitialize which calls the global dtors of ir modules.

This supersedes https://reviews.llvm.org/D127945. There was an issue when calling deinitialize on windows but it got fixed by https://reviews.llvm.org/D128037.

Reviewed By: v.g.vassilev

Differential Revision: https://reviews.llvm.org/D128589

show more ...


# ac6c5c5e 24-Jun-2022 Vassil Vassilev <v.g.vassilev@gmail.com>

Reland "[clang-repl] Recover the lookup tables of the primary context."

The asan issue was fixed in llvm/llvm-project@7bc00ce5cd41

This reverts commit 575e297fcb289f0a9b0ac4b01d1d0fa051f5cc29.

Dif

Reland "[clang-repl] Recover the lookup tables of the primary context."

The asan issue was fixed in llvm/llvm-project@7bc00ce5cd41

This reverts commit 575e297fcb289f0a9b0ac4b01d1d0fa051f5cc29.

Differential revision: https://reviews.llvm.org/D123674

show more ...


# cd64a427 18-Jun-2022 Jun Zhang <jun@junz.org>

Reland "[CodeGen] Keep track info of lazy-emitted symbols in ModuleBuilder"

This reverts commits:
d3ddc251acae631bf5ab4da13878f7e8b5b5a451
d90eecff5c9e7e9f8263de6cd72d70322400829f

It turned out the

Reland "[CodeGen] Keep track info of lazy-emitted symbols in ModuleBuilder"

This reverts commits:
d3ddc251acae631bf5ab4da13878f7e8b5b5a451
d90eecff5c9e7e9f8263de6cd72d70322400829f

It turned out there're some options turned on that leaks the memory
intentionally, which fires the asan builds after the patch being
applied. The issue has been fixed in
7bc00ce5cd41aad5fd0775f58c8e85a0a8d9ee56, so reland it.

Below is the original commit message:

The intent of this patch is to selectively carry some states over to
the Builder so we won't lose the information of the previous symbols.

This used to be several downstream patches of Cling, it aims to fix
errors in Clang Interpreter when trying to use inline functions.
Before this patch:

clang-repl> inline int foo() { return 42;}
clang-repl> int x = foo();

JIT session error: Symbols not found: [ _Z3foov ]
error: Failed to materialize symbols:
{ (main, { x, $.incr_module_1.__inits.0, __orc_init_func.incr_module_1 }) }

Co-authored-by: Axel Naumann <Axel.Naumann@cern.ch>
Signed-off-by: Jun Zhang <jun@junz.org>

show more ...


# 44f0a265 14-Jun-2022 Jun Zhang <jun@junz.org>

Revert "Reland "[CodeGen] Keep track info of lazy-emitted symbols in ModuleBuilder""

This reverts commit 781ee538da1855876b085989a37ec959e3f2ecd1.

Asan build is still broken :(


# 781ee538 14-Jun-2022 Jun Zhang <jun@junz.org>

Reland "[CodeGen] Keep track info of lazy-emitted symbols in ModuleBuilder"

This reverts commits:
d3ddc251acae631bf5ab4da13878f7e8b5b5a451
d90eecff5c9e7e9f8263de6cd72d70322400829f

This relands belo

Reland "[CodeGen] Keep track info of lazy-emitted symbols in ModuleBuilder"

This reverts commits:
d3ddc251acae631bf5ab4da13878f7e8b5b5a451
d90eecff5c9e7e9f8263de6cd72d70322400829f

This relands below commit with asan fix:

The intent of this patch is to selectively carry some states over to
the Builder so we won't lose the information of the previous symbols.

This used to be several downstream patches of Cling, it aims to fix
errors in Clang Interpreter when trying to use inline functions.
Before this patch:

clang-repl> inline int foo() { return 42;}
clang-repl> int x = foo();

JIT session error: Symbols not found: [ _Z3foov ]
error: Failed to materialize symbols:
{ (main, { x, $.incr_module_1.__inits.0, __orc_init_func.incr_module_1 }) }

Co-authored-by: Axel Naumann <Axel.Naumann@cern.ch>
Signed-off-by: Jun Zhang <jun@junz.org>

Differential Revision: https://reviews.llvm.org/D127730

show more ...


# d3ddc251 13-Jun-2022 Mitch Phillips <31459023+hctim@users.noreply.github.com>

Revert "[CodeGen] Keep track info of lazy-emitted symbols in ModuleBuilder"

This reverts commit b8f9459715815fa055b3e1c5f970c616797dfcfb.

Broke the ASan buildbot. See https://reviews.llvm.org/D1267

Revert "[CodeGen] Keep track info of lazy-emitted symbols in ModuleBuilder"

This reverts commit b8f9459715815fa055b3e1c5f970c616797dfcfb.

Broke the ASan buildbot. See https://reviews.llvm.org/D126781 for more
information.

show more ...


Revision tags: llvmorg-14.0.5
# b8f94597 09-Jun-2022 Jun Zhang <jun@junz.org>

[CodeGen] Keep track info of lazy-emitted symbols in ModuleBuilder

The intent of this patch is to selectively carry some states over to
the Builder so we won't lose the information of the previous s

[CodeGen] Keep track info of lazy-emitted symbols in ModuleBuilder

The intent of this patch is to selectively carry some states over to
the Builder so we won't lose the information of the previous symbols.

This used to be several downstream patches of Cling, it aims to fix
errors in Clang Interpreter when trying to use inline functions.
Before this patch:

clang-repl> inline int foo() { return 42;}
clang-repl> int x = foo();

JIT session error: Symbols not found: [ _Z3foov ]
error: Failed to materialize symbols:
{ (main, { x, $.incr_module_1.__inits.0, __orc_init_func.incr_module_1 }) }

Co-authored-by: Axel Naumann <Axel.Naumann@cern.ch>
Signed-off-by: Jun Zhang <jun@junz.org>

Differential Revision: https://reviews.llvm.org/D126781

show more ...


# 575e297f 31-May-2022 Vassil Vassilev <v.g.vassilev@gmail.com>

Revert "[clang-repl] Recover the lookup tables of the primary context."

This reverts commit 5ff27fe1ff03d5aeaf8567c97618170f0cef8f58.

This patch caused failures in asan: https://lab.llvm.org/buildb

Revert "[clang-repl] Recover the lookup tables of the primary context."

This reverts commit 5ff27fe1ff03d5aeaf8567c97618170f0cef8f58.

This patch caused failures in asan: https://lab.llvm.org/buildbot/#/builders/5/builds/24221

show more ...


# 5ff27fe1 29-May-2022 Purva-Chaudhari <purva.chaudhari02@gmail.com>

[clang-repl] Recover the lookup tables of the primary context.

Before this patch, there was re-declaration error if error was encountered in
the same line. The recovery support acted only if this ty

[clang-repl] Recover the lookup tables of the primary context.

Before this patch, there was re-declaration error if error was encountered in
the same line. The recovery support acted only if this type of error was
encountered in the first line of the program and not in subsequent lines.

For example:

```
clang-repl> int i=9;
clang-repl> int j=9; err;
input_line_3:1:5: error: redefinition of 'j'
int j = 9;
```

Differential revision: https://reviews.llvm.org/D123674

show more ...


Revision tags: llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init
# f01d45c3 10-Jul-2021 Vassil Vassilev <v.g.vassilev@gmail.com>

Reland "[clang-repl] Allow passing in code as positional arguments."

This reverts commit 3ec88ca60b24 which reverted e386871e1d21 due to a asan build
failure.

This patch removes the new lines in th

Reland "[clang-repl] Allow passing in code as positional arguments."

This reverts commit 3ec88ca60b24 which reverted e386871e1d21 due to a asan build
failure.

This patch removes the new lines in the test case which seem to introduce the
failure.

Differential revision: https://reviews.llvm.org/D104898

show more ...


# 3ec88ca6 02-Jul-2021 Mitch Phillips <31459023+hctim@users.noreply.github.com>

Revert "[clang-repl] Allow passing in code as positional arguments."

This reverts commit e386871e1d21cf206a1287356e88c5853563fc77.

Reason: Broke the ASan buildbots
(https://lab.llvm.org/buildbot/#/

Revert "[clang-repl] Allow passing in code as positional arguments."

This reverts commit e386871e1d21cf206a1287356e88c5853563fc77.

Reason: Broke the ASan buildbots
(https://lab.llvm.org/buildbot/#/builders/5/builds/9291). See comments
on https://reviews.llvm.org/D104898 for more information.

show more ...


12