aboutsummaryrefslogtreecommitdiff
path: root/clang/examples/clang-interpreter
AgeCommit message (Collapse)AuthorFilesLines
2021-10-27[clang-repl] Remove redundant link libraries and drop unused file.Vassil Vassilev1-235/+0
Many thanks to @thakis for pointing this out. That commit should have been a part of https://reviews.llvm.org/D107049
2021-10-26Reinstate "[clang-repl] Re-implement clang-interpreter as a test case."Vassil Vassilev3-146/+0
Original commit message: " Original commit message: " Original commit message: " Original commit message:" The current infrastructure in lib/Interpreter has a tool, clang-repl, very similar to clang-interpreter which also allows incremental compilation. This patch moves clang-interpreter as a test case and drops it as conditionally built example as we already have clang-repl in place. " This patch also ignores ppc due to missing weak symbol for __gxx_personality_v0 which may be a feature request for the jit infrastructure. Also, adds a missing build system dependency to the orc jit. " Additionally, this patch defines a custom exception type and thus avoids the requirement to include header <exception>, making it easier to deploy across systems without standard location of the c++ headers. " This patch also works around PR49692 and finds a way to use llvm::consumeError in rtti mode. " This patch also checks if stl is built with rtti. Differential revision: https://reviews.llvm.org/D107049
2021-10-08Revert "Reland "[clang-repl] Re-implement clang-interpreter as a test case.""Leonard Chan3-0/+146
This reverts commit 1dba6b37bdc70210f75a480eff3715ebe1f1d8be. Reverting because the ClangReplInterpreterExceptionTests test fails on our builders with this patch.
2021-10-08Reland "[clang-repl] Re-implement clang-interpreter as a test case."Vassil Vassilev3-146/+0
Original commit message: " Original commit message: " Original commit message:" The current infrastructure in lib/Interpreter has a tool, clang-repl, very similar to clang-interpreter which also allows incremental compilation. This patch moves clang-interpreter as a test case and drops it as conditionally built example as we already have clang-repl in place. Differential revision: https://reviews.llvm.org/D107049 " This patch also ignores ppc due to missing weak symbol for __gxx_personality_v0 which may be a feature request for the jit infrastructure. Also, adds a missing build system dependency to the orc jit. " Additionally, this patch defines a custom exception type and thus avoids the requirement to include header <exception>, making it easier to deploy across systems without standard location of the c++ headers. " This patch also works around PR49692 and finds a way to use llvm::consumeError in rtti mode. Differential revision: https://reviews.llvm.org/D107049
2021-09-03Revert "Reland "[clang-repl] Re-implement clang-interpreter as a test case.""Vassil Vassilev3-0/+146
This reverts commit 6fe2beba7d2a41964af658c8c59dd172683ef739 which fails on clang-hexagon-elf
2021-09-03Reland "[clang-repl] Re-implement clang-interpreter as a test case."Vassil Vassilev3-146/+0
Original commit message: " Original commit message:" The current infrastructure in lib/Interpreter has a tool, clang-repl, very similar to clang-interpreter which also allows incremental compilation. This patch moves clang-interpreter as a test case and drops it as conditionally built example as we already have clang-repl in place. Differential revision: https://reviews.llvm.org/D107049 " This patch also ignores ppc due to missing weak symbol for __gxx_personality_v0 which may be a feature request for the jit infrastructure. Also, adds a missing build system dependency to the orc jit. " Additionally, this patch defines a custom exception type and thus avoids the requirement to include header <exception>, making it easier to deploy across systems without standard location of the c++ headers. Differential revision: https://reviews.llvm.org/D107049
2021-09-01Revert "Reland "[clang-repl] Re-implement clang-interpreter as a test case.""Nico Weber3-0/+146
This reverts commit f0514a4d26100239088f08d618f2ba100f59958e. Test fails on macOS: https://reviews.llvm.org/D107049#2976603
2021-09-01Reland "[clang-repl] Re-implement clang-interpreter as a test case."Vassil Vassilev3-146/+0
Original commit message:" The current infrastructure in lib/Interpreter has a tool, clang-repl, very similar to clang-interpreter which also allows incremental compilation. This patch moves clang-interpreter as a test case and drops it as conditionally built example as we already have clang-repl in place. Differential revision: https://reviews.llvm.org/D107049 " This patch also ignores ppc due to missing weak symbol for __gxx_personality_v0 which may be a feature request for the jit infrastructure. Also, adds a missing build system dependency to the orc jit.
2021-09-01Revert "[clang-repl] Re-implement clang-interpreter as a test case."Vassil Vassilev3-0/+146
This reverts commit 319ce98011742141dad8dd95a2f9de9c0449be5c because it fails on various platforms.
2021-09-01[clang-repl] Re-implement clang-interpreter as a test case.Vassil Vassilev3-146/+0
The current infrastructure in lib/Interpreter has a tool, clang-repl, very similar to clang-interpreter which also allows incremental compilation. This patch moves clang-interpreter as a test case and drops it as conditionally built example as we already have clang-repl in place. Differential revision: https://reviews.llvm.org/D107049
2021-08-05Fix clang-interpreter build after 2487db1f286222e2501c2fa8e8244eda13f6afc3Jon Roelofs1-1/+2
2020-10-24Unbreak the clang-interpreter example after ↵Benjamin Kramer1-0/+5
0aec49c8531bc5282b095730d34681455826bc2c
2020-02-19[examples] Fix the clang-interpreter example for changes in 85fb997659b.Lang Hames1-1/+1
2020-01-21Update clang-interpreter example to incorporate changes in ce2207abaf9.Lang Hames1-1/+2
2019-12-05Fix the clang interpreter example which was broken by 4fc68b9b7f3e0.Lang Hames1-3/+4
2019-08-28Fixup build of clang-interpreter example after change in r370122.Douglas Yung1-5/+1
This should fix the build failure on llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast. llvm-svn: 370151
2019-08-14[Clang] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere1-1/+1
Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368942
2019-08-14[ORC] Fix clang-interpreter example code broken by r368707.Douglas Yung1-3/+4
llvm-svn: 368778
2019-07-18Update the SimpleJIT class in the clang-interpreter example to use ORCv2.Lang Hames1-44/+53
This will remove the ORCv1 deprecation warnings. llvm-svn: 366511
2019-07-03cmake: Add CLANG_LINK_CLANG_DYLIB optionTom Stellard1-1/+1
Summary: Setting CLANG_LINK_CLANG_DYLIB=ON causes clang tools to link against libclang_shared.so instead of the individual component libraries. Reviewers: mgorny, beanz, smeenai, phosek, sylvestre.ledru Subscribers: arphaman, cfe-commits, llvm-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63503 llvm-svn: 365092
2019-03-04[build] Rename clang-headers to clang-resource-headersShoaib Meenai1-1/+1
Summary: The current install-clang-headers target installs clang's resource directory headers. This is different from the install-llvm-headers target, which installs LLVM's API headers. We want to introduce the corresponding target to clang, and the natural name for that new target would be install-clang-headers. Rename the existing target to install-clang-resource-headers to free up the install-clang-headers name for the new target, following the discussion on cfe-dev [1]. I didn't find any bots on zorg referencing install-clang-headers. I'll send out another PSA to cfe-dev to accompany this rename. [1] http://lists.llvm.org/pipermail/cfe-dev/2019-February/061365.html Reviewers: beanz, phosek, tstellar, rnk, dim, serge-sans-paille Subscribers: mgorny, javed.absar, jdoerfert, #sanitizers, openmp-commits, lldb-commits, cfe-commits, llvm-commits Tags: #clang, #sanitizers, #lldb, #openmp, #llvm Differential Revision: https://reviews.llvm.org/D58791 llvm-svn: 355340
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2-8/+6
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
2018-12-15Link examples/clang-interpreter against clangSerializationKristof Umann1-0/+1
llvm-svn: 349279
2018-11-19Test commit - delete trailing space.Michael Platings1-1/+1
llvm-svn: 347194
2018-10-16Fix buildbots - update clang-interpreter to use Legacy ORC classes ↵Simon Pilgrim1-3/+3
introduced in rL344572. llvm-svn: 344598
2018-10-12Fix a clang::driver::ArgStringList usage I missed in rL344398. NFCI.Simon Pilgrim1-1/+1
llvm-svn: 344400
2018-06-03clang-interpreter: Add missing LLVM component ObjectFangrui Song1-0/+1
llvm-svn: 333836
2018-05-25Convert clang-interpreter to ORC JIT APIStephane Sezer6-506/+84
Summary: This mostly re-uses code from the KaleidoscopeJIT example. Reviewers: ddunbar, lhames Reviewed By: lhames Subscribers: mgrang, alexshap, mgorny, xiaobai, cfe-commits Differential Revision: https://reviews.llvm.org/D45897 llvm-svn: 333302
2018-04-27s/LLVM_ON_WIN32/_WIN32/, clangNico Weber1-1/+1
LLVM_ON_WIN32 is set exactly with MSVC and MinGW (but not Cygwin) in HandleLLVMOptions.cmake, which is where _WIN32 defined too. Just use the default macro instead of a reinvented one. See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev. No intended behavior change. llvm-svn: 331069
2018-03-21clang-interpreter example cmake fixLuke Cheeseman1-1/+1
Add in a space when appending the export to the linker options. Without the space the export is appended onto whatever the last link option was, which might be a file. llvm-svn: 328092
2018-03-14[CMake] Properly quote string arguments to quiet errors from r327528 when builtFrederich Munch1-7/+7
with LLVM_ENABLE_EH and LLVM_ENABLE_RTTI. llvm-svn: 327531
2018-03-14Expand clang-interpreter with example of throwing in and from the JIT for ↵Frederich Munch8-49/+621
Windows64. Summary: Getting this to work is not particularly obvious, and having it as an example should be helpful. Portions of this could be placed into LLVM, but as a whole it seems necessary to do this a higher level. Reviewers: lhames, mehdi_amini Reviewed By: lhames Subscribers: mgrang, martell, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D35103 llvm-svn: 327528
2017-12-05[CMake] Use PRIVATE in target_link_libraries for executablesShoaib Meenai1-0/+1
We currently use target_link_libraries without an explicit scope specifier (INTERFACE, PRIVATE or PUBLIC) when linking executables. Dependencies added in this way apply to both the target and its dependencies, i.e. they become part of the executable's link interface and are transitive. Transitive dependencies generally don't make sense for executables, since you wouldn't normally be linking against an executable. This also causes issues for generating install export files when using LLVM_DISTRIBUTION_COMPONENTS. For example, clang has a lot of LLVM library dependencies, which are currently added as interface dependencies. If clang is in the distribution components but the LLVM libraries it depends on aren't (which is a perfectly legitimate use case if the LLVM libraries are being built static and there are therefore no run-time dependencies on them), CMake will complain about the LLVM libraries not being in export set when attempting to generate the install export file for clang. This is reasonable behavior on CMake's part, and the right thing is for LLVM's build system to explicitly use PRIVATE dependencies for executables. Unfortunately, CMake doesn't allow you to mix and match the keyword and non-keyword target_link_libraries signatures for a single target; i.e., if a single call to target_link_libraries for a particular target uses one of the INTERFACE, PRIVATE, or PUBLIC keywords, all other calls must also be updated to use those keywords. This means we must do this change in a single shot. I also fully expect to have missed some instances; I tested by enabling all the projects in the monorepo (except dragonegg), and configuring both with and without shared libraries, on both Darwin and Linux, but I'm planning to rely on the buildbots for other configurations (since it should be pretty easy to fix those). Even after this change, we still have a lot of target_link_libraries calls that don't specify a scope keyword, mostly for shared libraries. I'm thinking about addressing those in a follow-up, but that's a separate change IMO. Differential Revision: https://reviews.llvm.org/D40823 llvm-svn: 319840
2017-01-14Add LLVMOption to clang-interpreter, corresponding to r291938.NAKAMURA Takumi1-0/+1
llvm-svn: 292007
2017-01-06Reapply "IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase ↵David Blaikie1-1/+1
and CodeCompleteConsumer" Aleksey Shlypanikov pointed out my mistake in migrating an explicit unique_ptr to auto - I was expecting the function returned a unique_ptr, but instead it returned a raw pointer - introducing a leak. Thanks Aleksey! This reapplies r291184, reverted in r291249. llvm-svn: 291270
2017-01-06Revert "Fix examples for recent shared_ptrification"David Blaikie1-1/+1
(should've rolled in to this revert of the CompilerInstance change in the first place... anyway) This reverts commit r291185. llvm-svn: 291252
2017-01-05Fix examples for recent shared_ptrificationDavid Blaikie1-1/+1
llvm-svn: 291185
2016-01-26Remove autoconf supportChris Bieneman1-28/+0
Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "This is the way [autoconf] ends Not with a bang but a whimper." -T.S. Eliot Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D16472 llvm-svn: 258862
2014-10-03Driver: Update clang-interpreter example for r218938Justin Bogner1-2/+2
llvm-svn: 218942
2014-09-04unique_ptrify JobList::JobsDavid Blaikie1-4/+4
llvm-svn: 217168
2014-09-03Fix configure and make build of clang-interpreter.Iain Sandoe1-2/+4
Replaced 'jit' link component with 'mcjit'. Updated the required libraries. llvm-svn: 217033
2014-09-02Reinstate "Update for llvm API change.""Eric Christopher1-1/+0
This reinstates r215113. llvm-svn: 216986
2014-08-19Go back to having a takeModule instead of a getModule.Rafael Espindola1-1/+1
Returning a std::unique_ptr is more constrained. Thanks to David Blaikie for the suggestion. llvm-svn: 215979
2014-08-19Update for llvm api change.Rafael Espindola1-13/+15
llvm-svn: 215968
2014-08-07Temporarily Revert "Update for llvm API change."Eric Christopher1-0/+1
This reverts commit 215113 to match the reversion in llvm. llvm-svn: 215156
2014-08-07Update for llvm API change.Rafael Espindola1-1/+0
llvm-svn: 215113
2014-07-24Use ELF in the clang-interpreter on windows.Rafael Espindola1-1/+8
We don't support loading COFF files yet. llvm-svn: 213893
2014-07-24Attempt at fixing the windows shared build.Rafael Espindola1-0/+1
llvm-svn: 213881
2014-07-24Use MCJIT.Rafael Espindola2-2/+5
llvm-svn: 213879
2014-07-24Remove the last use of llvm::ExecutionEngine::create.Rafael Espindola1-2/+9
llvm-svn: 213869