aboutsummaryrefslogtreecommitdiff
path: root/llvm/examples
AgeCommit message (Collapse)AuthorFilesLines
2015-01-07Manually specify the folder that Kaleidescope should reside in for ↵Aaron Ballman1-0/+1
CMake-produced solutions that care about such things (like MSVC). This takes the Kaleidescope target out of the root solution folder and places it into the Examples folder where it belongs. llvm-svn: 225354
2015-01-06Kaleidoscope: Value => MetadataDuncan P. N. Exon Smith1-1/+1
llvm-svn: 225320
2015-01-06cmake: Add Kaleidoscope targetDuncan P. N. Exon Smith8-7/+14
llvm-svn: 225318
2015-01-06Add a subdirectory in CMake for Chapter 8.Eric Christopher1-0/+1
llvm-svn: 225315
2014-12-08Once more on the cmake build. nativecodegen->native on the dependencies.Eric Christopher5-5/+5
Thanks to Rafael Espindola for testing assistance. llvm-svn: 223678
2014-12-08Attempt to fix the cmake build by requiring mcjit on the cmakeEric Christopher5-0/+5
dependencies for the KS tutorials llvm-svn: 223677
2014-12-08Fix KS tutorial build failure.Eric Christopher5-775/+1059
make all doesn't build the examples and it was uniquified since last build. llvm-svn: 223675
2014-12-08Add Chapter 8 to the Kaleidoscope tutorial. This chapter addsEric Christopher4-1/+1527
a description of how to add debug information using DWARF and DIBuilder to the language. Thanks to David Blaikie for his assistance with this tutorial. llvm-svn: 223671
2014-12-08Fix the JIT code for the Kaleidoscope tutorial.Eric Christopher4-8/+36
llvm-svn: 223670
2014-12-03ExceptionDemo: Let setMCJITMemoryManager() take unique_ptr, since r223183.NAKAMURA Takumi1-2/+2
llvm-svn: 223188
2014-10-31[CMake] llvm/examples: Update libdeps for unoptimized builds.NAKAMURA Takumi2-0/+2
llvm-svn: 220962
2014-09-10Add doInitialization/doFinalization to DataLayoutPass.Rafael Espindola5-5/+5
With this a DataLayoutPass can be reused for multiple modules. Once we have doInitialization/doFinalization, it doesn't seem necessary to pass a Module to the constructor. Overall this change seems in line with the idea of making DataLayout a required part of Module. With it the only way of having a DataLayout used is to add it to the Module. llvm-svn: 217548
2014-09-03Fix configure and make build of llvm examples.Iain Sandoe9-9/+9
Replaced link component 'jit' with 'mcjit'. llvm-svn: 217032
2014-09-02Reinstate "Nuke the old JIT."Eric Christopher23-145/+9
Approved by Jim Grosbach, Lang Hames, Rafael Espindola. This reinstates commits r215111, 215115, 215116, 215117, 215136. llvm-svn: 216982
2014-08-25Modernize raw_fd_ostream's constructor a bit.Rafael Espindola1-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
2014-08-19Make it explicit that ExecutionEngine takes ownership of the modules.Rafael Espindola9-24/+37
llvm-svn: 215967
2014-08-07Temporarily Revert "Nuke the old JIT." as it's not quite ready toEric Christopher23-9/+145
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
2014-08-07Nuke the old JIT.Rafael Espindola23-145/+9
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
2014-07-22Added LLVM_ENABLE_RTTI and LLVM_ENABLE_EH options that allow RTTI and EHDan Liew1-0/+2
to globally be controlled. Individual targets (e.g. ExceptionDemo) can still override this by using LLVM_REQUIRE_RTTI and LLVM_REQUIRE_EH if they need to be compiled with RTTI or exception handling respectively. llvm-svn: 213663
2014-07-14[CMake] Update libdeps.NAKAMURA Takumi7-0/+7
llvm-svn: 212920
2014-04-29Try to fix the msvc build.Benjamin Kramer1-0/+1
llvm-svn: 207594
2014-03-06Fix warnings about an variable only used in asserts.Ahmed Charles1-0/+3
llvm-svn: 203089
2014-03-06Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles3-3/+3
This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
2014-02-25Use DataLayout from the module when easily available.Rafael Espindola5-5/+10
Eventually DataLayoutPass should go away, but for now that is the only easy way to get a DataLayout in some APIs. This patch only changes the ones that have easy access to a Module. One interesting issue with sometimes using DataLayoutPass and sometimes fetching it from the Module is that we have to make sure they are equivalent. We can get most of the way there by always constructing the pass with a Module. In fact, the pass could be changed to point to an external DataLayout instead of owning one to make this stricter. Unfortunately, the C api passes a DataLayout, so it has to be up to the caller to make sure the pass and the module are in sync. llvm-svn: 202204
2014-02-25Make DataLayout a plain object, not a pass.Rafael Espindola5-5/+5
Instead, have a DataLayoutPass that holds one. This will allow parts of LLVM don't don't handle passes to also use DataLayout. llvm-svn: 202168
2014-02-24Replace the F_Binary flag with a F_Text one.Rafael Espindola1-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
2014-02-19Add back r201608, r201622, r201624 and r201625Rafael Espindola1-2/+2
r201608 made llvm corretly handle private globals with MachO. r201622 fixed a bug in it and r201624 and r201625 were changes for using private linkage, assuming that llvm would do the right thing. They all got reverted because r201608 introduced a crash in LTO. This patch includes a fix for that. The issue was that TargetLoweringObjectFile now has to be initialized before we can mangle names of private globals. This is trivially true during the normal codegen pipeline (the asm printer does it), but LTO has to do it manually. llvm-svn: 201700
2014-02-19This reverts commit r201625 and r201624.Rafael Espindola1-2/+2
Since r201608 got reverted, it is not safe to use private linkage in these cases until it is committed back. llvm-svn: 201688
2014-02-19Use PrivateLinkage now that it is safe.Rafael Espindola1-2/+2
Now that llvm's codegen knows to use an 'l' prefix when needed, we can just use PrivateLinkage. llvm-svn: 201624
2014-02-12Don't try to build ExceptionDemo on ARM.Rafael Espindola1-1/+1
The demo uses _Unwind_GetIP which is not available on that platform. llvm-svn: 201261
2014-01-13[cleanup] Re-sort the examples #include lines with my sort_includesChandler Carruth11-14/+14
script. llvm-svn: 199089
2014-01-13[cleanup] Fix the includes in the examples for r199082.Chandler Carruth14-14/+14
llvm-svn: 199087
2013-12-10[CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.NAKAMURA Takumi11-11/+91
llvm-svn: 196908
2013-11-19[weak vtables] Place class definitions into anonymous namespaces to prevent ↵Juergen Ributzka7-44/+21
weak vtables. This patch places class definitions in implementation files into anonymous namespaces to prevent weak vtables. This eliminates the need of providing an out-of-line definition to pin the vtable explicitly to the file. llvm-svn: 195092
2013-11-19[weak vtables] Remove a bunch of weak vtablesJuergen Ributzka7-7/+35
This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. The memory leaks in this version have been fixed. Thanks Alexey for pointing them out. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 195064
2013-11-18Revert r194865 and r194874.Alexey Samsonov7-33/+7
This change is incorrect. If you delete virtual destructor of both a base class and a subclass, then the following code: Base *foo = new Child(); delete foo; will not cause the destructor for members of Child class. As a result, I observe plently of memory leaks. Notable examples I investigated are: ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl. llvm-svn: 194997
2013-11-15[weak vtables] Remove a bunch of weak vtablesJuergen Ributzka7-7/+33
This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 194865
2013-10-12Add missing #include's to cctype when using isdigit/alpha/etc.Will Dietz12-0/+12
llvm-svn: 192519
2013-07-29ExceptionDemo.cpp: Tweak a @param. [-Wdocumentation]NAKAMURA Takumi1-1/+1
llvm-svn: 187351
2013-07-22Adding example source to support MCJIT/Kaleidoscope blog posts.Andrew Kaylor20-0/+9374
llvm-svn: 186854
2013-07-21Remove unused fields.Rafael Espindola1-11/+3
llvm-svn: 186791
2013-07-21Fix exception demo: Add mcjit to link component.Logan Chien1-1/+1
Fix exception demo when we are building the examples with configure/make. This commit updates the link components in the Makefile. llvm-svn: 186785
2013-07-16Update the examples for an API change.Rafael Espindola1-1/+1
llvm-svn: 186453
2013-05-14ExceptionDemo: Corresponding to r181820, SectionMemoryManager should belong ↵NAKAMURA Takumi1-2/+2
to RTDyldMemoryManager. llvm-svn: 181844
2013-05-07Remove exception handling support from the old JIT.Rafael Espindola1-1/+0
llvm-svn: 181354
2013-05-05Port ExceptionDemo to MCJIT.Rafael Espindola2-3/+10
llvm-svn: 181168
2013-05-01Add support for other typeinfo encodings in the ExceptionDemo.Rafael Espindola1-9/+41
The old jit always uses DW_EH_PE_absptr, but MCJIT can use other encodings. This is in preparation for adding EH support to MCJIT, but not directly related, so I am committing it first. llvm-svn: 180883
2013-04-26The exception demo needs its symbols exported.Rafael Espindola1-0/+2
llvm-svn: 180622
2013-01-13Update links to "Itanium C++ ABI: Exception Handling" documentDmitri Gribenko1-9/+9
llvm-svn: 172356
2013-01-02Update the examples for the new header file locations.Chandler Carruth13-58/+58
Sorry for the fallout here, I forgot the examples aren't built by default any more. llvm-svn: 171371