summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-30 23:31:08 +0000
committerChris Lattner <sabre@nondot.org>2003-08-30 23:31:08 +0000
commit7b3092d3e4d615270b20132dd5d1c95f49cd0f4d (patch)
treea8ddff9bbb3aa4a17418c5dfc2890844d45561bd /runtime
parent214191f4739cc476bce61000edbe1ac0ddc9a93c (diff)
downloadllvm-7b3092d3e4d615270b20132dd5d1c95f49cd0f4d.tar.gz
llvm-7b3092d3e4d615270b20132dd5d1c95f49cd0f4d.tar.bz2
llvm-7b3092d3e4d615270b20132dd5d1c95f49cd0f4d.tar.xz
Urg, forgot to add a file header somehow.
Add missing function comments git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8236 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'runtime')
-rw-r--r--runtime/GCCLibraries/crtend/SJLJ-Exception.cpp11
-rw-r--r--runtime/GCCLibraries/libexception/SJLJ-Exception.cpp11
2 files changed, 22 insertions, 0 deletions
diff --git a/runtime/GCCLibraries/crtend/SJLJ-Exception.cpp b/runtime/GCCLibraries/crtend/SJLJ-Exception.cpp
index fea2d4128f..8bc13e7659 100644
--- a/runtime/GCCLibraries/crtend/SJLJ-Exception.cpp
+++ b/runtime/GCCLibraries/crtend/SJLJ-Exception.cpp
@@ -1,8 +1,16 @@
+//===- SJLJ-Exception.cpp - SetJmp/LongJmp Exception Handling -------------===//
+//
+// This file implements the API used by the Setjmp/Longjmp exception handling
+// runtime library.
+//
+//===----------------------------------------------------------------------===//
#include "SJLJ-Exception.h"
#include <cstdlib>
#include <cassert>
+// get_sjlj_exception - Adjust the llvm_exception pointer to be an appropriate
+// llvm_sjlj_exception pointer.
inline llvm_sjlj_exception *get_sjlj_exception(llvm_exception *E) {
assert(E->ExceptionType == SJLJException);
return (llvm_sjlj_exception*)(E+1) - 1;
@@ -16,6 +24,9 @@ struct SetJmpMapEntry {
SetJmpMapEntry *Next;
};
+// SJLJDestructor - This function is used to free the exception when
+// language-indent code needs to destroy the exception without knowing exactly
+// what type it is.
static void SJLJDestructor(llvm_exception *E) {
free(get_sjlj_exception(E));
}
diff --git a/runtime/GCCLibraries/libexception/SJLJ-Exception.cpp b/runtime/GCCLibraries/libexception/SJLJ-Exception.cpp
index fea2d4128f..8bc13e7659 100644
--- a/runtime/GCCLibraries/libexception/SJLJ-Exception.cpp
+++ b/runtime/GCCLibraries/libexception/SJLJ-Exception.cpp
@@ -1,8 +1,16 @@
+//===- SJLJ-Exception.cpp - SetJmp/LongJmp Exception Handling -------------===//
+//
+// This file implements the API used by the Setjmp/Longjmp exception handling
+// runtime library.
+//
+//===----------------------------------------------------------------------===//
#include "SJLJ-Exception.h"
#include <cstdlib>
#include <cassert>
+// get_sjlj_exception - Adjust the llvm_exception pointer to be an appropriate
+// llvm_sjlj_exception pointer.
inline llvm_sjlj_exception *get_sjlj_exception(llvm_exception *E) {
assert(E->ExceptionType == SJLJException);
return (llvm_sjlj_exception*)(E+1) - 1;
@@ -16,6 +24,9 @@ struct SetJmpMapEntry {
SetJmpMapEntry *Next;
};
+// SJLJDestructor - This function is used to free the exception when
+// language-indent code needs to destroy the exception without knowing exactly
+// what type it is.
static void SJLJDestructor(llvm_exception *E) {
free(get_sjlj_exception(E));
}