diff options
| author | Alon Zakai <alonzakai@gmail.com> | 2014-01-09 15:56:56 -0800 |
|---|---|---|
| committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-09 16:04:25 -0800 |
| commit | 245715440fb27520b37e27ad1c62c90acc1abc20 (patch) | |
| tree | 4d18aee6379753a994bbcf14be642485405c80ec /lib/Transforms/NaCl/PNaClABISimplify.cpp | |
| parent | a78b08fd3d9f5ad0adaa5336411fec34a34c3bf0 (diff) | |
exception handling support
Diffstat (limited to 'lib/Transforms/NaCl/PNaClABISimplify.cpp')
| -rw-r--r-- | lib/Transforms/NaCl/PNaClABISimplify.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Transforms/NaCl/PNaClABISimplify.cpp b/lib/Transforms/NaCl/PNaClABISimplify.cpp index 38d8ae0a40..ab88be133c 100644 --- a/lib/Transforms/NaCl/PNaClABISimplify.cpp +++ b/lib/Transforms/NaCl/PNaClABISimplify.cpp @@ -27,6 +27,11 @@ EnableSjLjEH("enable-pnacl-sjlj-eh", "as part of the pnacl-abi-simplify passes"), cl::init(false)); +static cl::opt<bool> // XXX EMSCRIPTEN +EnableEmCxxExceptions("enable-emscripten-cxx-exceptions", + cl::desc("Enables C++ exceptions in emscripten"), + cl::init(false)); + void llvm::PNaClABISimplifyAddPreOptPasses(PassManager &PM) { if (EnableSjLjEH) { // This comes before ExpandTls because it introduces references to @@ -34,6 +39,8 @@ void llvm::PNaClABISimplifyAddPreOptPasses(PassManager &PM) { // InternalizePass because it assumes various variables (including // __pnacl_eh_stack) have not been internalized yet. PM.add(createPNaClSjLjEHPass()); + } else if (EnableEmCxxExceptions) { // XXX EMSCRIPTEN + PM.add(createLowerEmExceptionsPass()); } else { // LowerInvoke prevents use of C++ exception handling by removing // references to BasicBlocks which handle exceptions. |
