aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorGarrison Venn <gvenn.cfe.dev@gmail.com>2011-09-28 10:53:56 +0000
committerGarrison Venn <gvenn.cfe.dev@gmail.com>2011-09-28 10:53:56 +0000
commit113aa8612010434069fc5b5e09f6b2667e03e173 (patch)
tree4f79425de0830c8272f15bf94d92a778a68fbbe7 /examples
parent42e5c799b61ce70620d4d4d4d20e847750a185c3 (diff)
downloadexternal_llvm-113aa8612010434069fc5b5e09f6b2667e03e173.zip
external_llvm-113aa8612010434069fc5b5e09f6b2667e03e173.tar.gz
external_llvm-113aa8612010434069fc5b5e09f6b2667e03e173.tar.bz2
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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140695 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
-rw-r--r--examples/ExceptionDemo/ExceptionDemo.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/examples/ExceptionDemo/ExceptionDemo.cpp b/examples/ExceptionDemo/ExceptionDemo.cpp
index 07465bb..20516a7 100644
--- a/examples/ExceptionDemo/ExceptionDemo.cpp
+++ b/examples/ExceptionDemo/ExceptionDemo.cpp
@@ -40,7 +40,8 @@
//
// Cases -1 and 7 are caught by a C++ test harness where the validity of
// of a C++ catch(...) clause catching a generated exception with a
-// type info type of 7 is questionable.
+// type info type of 7 is explained by: example in rules 1.6.4 in
+// http://sourcery.mentor.com/public/cxx-abi/abi-eh.html (v1.22)
//
// This code uses code from the llvm compiler-rt project and the llvm
// Kaleidoscope project.
@@ -86,7 +87,7 @@
#endif
// System C++ ABI unwind types from:
-// http://refspecs.freestandards.org/abi-eh-1.21.html
+// http://sourcery.mentor.com/public/cxx-abi/abi-eh.html (v1.22)
extern "C" {
@@ -1663,12 +1664,12 @@ void runExceptionThrow(llvm::ExecutionEngine *engine,
exc.what());
}
catch (...) {
- // Catch all exceptions including our generated ones. I'm not sure
- // why this latter functionality should work, as it seems that
- // our exceptions should be foreign to C++ (the _Unwind_Exception::
- // exception_class should be different from the one used by C++), and
- // therefore C++ should ignore the generated exceptions.
-
+ // Catch all exceptions including our generated ones. This latter
+ // functionality works according to the example in rules 1.6.4 of
+ // http://sourcery.mentor.com/public/cxx-abi/abi-eh.html (v1.22),
+ // given that these will be exceptions foreign to C++
+ // (the _Unwind_Exception::exception_class should be different from
+ // the one used by C++).
fprintf(stderr,
"\nrunExceptionThrow(...):In C++ catch all.\n");
}