summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAge
* Try to fix the msvc build.Benjamin Kramer2014-04-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207594 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix warnings about an variable only used in asserts.Ahmed Charles2014-03-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203089 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-06
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203083 91177308-0d34-0410-b5e6-96231b3b80d8
* Use DataLayout from the module when easily available.Rafael Espindola2014-02-25
| | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202204 91177308-0d34-0410-b5e6-96231b3b80d8
* Make DataLayout a plain object, not a pass.Rafael Espindola2014-02-25
| | | | | | | Instead, have a DataLayoutPass that holds one. This will allow parts of LLVM don't don't handle passes to also use DataLayout. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202168 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace the F_Binary flag with a F_Text one.Rafael Espindola2014-02-24
| | | | | | | | | 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 :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202052 91177308-0d34-0410-b5e6-96231b3b80d8
* Add back r201608, r201622, r201624 and r201625Rafael Espindola2014-02-19
| | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201700 91177308-0d34-0410-b5e6-96231b3b80d8
* This reverts commit r201625 and r201624.Rafael Espindola2014-02-19
| | | | | | | Since r201608 got reverted, it is not safe to use private linkage in these cases until it is committed back. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201688 91177308-0d34-0410-b5e6-96231b3b80d8
* Use PrivateLinkage now that it is safe.Rafael Espindola2014-02-19
| | | | | | | Now that llvm's codegen knows to use an 'l' prefix when needed, we can just use PrivateLinkage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201624 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't try to build ExceptionDemo on ARM.Rafael Espindola2014-02-12
| | | | | | The demo uses _Unwind_GetIP which is not available on that platform. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201261 91177308-0d34-0410-b5e6-96231b3b80d8
* [cleanup] Re-sort the examples #include lines with my sort_includesChandler Carruth2014-01-13
| | | | | | script. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199089 91177308-0d34-0410-b5e6-96231b3b80d8
* [cleanup] Fix the includes in the examples for r199082.Chandler Carruth2014-01-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199087 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.NAKAMURA Takumi2013-12-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196908 91177308-0d34-0410-b5e6-96231b3b80d8
* [weak vtables] Place class definitions into anonymous namespaces to prevent ↵Juergen Ributzka2013-11-19
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195092 91177308-0d34-0410-b5e6-96231b3b80d8
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-19
| | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195064 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r194865 and r194874.Alexey Samsonov2013-11-18
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194997 91177308-0d34-0410-b5e6-96231b3b80d8
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-15
| | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194865 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing #include's to cctype when using isdigit/alpha/etc.Will Dietz2013-10-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192519 91177308-0d34-0410-b5e6-96231b3b80d8
* ExceptionDemo.cpp: Tweak a @param. [-Wdocumentation]NAKAMURA Takumi2013-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187351 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding example source to support MCJIT/Kaleidoscope blog posts.Andrew Kaylor2013-07-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186854 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused fields.Rafael Espindola2013-07-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186791 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix exception demo: Add mcjit to link component.Logan Chien2013-07-21
| | | | | | | | Fix exception demo when we are building the examples with configure/make. This commit updates the link components in the Makefile. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186785 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the examples for an API change.Rafael Espindola2013-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186453 91177308-0d34-0410-b5e6-96231b3b80d8
* ExceptionDemo: Corresponding to r181820, SectionMemoryManager should belong ↵NAKAMURA Takumi2013-05-14
| | | | | | to RTDyldMemoryManager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181844 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove exception handling support from the old JIT.Rafael Espindola2013-05-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181354 91177308-0d34-0410-b5e6-96231b3b80d8
* Port ExceptionDemo to MCJIT.Rafael Espindola2013-05-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181168 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for other typeinfo encodings in the ExceptionDemo.Rafael Espindola2013-05-01
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180883 91177308-0d34-0410-b5e6-96231b3b80d8
* The exception demo needs its symbols exported.Rafael Espindola2013-04-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180622 91177308-0d34-0410-b5e6-96231b3b80d8
* Update links to "Itanium C++ ABI: Exception Handling" documentDmitri Gribenko2013-01-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172356 91177308-0d34-0410-b5e6-96231b3b80d8
* Update the examples for the new header file locations.Chandler Carruth2013-01-02
| | | | | | | Sorry for the fallout here, I forgot the examples aren't built by default any more. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171371 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort the #include lines of the examples/... tree.Chandler Carruth2012-12-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169249 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix gcc's -Wunused-but-set-variable warnings.Rafael Espindola2012-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168576 91177308-0d34-0410-b5e6-96231b3b80d8
* Back out r166591, not sure why this made it through since I cancelled the ↵Micah Villmow2012-10-24
| | | | | | command. Bleh, sorry about this! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166596 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete a directory that wasn't supposed to be checked in yet.Micah Villmow2012-10-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166591 91177308-0d34-0410-b5e6-96231b3b80d8
* Test commit accessQuentin Colombet2012-10-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166481 91177308-0d34-0410-b5e6-96231b3b80d8
* ExceptionDemo.cpp: Use Function::setDoesNotReturn(). Attributes stuff was ↵NAKAMURA Takumi2012-10-12
| | | | | | updated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165796 91177308-0d34-0410-b5e6-96231b3b80d8
* ExceptionDemo.cpp: Whitespace.NAKAMURA Takumi2012-10-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165795 91177308-0d34-0410-b5e6-96231b3b80d8
* Move TargetData to DataLayout.Micah Villmow2012-10-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165401 91177308-0d34-0410-b5e6-96231b3b80d8
* Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.hChandler Carruth2012-06-29
| | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159421 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespacesArnaud A. de Grandmaison2012-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158943 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos found by http://github.com/lyda/misspell-checkBenjamin Kramer2012-06-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157885 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove llvm-ld and llvm-stub (which is only used by llvm-ld).Michael J. Spencer2012-04-19
| | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155147 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch to a more idiomatic way of silencing unused variable warnings inChandler Carruth2012-02-20
| | | | | | release builds. Silences clang's -Wself-assign. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150942 91177308-0d34-0410-b5e6-96231b3b80d8
* Update ExceptionDemo to use ConstantDataArray.Peter Collingbourne2012-02-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149867 91177308-0d34-0410-b5e6-96231b3b80d8
* Update to the new EH system...remove OLD EH code.Bill Wendling2012-02-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149728 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix BrainF compilation.Francois Pichet2012-01-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149375 91177308-0d34-0410-b5e6-96231b3b80d8
* LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar2011-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146409 91177308-0d34-0410-b5e6-96231b3b80d8
* EngineBuilder: support for custom TargetOptions. Fixes thePeter Collingbourne2011-12-07
| | | | | | ExceptionDemo example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146108 91177308-0d34-0410-b5e6-96231b3b80d8
* build: Add initial cut at LLVMBuild.txt files.Daniel Dunbar2011-11-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143634 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed comments on foreign C++ exceptions (generated with type info 7), Garrison Venn2011-09-28
| | | | | | | | | handling with references to http://sourcery.mentor.com/public/cxx-abi/abi-eh.html (r 1.22). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140695 91177308-0d34-0410-b5e6-96231b3b80d8