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
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
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
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
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
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