summaryrefslogtreecommitdiffstats
path: root/llvm/examples/BrainF
Commit message (Collapse)AuthorAgeFilesLines
* Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFCFangrui Song2019-08-051-1/+1
| | | | | | F_{None,Text,Append} are kept for compatibility since r334221. llvm-svn: 367800
* Fix compilation of examples after 13680223b9d8 / r352827James Y Knight2019-02-013-4/+6
| | | | | | Who knew...they're not built by default or as part of the tests. llvm-svn: 352830
* [opaque pointer types] Add a FunctionCallee wrapper type, and use it.James Y Knight2019-02-013-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recommit r352791 after tweaking DerivedTypes.h slightly, so that gcc doesn't choke on it, hopefully. Original Message: The FunctionCallee type is effectively a {FunctionType*,Value*} pair, and is a useful convenience to enable code to continue passing the result of getOrInsertFunction() through to EmitCall, even once pointer types lose their pointee-type. Then: - update the CallInst/InvokeInst instruction creation functions to take a Callee, - modify getOrInsertFunction to return FunctionCallee, and - update all callers appropriately. One area of particular note is the change to the sanitizer code. Previously, they had been casting the result of `getOrInsertFunction` to a `Function*` via `checkSanitizerInterfaceFunction`, and storing that. That would report an error if someone had already inserted a function declaraction with a mismatching signature. However, in general, LLVM allows for such mismatches, as `getOrInsertFunction` will automatically insert a bitcast if needed. As part of this cleanup, cause the sanitizer code to do the same. (It will call its functions using the expected signature, however they may have been declared.) Finally, in a small number of locations, callers of `getOrInsertFunction` actually were expecting/requiring that a brand new function was being created. In such cases, I've switched them to Function::Create instead. Differential Revision: https://reviews.llvm.org/D57315 llvm-svn: 352827
* Revert "[opaque pointer types] Add a FunctionCallee wrapper type, and use it."James Y Knight2019-01-313-18/+18
| | | | | | | | | This reverts commit f47d6b38c7a61d50db4566b02719de05492dcef1 (r352791). Seems to run into compilation failures with GCC (but not clang, where I tested it). Reverting while I investigate. llvm-svn: 352800
* [opaque pointer types] Add a FunctionCallee wrapper type, and use it.James Y Knight2019-01-313-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FunctionCallee type is effectively a {FunctionType*,Value*} pair, and is a useful convenience to enable code to continue passing the result of getOrInsertFunction() through to EmitCall, even once pointer types lose their pointee-type. Then: - update the CallInst/InvokeInst instruction creation functions to take a Callee, - modify getOrInsertFunction to return FunctionCallee, and - update all callers appropriately. One area of particular note is the change to the sanitizer code. Previously, they had been casting the result of `getOrInsertFunction` to a `Function*` via `checkSanitizerInterfaceFunction`, and storing that. That would report an error if someone had already inserted a function declaraction with a mismatching signature. However, in general, LLVM allows for such mismatches, as `getOrInsertFunction` will automatically insert a bitcast if needed. As part of this cleanup, cause the sanitizer code to do the same. (It will call its functions using the expected signature, however they may have been declared.) Finally, in a small number of locations, callers of `getOrInsertFunction` actually were expecting/requiring that a brand new function was being created. In such cases, I've switched them to Function::Create instead. Differential Revision: https://reviews.llvm.org/D57315 llvm-svn: 352791
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-193-12/+9
| | | | | | | | | | | | | | | | | 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
* Update examples for API change. NFC.Rafael Espindola2018-02-141-1/+1
| | | | llvm-svn: 325157
* Module::getOrInsertFunction is using C-style vararg instead of variadic ↵Serge Guelton2017-04-112-5/+5
| | | | | | | | | | | templates. From a user prospective, it forces the use of an annoying nullptr to mark the end of the vararg, and there's not type checking on the arguments. The variadic template is an obvious solution to both issues. Differential Revision: https://reviews.llvm.org/D31070 llvm-svn: 299949
* BrainF example: fixing output buffering issueBoris Ulasevich2017-01-171-0/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D27824 llvm-svn: 292216
* BrainF example: fixing segfault caused by outdated code with missing MCJIT ↵Boris Ulasevich2016-12-152-0/+7
| | | | | | | | dependency Differential Revision: https://reviews.llvm.org/D26280 llvm-svn: 289857
* Fix examples files to reflect header split in r286566.Teresa Johnson2016-11-111-1/+1
| | | | | | I missed these files in examples/ llvm-svn: 286570
* Replace a few more "fall through" comments with LLVM_FALLTHROUGHJustin Bogner2016-08-171-2/+2
| | | | | | Follow up to r278902. I had missed "fall through", with a space. llvm-svn: 278970
* Fix some Include What You Use warnings in examples; other minor fixes.Eugene Zelenko2016-05-253-12/+40
| | | | | | Differential revision: http://reviews.llvm.org/D20607 llvm-svn: 270645
* Remove every uses of getGlobalContext() in LLVM (but the C API)Mehdi Amini2016-04-141-1/+1
| | | | | | | | | | | At the same time, fixes InstructionsTest::CastInst unittest: yes you can leave the IR in an invalid state and exit when you don't destroy the context (like the global one), no longer now. This is the first part of http://reviews.llvm.org/D19094 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266379
* Remove autoconf supportChris Bieneman2016-01-261-15/+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 "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened." - Obi Wan Kenobi Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D16471 llvm-svn: 258861
* examples: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith2015-11-071-2/+2
| | | | llvm-svn: 252379
* Fix Clang-tidy modernize-use-nullptr warnings in examples and include ↵Hans Wennborg2015-09-291-7/+3
| | | | | | | | | | directories; other minor cleanups. Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13172 llvm-svn: 248811
* BrainF.cpp: Update CreateCall() according to r237624.NAKAMURA Takumi2015-05-191-1/+2
| | | | llvm-svn: 237669
* llvm/examples/BrainF: Give an explicit pointee type to ↵NAKAMURA Takumi2015-04-021-1/+1
| | | | | | ConstantExpr::getGetElementPtr(ty...), according to r233938. llvm-svn: 233983
* Fix configure and make build of llvm examples.Iain Sandoe2014-09-031-1/+1
| | | | | | Replaced link component 'jit' with 'mcjit'. llvm-svn: 217032
* Reinstate "Nuke the old JIT."Eric Christopher2014-09-022-2/+1
| | | | | | | | Approved by Jim Grosbach, Lang Hames, Rafael Espindola. This reinstates commits r215111, 215115, 215116, 215117, 215136. llvm-svn: 216982
* Modernize raw_fd_ostream's constructor a bit.Rafael Espindola2014-08-251-3/+2
| | | | | | | | | | Take a StringRef instead of a "const char *". Take a "std::error_code &" instead of a "std::string &" for error. A create static method would be even better, but this patch is already a bit too big. llvm-svn: 216393
* Make it explicit that ExecutionEngine takes ownership of the modules.Rafael Espindola2014-08-191-7/+7
| | | | llvm-svn: 215967
* Temporarily Revert "Nuke the old JIT." as it's not quite ready toEric Christopher2014-08-072-1/+2
| | | | | | | | | | | be deleted. This will be reapplied as soon as possible and before the 3.6 branch date at any rate. Approved by Jim Grosbach, Lang Hames, Rafael Espindola. This reverts commits r215111, 215115, 215116, 215117, 215136. llvm-svn: 215154
* Nuke the old JIT.Rafael Espindola2014-08-072-2/+1
| | | | | | | | | I am sure we will be finding bits and pieces of dead code for years to come, but this is a good start. Thanks to Lang Hames for making MCJIT a good replacement! llvm-svn: 215111
* [CMake] Update libdeps.NAKAMURA Takumi2014-07-141-0/+1
| | | | llvm-svn: 212920
* Try to fix the msvc build.Benjamin Kramer2014-04-291-0/+1
| | | | llvm-svn: 207594
* Replace the F_Binary flag with a F_Text one.Rafael Espindola2014-02-241-1/+1
| | | | | | | | | After this I will set the default back to F_None. The advantage is that before this patch forgetting to set F_Binary would corrupt a file on windows. Forgetting to set F_Text produces one that cannot be read in notepad, which is a better failure mode :-) llvm-svn: 202052
* [cleanup] Re-sort the examples #include lines with my sort_includesChandler Carruth2014-01-131-1/+1
| | | | | | script. llvm-svn: 199089
* [cleanup] Fix the includes in the examples for r199082.Chandler Carruth2014-01-131-1/+1
| | | | llvm-svn: 199087
* [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.NAKAMURA Takumi2013-12-101-1/+8
| | | | llvm-svn: 196908
* Update the examples for an API change.Rafael Espindola2013-07-161-1/+1
| | | | llvm-svn: 186453
* Update the examples for the new header file locations.Chandler Carruth2013-01-023-7/+7
| | | | | | | Sorry for the fallout here, I forgot the examples aren't built by default any more. llvm-svn: 171371
* Sort the #include lines of the examples/... tree.Chandler Carruth2012-12-042-3/+3
| | | | llvm-svn: 169249
* Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.hChandler Carruth2012-06-291-1/+1
| | | | | | | | | | | | | | | | | This was always part of the VMCore library out of necessity -- it deals entirely in the IR. The .cpp file in fact was already part of the VMCore library. This is just a mechanical move. I've tried to go through and re-apply the coding standard's preferred header sort, but at 40-ish files, I may have gotten some wrong. Please let me know if so. I'll be committing the corresponding updates to Clang and Polly, and Duncan has DragonEgg. Thanks to Bill and Eric for giving the green light for this bit of cleanup. llvm-svn: 159421
* Remove llvm-ld and llvm-stub (which is only used by llvm-ld).Michael J. Spencer2012-04-191-1/+0
| | | | | | | | | | | | | | | | llvm-ld is no longer useful and causes confusion and so it is being removed. * Does not work very well on Windows because it must call a gcc like driver to assemble and link. * Has lots of hard coded paths which are wrong on many systems. * Does not understand most of ld's options. * Can be partially replaced by llvm-link | opt | {llc | as, llc -filetype=obj} | ld, or fully replaced by Clang. I know of no production use of llvm-ld, and hacking use should be replaced by Clang's driver. llvm-svn: 155147
* Fix BrainF compilation.Francois Pichet2012-01-311-1/+2
| | | | llvm-svn: 149375
* Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng2011-08-241-1/+1
| | | | | | These are strictly utilities for registering targets and components. llvm-svn: 138450
* Convert ConstantExpr::getGetElementPtr andJay Foad2011-07-211-2/+1
| | | | | | ConstantExpr::getInBoundsGetElementPtr to use ArrayRef. llvm-svn: 135673
* update for recent api changes. I have a hard time believing that this is ↵Chris Lattner2011-07-181-2/+2
| | | | | | actually a useful example. llvm-svn: 135374
* Convert CallInst and InvokeInst APIs to use ArrayRef. For the LLVM examples.Francois Pichet2011-07-151-3/+3
| | | | llvm-svn: 135266
* Change Intrinsic::getDeclaration and friends to take an ArrayRef.Benjamin Kramer2011-07-141-1/+1
| | | | llvm-svn: 135154
* Remove the const from Type after of Jay deconstify work.Francois Pichet2011-07-121-1/+1
| | | | llvm-svn: 135000
* Fix the BrainF build.Francois Pichet2011-07-121-1/+1
| | | | llvm-svn: 134975
* fix some examplesJohn Wiegley2011-07-111-1/+1
| | | | llvm-svn: 134933
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-301-4/+3
| | | | | | PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128537
* Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."Michael J. Spencer2010-09-131-3/+2
| | | | | | | | | | This reverts commit r113632 Conflicts: cmake/modules/AddLLVM.cmake llvm-svn: 113819
* CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.Michael J. Spencer2010-09-101-2/+3
| | | | llvm-svn: 113632
* upgrade to use new intrinsics, patch by Dan Hipschman!Chris Lattner2010-08-101-5/+6
| | | | llvm-svn: 110735
* Roll back r96959 again.Jeffrey Yasskin2010-02-231-3/+0
| | | | llvm-svn: 96981
OpenPOWER on IntegriCloud