Commit Graph

24 Commits

Author SHA1 Message Date
Garrison Venn 56c58ce3d6 Changed comments on foreign C++ exceptions (generated with type info 7),
handling with references to 
http://sourcery.mentor.com/public/cxx-abi/abi-eh.html (r 1.22).

llvm-svn: 140695
2011-09-28 10:53:56 +00:00
Garrison Venn 0a2eb8d35d Modified demo to use 3.0 resume instruction vs calling _Unwine_Resume.
Also conducted some reformatting. As the LLVM coding standard doc does not
seem to touch on how to align function arguments, and format code longer than
80 cols in general, the confusion persists. There is the golden rule, but as
this code has gone through several styles to deal with this, the golden rule
seems to be ignored. The latest reformatting effort tries to match the other
source files as much as possible.

Tested on OS X 10.7.1 with, and without the OLD_EXC_SYSTEM defined. Have NOT
tested on LINUX.

llvm-svn: 140379
2011-09-23 14:45:10 +00:00
Garrison Venn 8cb0035ee9 Converted Exception demo over to using new 3.0 landingpad instruction. This
was compiled and tested on OS X 10.7.1. It was not tested on LINUX. In 
addition the defined OLD_EXC_SYSTEM was not tested with this version.

llvm-svn: 140303
2011-09-22 15:45:14 +00:00
Garrison Venn eb89d36b9d This is a hack to get the demo working with the new 3.0 exception
infrastructure. As this makes the demo no longer a demo, and especially not a 
demo on how to use the llvm exception mechanism, this hack will shortly be 
changed to use the new 3.0 exception infrastructure. However for the time being 
this demo is an example on how to use the AutoUpgrade 
UpgradeExceptionHandling(...) function on < 3.0 exception handling code.                          

llvm-svn: 140301
2011-09-22 14:07:50 +00:00
Evan Cheng 2bb4035707 Move TargetRegistry and TargetSelect from Target to Support where they belong.
These are strictly utilities for registering targets and components.

llvm-svn: 138450
2011-08-24 18:08:43 +00:00
Chris Lattner 6b8eb8cd71 update this to build with a recent IRBuilder change and de-constify types.
llvm-svn: 135373
2011-07-18 04:52:09 +00:00
Garrison Venn 76310ac9be Reverted 134901 because of 134959. Did not use svn merge -r but rather:
1,$s/llvm::Type::getInt\(..\)Ty(builder.getContext())/builder.getInt\1Ty()/g
1,$s/builder.getInt\(..*\)Ty()->getPointerTo()/builder.getInt\1PtrTy()/g

vi sub commands (second one was not a reversion but requested by 
Tobias Grosser.

Mod was tested, but other examples have failed to build as they are currently 
being thrashed with the const qualifier removal change.

llvm-svn: 134985
2011-07-12 15:34:42 +00:00
Garrison Venn 5fb3f66516 Modified demo to work with non const Type parameters as is required by new
type system. However most of these modifications were due to IRBuilder
(IRBuilderBase), not having been modified to NOT return such const qualified
free types. If IRBuilder does not change, as can also be seen in its 
instruction creation methods, to use const free types, it may be useful to have
ExceptionDemo drop IRBuilder usage. Modifying builder.getInt32Ty() to
llvm::Type::getInt32Ty(builder.getContext()) is pretty ugly.

llvm-svn: 134901
2011-07-11 16:31:53 +00:00
Chris Lattner 0ab5e2cded Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!

llvm-svn: 129558
2011-04-15 05:18:47 +00:00
Garrison Venn a0f6ecb01f Added new FIXME note
llvm-svn: 129360
2011-04-12 12:30:10 +00:00
Eli Friedman 2c81975bae Get rid of useless comment; if a file uses functions from a given header,
it is obvious that it should be included.

llvm-svn: 129295
2011-04-11 20:16:05 +00:00
Garrison Venn 56c5ca2ee1 Because some systems have reported that this example would not build the
header file cstdio was added as an include.

llvm-svn: 129291
2011-04-11 19:52:49 +00:00
Garrison Venn 88bd9d6bb8 Fixed more best practices, and explicit/implicit style guide issues.
llvm-svn: 129245
2011-04-10 14:06:52 +00:00
Chris Lattner a868bbbb66 reindent this whole file and do a variety of stylistic cleanups.
This code is still a long way from following best practices.

llvm-svn: 129140
2011-04-08 18:02:51 +00:00
Chris Lattner ca320f54da fix this to build with the recent StructType changes.
llvm-svn: 129139
2011-04-08 17:56:47 +00:00
Dan Gohman 56f3a4c761 Update examples and documentation to explicitly add basicaa, now that it's
no longer included by default.

llvm-svn: 119169
2010-11-15 18:41:10 +00:00
Oscar Fuentes 889c1e7d80 Build with RTTI and exceptions disabled. Only in GCC for now.
llvm-svn: 116682
2010-10-17 02:26:16 +00:00
Michael J. Spencer 93c9b2ea93 Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
This reverts commit r113632

Conflicts:

	cmake/modules/AddLLVM.cmake

llvm-svn: 113819
2010-09-13 23:59:48 +00:00
Michael J. Spencer dc38d36ccb CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
llvm-svn: 113632
2010-09-10 21:14:25 +00:00
Daniel Dunbar a8b941c21b Remove stray semi-colon.
llvm-svn: 106009
2010-06-15 17:47:24 +00:00
Duncan Sands 211427bda9 Remove the -enable-sjlj-eh option, which doesn't do anything.
Remove the -enable-eh option which is only used by the JIT,
and replace it with -jit-enable-eh.

llvm-svn: 102865
2010-05-02 15:36:26 +00:00
Nick Lewycky 20f5e974e4 Use provided llvm-defined variables instead of twisting user-controlled knobs.
No visible change.

llvm-svn: 102240
2010-04-24 05:07:24 +00:00
Benjamin Kramer 80178eea6a Fix -Wcast-qual warning.
llvm-svn: 101894
2010-04-20 11:50:37 +00:00
Garrison Venn f4d2f8464d Adds a JIT based exception handling example to the examples directory.
Both zero cost example domain specific, and C++ foreign exception handling are 
shown. The example's documentation fully explains how to run the example.

Notes:

1)   The code uses an extremely simple type info model.
2)   Only a single landing pad is used per unwind edge 
     (one call to llvm.eh.selector)
3)   llvm.eh.selector support for filter arguments is not given.
4)   llvm.eh.typeid.for is not used.
5)   Forced unwind behavior is not supported.
6)   Very little if any error handling is given.
7)   __attribute__((__aligned__)) is used.
8)   The code uses parts from the llvm compiler-rt project and
     the llvm Kaleidoscope example.
9)   The code has not been ported or tested on WINDOWS.
10)  The code was not tested with a cmake build.
11)  The code was tested for a debug build on 32bit X86 CentOS LINUX, 
     and both a debug and release build on OS X 10.6.2 (64bit).

llvm-svn: 95723
2010-02-09 23:22:43 +00:00