Urg, forgot to add a file header somehow.

Add missing function comments

llvm-svn: 8236
This commit is contained in:
Chris Lattner 2003-08-30 23:31:08 +00:00
parent e4e1a8a8a4
commit 8266b4c548
2 changed files with 22 additions and 0 deletions

View File

@ -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 "SJLJ-Exception.h"
#include <cstdlib> #include <cstdlib>
#include <cassert> #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) { inline llvm_sjlj_exception *get_sjlj_exception(llvm_exception *E) {
assert(E->ExceptionType == SJLJException); assert(E->ExceptionType == SJLJException);
return (llvm_sjlj_exception*)(E+1) - 1; return (llvm_sjlj_exception*)(E+1) - 1;
@ -16,6 +24,9 @@ struct SetJmpMapEntry {
SetJmpMapEntry *Next; 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) { static void SJLJDestructor(llvm_exception *E) {
free(get_sjlj_exception(E)); free(get_sjlj_exception(E));
} }

View File

@ -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 "SJLJ-Exception.h"
#include <cstdlib> #include <cstdlib>
#include <cassert> #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) { inline llvm_sjlj_exception *get_sjlj_exception(llvm_exception *E) {
assert(E->ExceptionType == SJLJException); assert(E->ExceptionType == SJLJException);
return (llvm_sjlj_exception*)(E+1) - 1; return (llvm_sjlj_exception*)(E+1) - 1;
@ -16,6 +24,9 @@ struct SetJmpMapEntry {
SetJmpMapEntry *Next; 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) { static void SJLJDestructor(llvm_exception *E) {
free(get_sjlj_exception(E)); free(get_sjlj_exception(E));
} }