llvm.org GIT mirror llvm / aae66fa
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140301 91177308-0d34-0410-b5e6-96231b3b80d8 Garrison Venn 7 years ago
1 changed file(s) with 18 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
6060 #include "llvm/Support/IRBuilder.h"
6161 #include "llvm/Support/Dwarf.h"
6262 #include "llvm/Support/TargetSelect.h"
63
64 // FIXME: See use of UpgradeExceptionHandling(...) below
65 #include "llvm/AutoUpgrade.h"
6366
6467 // FIXME: Although all systems tested with (Linux, OS X), do not need this
6568 // header file included. A user on ubuntu reported, undefined symbols
13401343 catchBlocks[nextTypeToCatch]);
13411344 }
13421345
1346 // FIXME: This is a hack to get the demo working with the new 3.0 exception
1347 // infrastructure. As this makes the demo no longer a demo, and
1348 // especially not a demo on how to use the llvm exception mechanism,
1349 // this hack will shortly be changed to use the new 3.0 exception
1350 // infrastructure. However for the time being this demo is an
1351 // example on how to use the AutoUpgrade UpgradeExceptionHandling(...)
1352 // function on < 3.0 exception handling code.
1353 //
1354 // Must be run before verifier
1355 UpgradeExceptionHandling(&module);
1356
13431357 llvm::verifyFunction(*ret);
13441358 fpm.run(*ret);
13451359
19801994 // Generate test code using function throwCppException(...) as
19811995 // the function which throws foreign exceptions.
19821996 llvm::Function *toRun =
1983 createUnwindExceptionTest(*module,
1984 theBuilder,
1985 fpm,
1986 "throwCppException");
1997 createUnwindExceptionTest(*module,
1998 theBuilder,
1999 fpm,
2000 "throwCppException");
19872001
19882002 fprintf(stderr, "\nBegin module dump:\n\n");
19892003