[PATCH] D156858: Add Documentation for Execution Results Handling in Clang-REPL

2023-08-05 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. I want to clarify: We offer two features: 1. capture the execution results and bring it back to the compiled program. 2. dump the captured value (value printing/automatic printf) and all the parsing, ast transform and balabala, these are all implementation details. The

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/lib/Interpreter/ValuePrinter.cpp:262 + +static llvm::Expected CompileDecl(Interpreter &Interp, + Decl *D) { v.g.vassilev wrote: > Let's add a FIXME here. Th

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 526566. junaire marked 2 inline comments as done. junaire added a comment. Add LLVM preamble Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/cl

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-28 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/tools/clang-repl/CMakeLists.txt:40 + ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z + ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z + ??$?6U?$char_traits@D@std@

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-28 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 526383. junaire added a comment. Make CreateUniqName a static helper Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpre

[PATCH] D151620: [clang-repl] Fix REPL_EXTERNAL_VISIBILITY and building libclang-cpp.dll for MinGW configurations

2023-05-28 Thread Jun Zhang via Phabricator via cfe-commits
junaire accepted this revision. junaire added a comment. This revision is now accepted and ready to land. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151620/new/ https://reviews.llvm.org/D151620 __

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-27 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 526256. junaire added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/I

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-24 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 525425. junaire added a comment. Remove `Interpereter::getParser` + More clean up Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpr

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-24 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/lib/Interpreter/Interpreter.cpp:434 + +llvm::Expected Interpreter::CompileDecl(Decl *D) { + assert(D && "The Decl being compiled can't be null"); aaron.ballman wrote: > Any way to make this take a `const Decl *` i

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-24 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 525420. junaire marked 15 inline comments as done. junaire added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/c

[PATCH] D150937: [clang-repl] Disable all tests on unsupported platforms

2023-05-23 Thread Jun Zhang via Phabricator via cfe-commits
junaire abandoned this revision. junaire added a comment. This isn't an ideal solution after an off-list discussion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150937/new/ https://reviews.llvm.org/D150937 ___

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-21 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 524096. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/Interp

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-21 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 524093. junaire added a comment. add `caas` namespace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/i

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-21 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 524091. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/Interp

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-21 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. Invite more people to the party :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-21 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 524088. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/Interp

[PATCH] D150937: [clang-repl] Disable all tests on unsupported platforms

2023-05-19 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 523697. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150937/new/ https://reviews.llvm.org/D150937 Files: clang/test/Interpreter/incremental-mode.cpp clang/unittests/Interpreter/

[PATCH] D150937: [clang-repl] Disable all tests on unsupported platforms

2023-05-19 Thread Jun Zhang via Phabricator via cfe-commits
junaire created this revision. Herald added a project: All. junaire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Signed-off-by: Jun Zhang Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D150937 Files: clang/unittest

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-16 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. Because I have edited the commit messages several times so I forgot to include the revision link. Sorry. I have landed it as https://reviews.llvm.org/rGa423b7f1d7ca8b263af85944f57a69aa08fc942c Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-05-16 Thread Jun Zhang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG247fa04116a6: [clang] Add a new annotation token: annot_repl_input_end (authored by junaire). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148997/new/ http

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-16 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 522545. junaire added a comment. remove whitespace Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter.h clang/incl

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-16 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 522530. junaire added a comment. Address comment from Vassil, thx Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-16 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 522527. junaire added a comment. Add comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/c

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-14 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 521985. junaire added a comment. Make and use our own std::void_t Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-14 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 521981. junaire added a comment. - include to avoid incorrect lookup on Windows - Add `-Xcc -fno-delayed-template-parsing` to fix failure on Windows Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ ht

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-13 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 521962. junaire added a comment. Add macro guard. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/inclu

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-13 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 521961. junaire added a comment. Don't use C++17 because Clang on Windows is not default to that :( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/inc

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-12 Thread Jun Zhang via Phabricator via cfe-commits
junaire marked 10 inline comments as done. junaire added inline comments. Comment at: clang/include/clang/Interpreter/Value.h:160-162 + // Interpreter, QualType are stored as void* to reduce dependencies. + void *Interp = nullptr; + void *OpaqueType = nullptr;

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-10 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 520998. junaire added a comment. Export symbols in Windows. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h c

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-09 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 520914. junaire added a comment. Add some comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/incl

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-09 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 520913. junaire added a comment. Remove unused code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/in

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-09 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 520912. junaire added a comment. Fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/Inte

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-08 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 520326. junaire marked an inline comment as done. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-08 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 520324. junaire added a comment. Rebase + Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/AST/Decl.h clang/include/clang/Basic/T

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-05-08 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 520313. junaire added a comment. Update + Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148997/new/ https://reviews.llvm.org/D148997 Files: clang/include/clang/AST/Decl.h clang/include/clang/Basic/T

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518961. junaire added a comment. Fix typos Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clan

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/include/clang/Interpreter/Interpreter.h:59 + + Value LastValue; v.g.vassilev wrote: > aaron.ballman wrote: > > I think I'm surprised to see this as a data member of `Interpreter` but > > mostly because my brain

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518960. junaire marked 2 inline comments as done. junaire added a comment. Add more comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/c

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/include/clang/Interpreter/Value.h:46 + +#define REPL_BUILTIN_TYPES \ + X(bool, Bool) \ aaron.bal

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518952. junaire marked 16 inline comments as done. junaire added a comment. Address comments from @aaron.ballman, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D1412

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/lib/Interpreter/IncrementalParser.cpp:162 + if (P->getCurToken().is(tok::annot_repl_input_end)) { +P->ConsumeAnyToken(); // FIXME: Clang does not call ExitScope on finalizing the regular TU, we rsmith wro

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-05-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518738. junaire marked 3 inline comments as done. junaire added a comment. Address comments, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148997/new/ https://reviews.llvm.org/D148997 Files: clang/in

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-01 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/test/Interpreter/pretty-print.cpp:107 +p2 +// CHECK-NEXT: (std::_MakeUniq::__single_object &) std::unique_ptr -> [[Addr:@0x.*]] + junaire wrote: > Hi @mizvekov, do you have a clue about why it doesn't print the co

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-05-01 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518458. junaire added a comment. Fix AutoType sugar Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/inc

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-01 Thread Jun Zhang via Phabricator via cfe-commits
junaire marked an inline comment as done. junaire added inline comments. Comment at: clang/lib/Interpreter/Interpreter.cpp:211 +void __clang_Interpreter_SetValueNoAlloc(void*,void*,void*,unsigned long long); +template +void __clang_Interpreter_SetValueCopyArr(T* Src

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-05-01 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518450. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/Interp

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-05-01 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518448. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148997/new/ https://reviews.llvm.org/D148997 Files: clang/include/clang/AST/Decl.h clang/include/clang/Basic/TokenKinds.def

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518292. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/Interp

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/include/clang/Interpreter/Value.h:121 +static T cast(const Value &V) { + if (V.isPointerOrObjectType()) +return (T)(uintptr_t)V.getAs(); aaron.ballman wrote: > v.g.vassilev wrote: > > aaron.ballman

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518290. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/Interp

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-04-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/test/Interpreter/pretty-print.cpp:107 +p2 +// CHECK-NEXT: (std::_MakeUniq::__single_object &) std::unique_ptr -> [[Addr:@0x.*]] + Hi @mizvekov, do you have a clue about why it doesn't print the correct type? So i

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-04-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518289. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/Interp

[PATCH] D148209: Add baseline tests for D148210

2023-04-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518288. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148209/new/ https://reviews.llvm.org/D148209 Files: llvm/test/Transforms/InstCombine/icmp.ll Index: llvm/test/Transforms/Inst

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-04-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518287. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/Interp

[PATCH] D148209: Add baseline tests for D148210

2023-04-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518286. junaire added a comment. Herald added subscribers: cfe-commits, mstorsjo. Herald added a project: clang. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148209/new/ https://reviews.llvm.org/D148209 Fil

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-30 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518285. junaire marked 3 inline comments as done. junaire added a comment. Only enable __clang_Interpreter_SetValueCopyArr support in C++ mode. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://

[PATCH] D146809: [clang-repl] Implement Value pretty printing

2023-04-29 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518266. junaire added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/Interp

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-29 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518265. junaire added a comment. Add unittests for void & member pointers types Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpret

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-29 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/include/clang/Interpreter/Interpreter.h:96 + + size_t getEffectivePTUSize() const; + aaron.ballman wrote: > It looks like this can be private? > > Also, just a note (not something you have to deal with in this re

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-29 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 518166. junaire marked 4 inline comments as done. junaire added a comment. Partially address some comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: cl

[PATCH] D146809: [WIP][clang-repl] Implement Value pretty printing

2023-04-28 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 517836. junaire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/I

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-04-28 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:7219 void CodeGenModule::moveLazyEmissionStates(CodeGenModule *NewBuilder) { - assert(DeferredDeclsToEmit.empty() && - "Should have emitted all decls deferred to emit."); + // FIXME: Re-enab

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-04-28 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. This patch is part of D141215 . I split it as some jit people requested. I don't know if there's a good way to test the patch, please leave a comment if you have an idea. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-28 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 517829. junaire added a comment. fix windows buildbots Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter.h clang/

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-22 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 516081. junaire added a comment. Rebuild, please. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/Interpreter/Interpreter.h clang/inclu

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-22 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 516080. junaire added a comment. Break the IsSemiMissing/ repl_input_end parts out from the Value part Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-04-22 Thread Jun Zhang via Phabricator via cfe-commits
junaire created this revision. Herald added a project: All. junaire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch is the first part of the below RFC: https://discourse.llvm.org/t/rfc-handle-execution-results-in-clang-repl/68493

[PATCH] D148435: [clang-repl] Do not assert if we have weak references left.

2023-04-17 Thread Jun Zhang via Phabricator via cfe-commits
junaire accepted this revision. junaire added a comment. This revision is now accepted and ready to land. This patch fixes issues that have not been found in the past. This unblocks D141215 and D146809 . Since it's only relevan

[PATCH] D146809: [WIP][clang-repl] Implement Value pretty printing

2023-04-17 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 514160. junaire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/include/clang/I

[PATCH] D146809: [WIP][clang-repl] Implement Value pretty printing

2023-04-16 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 513971. junaire added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/lib/Headers/CMa

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-15 Thread Jun Zhang via Phabricator via cfe-commits
junaire marked an inline comment as done. junaire added inline comments. Comment at: clang/include/clang/Interpreter/Value.h:98 + QualType getType() const; + Interpreter &getInterpreter() const; + sgraenitz wrote: > Can we make this private and try not to intro

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-15 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 513954. junaire marked an inline comment as done. junaire added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/AST/Dec

[PATCH] D148434: [clang-repl] JITTargetAddress --> ExecutorAddr

2023-04-15 Thread Jun Zhang via Phabricator via cfe-commits
junaire marked an inline comment as done. junaire added inline comments. Comment at: clang/lib/Interpreter/IncrementalExecutor.cpp:88 return Sym.takeError(); - return Sym->getValue(); + return llvm::orc::ExecutorAddr(Sym->getValue()); } sgraenitz wrote: >

[PATCH] D148434: [clang-repl] JITTargetAddress --> ExecutorAddr

2023-04-15 Thread Jun Zhang via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. junaire marked an inline comment as done. Closed by commit rGfe1f34453d7e: [clang-repl] JITTargetAddress --> ExecutorAddr, NFC (authored by junaire). Changed prior to

[PATCH] D146809: [WIP][clang-repl] Implement Value pretty printing

2023-04-15 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 513927. junaire added a comment. Sync Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/lib/Headers/CMake

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-15 Thread Jun Zhang via Phabricator via cfe-commits
junaire marked an inline comment as done. junaire added inline comments. Comment at: clang/include/clang/Interpreter/Value.h:83 + Value() = default; + Value(void /*Interpreter*/ *In, void /*QualType*/ *Ty); + Value(const Value &RHS); aaron.ballman wrote: > Why

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-15 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 513926. junaire marked an inline comment as done. junaire added a comment. Address more comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/includ

[PATCH] D148434: [clang-repl] JITTargetAddress --> ExecutorAddr

2023-04-15 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 513924. junaire added a comment. Avoid unnecessary changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148434/new/ https://reviews.llvm.org/D148434 Files: clang/include/clang/Interpreter/Interpreter.h cl

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-15 Thread Jun Zhang via Phabricator via cfe-commits
junaire marked 4 inline comments as done. junaire added inline comments. Comment at: clang/include/clang/Interpreter/Interpreter.h:83 /// mangled name. llvm::Expected getSymbolAddress(GlobalDecl GD) const; sgraenitz wrote: > Most of the Orc and JITLink mo

[PATCH] D148434: [clang-repl] JITTargetAddress --> ExecutorAddr

2023-04-15 Thread Jun Zhang via Phabricator via cfe-commits
junaire created this revision. Herald added a project: All. junaire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Signed-off-by: Jun Zhang Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D148434 Files: clang/include/

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-15 Thread Jun Zhang via Phabricator via cfe-commits
junaire marked 16 inline comments as done. junaire added inline comments. Comment at: clang/include/clang/Interpreter/Interpreter.h:72 + llvm::Error ParseAndExecute(llvm::StringRef Code, Value *V = nullptr); + llvm::Expected CompileDtorCall(CXXRecordDecl *CXXRD);

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-15 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 513918. junaire added a comment. Address some comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/AST/Decl.h clang/include/clang/B

[PATCH] D146809: [WIP][clang-repl] Implement Value pretty printing

2023-04-12 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 513024. junaire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/lib/Headers/CMa

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-12 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 512869. junaire added a comment. fix ci Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/AST/Decl.h clang/include/clang/Basic/TokenKinds

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-12 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 512837. junaire added a comment. dont include if we don't have it Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/AST/Decl.h clang/inc

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-12 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 512801. junaire added a comment. use unsigned long instead of std::size_t when including the runtimes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/i

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-09 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 512075. junaire added a comment. Use IncrementalParser::GetMangledName instead Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/AST/Decl.h

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-09 Thread Jun Zhang via Phabricator via cfe-commits
junaire marked 6 inline comments as done. junaire added inline comments. Comment at: clang/include/clang/Interpreter/Interpreter.h:67 create(std::unique_ptr CI); + ASTContext &getASTContext() const; const CompilerInstance *getCompilerInstance() const; v.g.

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-09 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 512073. junaire added a comment. fix some nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/AST/Decl.h clang/include/clang/Basic/Tok

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-09 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 512072. junaire added a comment. Address some comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/AST/Decl.h clang/include/clang/B

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-09 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/include/clang/Interpreter/Interpreter.h:97 + + enum InterfaceKind { NoAlloc, WithAlloc, CopyArray }; + v.g.vassilev wrote: > junaire wrote: > > v.g.vassilev wrote: > > > This can probably go in the RuntimeInterfac

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-09 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 511999. junaire added a comment. Address some comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/AST/Decl.h clang/include/clang/B

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-09 Thread Jun Zhang via Phabricator via cfe-commits
junaire added inline comments. Comment at: clang/include/clang/Interpreter/Interpreter.h:97 + + enum InterfaceKind { NoAlloc, WithAlloc, CopyArray }; + v.g.vassilev wrote: > This can probably go in the RuntimeInterfaceBuilder class. We need it. See: ``` class R

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-09 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 511984. junaire added a comment. Refactor how we compile a destructor Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/AST/Decl.h clang/

[PATCH] D146809: [WIP][clang-repl] Implement Value pretty printing

2023-04-08 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 511871. junaire added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146809/new/ https://reviews.llvm.org/D146809 Files: clang/include/clang/Interpreter/Interpreter.h clang/lib/Headers/CMa

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-08 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 511870. junaire added a comment. Remove some unnecessary code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/AST/Decl.h clang/include

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-08 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 511867. junaire added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/AST/Decl.h clang/include/clang/Basic/

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-08 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 511862. junaire added a comment. Clean up the patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/AST/Decl.h clang/include/clang/Basi

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-08 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 511857. junaire added a comment. Update... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/AST/Decl.h clang/include/clang/Basic/TokenKi

[PATCH] D141215: [clang-repl] Introduce Value to capture expression results

2023-04-05 Thread Jun Zhang via Phabricator via cfe-commits
junaire updated this revision to Diff 511090. junaire added a comment. Remove old code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141215/new/ https://reviews.llvm.org/D141215 Files: clang/include/clang/AST/Decl.h clang/include/clang/Basic/T

  1   2   3   4   >