aboutsummaryrefslogtreecommitdiff
path: root/clang/examples/clang-interpreter/main.cpp
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-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-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth1-4/+3
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-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-05-25Convert clang-interpreter to ORC JIT APIStephane Sezer1-52/+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-03-14Expand clang-interpreter with example of throwing in and from the JIT for ↵Frederich Munch1-47/+62
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-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
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-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-24Use MCJIT.Rafael Espindola1-1/+4
llvm-svn: 213879
2014-07-24Remove the last use of llvm::ExecutionEngine::create.Rafael Espindola1-2/+9
llvm-svn: 213869
2014-07-09clang-interpreter: don't check input file existence, we're in-processAlp Toker1-0/+1
This flag is set by most other tools and avoids extra stat() calls. The frontend will diagnose anyway as it performs the check atomically while opening files at point of use. We could probably make Driver::CheckInputsExist default to false and only enable it in the main 'clang' binary, or even better only perform the checks if we know the tool is external but that needs more thought. llvm-svn: 212585
2014-07-01clang-interpreter: use LLVM interpreter if JIT is unavailableAlp Toker1-3/+3
Update the strategy in r212083 to try JIT first and otherwise fall back to the interpreter. This gives the best of both worlds and still builds fine with no targets enabled. Requires supporting changes from LLVM r212086. llvm-svn: 212087
2014-07-01clang-interpreter: interpret instead of JITingAlp Toker1-3/+3
Fixes the build when no targets are selected, or no native target is built. This also better matches up with the description/title of the example and demonstrates how clang can be used to run C++ on constrained environments without file IO or executable memory permissions (e.g. iOS apps). A comment is added explaining how to extend the demo with JIT support as needed. llvm-svn: 212083
2014-05-15Eliminate DefaultImageName from the Driver constructorAlp Toker1-1/+1
All callers were passing in "a.out" or garbage so a sensible default works fine here as a cleanup. This also brings about the possibility of adapting the value based on the driver's compatibility mode in future. The setting can still be changed via Driver::DefaultImageName as needed. llvm-svn: 208926
2014-03-09Fix build break, replace take() with release().Ahmed Charles1-1/+1
llvm-svn: 203390
2014-03-09[C++11] Replace OwningPtr include with <memory>.Ahmed Charles1-1/+1
llvm-svn: 203389
2014-03-09[C++11] Remove the remaining uses of OwningPtr.Ahmed Charles1-5/+5
Replace OwningArrayPtr with std::unique_ptr<T[]>. llvm-svn: 203388
2013-09-12Move Compilation::PrintJob and PrintDiagnosticJob into Job::Print.Hans Wennborg1-2/+2
This moves the code to Job.cpp, which seems like a more natural fit, and replaces the "is this a JobList? is this a Command?" logic with a virtual function call. It also removes the code duplication between PrintJob and PrintDiagnosticJob and simplifies the code a little. There's no functionality change here, except that the Executable is now always printed within quotes, whereas it would previously not be quoted in crash reports, which I think was a bug. Differential Revision: http://llvm-reviews.chandlerc.com/D1653 llvm-svn: 190620
2013-06-26Remove unused header.Rafael Espindola1-1/+0
llvm-svn: 184945
2013-06-26Use llvm::sys::fs::getMainExecutable.Rafael Espindola1-4/+5
llvm-svn: 184915
2013-06-17Include PathV1.h only where it is used.Rafael Espindola1-0/+1
llvm-svn: 184090
2013-01-20Nuke SetUpBuildDumpLog.Sean Silva1-1/+1
Also, it was the only reason that `argc` and `argv` were being passed into createDiagnostics, so remove those parameters and clean up callers. llvm-svn: 172945
2013-01-16Use getProcessTriple in clang-interpreter.Peter Collingbourne1-2/+1
llvm-svn: 172664
2013-01-12Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko1-1/+1
brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
2013-01-02Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate toChandler Carruth1-1/+1
reflect the migration in r171366. Re-sort the #include lines to reflect the new paths. llvm-svn: 171369
2012-12-04Sort the #include lines for examples/...Chandler Carruth1-7/+6
llvm-svn: 169241
2012-11-27Fix examples.Rafael Espindola1-1/+1
llvm-svn: 168705
2012-10-23Update clang-interpreter exampleDouglas Gregor1-3/+4
llvm-svn: 166510
2012-02-20Basic: import IntrusiveRefCntPtr<> into clang namespaceDylan Noblesmith1-1/+1
The class name is long enough without the llvm:: added. Also bring in RefCountedBase and RefCountedBaseVPTR. llvm-svn: 150958
2012-02-13drop more llvm:: prefixes on SmallString<>Dylan Noblesmith1-1/+1
More cleanup after r149799. llvm-svn: 150380
2012-02-13drop more llvm:: prefixes on OwningPtr<>Dylan Noblesmith1-4/+4
More cleanup after r149798. llvm-svn: 150379
2011-12-22remove unneeded config.h includesDylan Noblesmith1-2/+0
llvm-svn: 147195