diff options
author | Mark Seaborn <mseaborn@chromium.org> | 2013-10-16 13:06:24 -0700 |
---|---|---|
committer | Mark Seaborn <mseaborn@chromium.org> | 2013-10-16 13:06:24 -0700 |
commit | f058041de6c69aadafcd030c62678d4244ba2cf7 (patch) | |
tree | 952b0246ef3e6ed26aef9dacdf3c8f9f3d4c3239 /include | |
parent | 98d05124206fb054a3446f2e9a07cefb8faa830d (diff) |
Add PNaClSjLjEH pass to implement C++ exception handling using setjmp()+longjmp()
There are two parts to this:
* PNaClSjLjEH.cpp expands out the "invoke", "landingpad" and "resume"
instructions, modifying the control flow to use setjmp().
* ExceptionInfoWriter.cpp lowers landingpads' clause lists to data
that PNaCl's C++ runtime library will interpret. This part will be
reused when we drop the SjLj part and create a stable ABI for
zero-cost EH.
This pass isn't enabled in PNaClABISimplify yet: I'll do that in a
separate change.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3696
TEST=*.ll tests (also tested end-to-end: plumbing for this will follow later)
Review URL: https://codereview.chromium.org/24777002
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/InitializePasses.h | 1 | ||||
-rw-r--r-- | include/llvm/Transforms/NaCl.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/InitializePasses.h b/include/llvm/InitializePasses.h index fd59d14b54..f471c55cd9 100644 --- a/include/llvm/InitializePasses.h +++ b/include/llvm/InitializePasses.h @@ -293,6 +293,7 @@ void initializeInsertDivideCheckPass(PassRegistry&); void initializeNaClCcRewritePass(PassRegistry&); void initializePNaClABIVerifyFunctionsPass(PassRegistry&); void initializePNaClABIVerifyModulePass(PassRegistry&); +void initializePNaClSjLjEHPass(PassRegistry&); void initializePromoteI1OpsPass(PassRegistry&); void initializePromoteIntegersPass(PassRegistry&); void initializeRemoveAsmMemoryPass(PassRegistry&); diff --git a/include/llvm/Transforms/NaCl.h b/include/llvm/Transforms/NaCl.h index e1be3cf85b..ba85c592f5 100644 --- a/include/llvm/Transforms/NaCl.h +++ b/include/llvm/Transforms/NaCl.h @@ -41,6 +41,7 @@ ModulePass *createExpandTlsPass(); ModulePass *createExpandVarArgsPass(); ModulePass *createFlattenGlobalsPass(); ModulePass *createGlobalCleanupPass(); +ModulePass *createPNaClSjLjEHPass(); ModulePass *createReplacePtrsWithIntsPass(); ModulePass *createResolveAliasesPass(); ModulePass *createRewriteAtomicsPass(); |