diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-02-10 18:49:11 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-02-10 18:49:11 +0000 |
commit | 3241d400c86cf49e243643fdce3a408838754717 (patch) | |
tree | b94a16b52e5a74d7576a8374fc1769387ca15251 /clang/lib/CodeGen/CGException.cpp | |
parent | 535fdaf0201487ce2e7b9a1c12643bdf55173b36 (diff) | |
download | bcm5719-llvm-3241d400c86cf49e243643fdce3a408838754717.tar.gz bcm5719-llvm-3241d400c86cf49e243643fdce3a408838754717.zip |
Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixes
calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling,
for Darwin ARM.
llvm-svn: 95787
Diffstat (limited to 'clang/lib/CodeGen/CGException.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGException.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp index 60a1016cc04..d956c1c3cd8 100644 --- a/clang/lib/CodeGen/CGException.cpp +++ b/clang/lib/CodeGen/CGException.cpp @@ -100,10 +100,6 @@ static llvm::Constant *getUnexpectedFn(CodeGenFunction &CGF) { return CGF.CGM.CreateRuntimeFunction(FTy, "__cxa_call_unexpected"); } -// FIXME: Eventually this will all go into the backend. Set from the target for -// now. -static int using_sjlj_exceptions = 0; - static llvm::Constant *getUnwindResumeOrRethrowFn(CodeGenFunction &CGF) { const llvm::Type *Int8PtrTy = llvm::Type::getInt8PtrTy(CGF.getLLVMContext()); std::vector<const llvm::Type*> Args(1, Int8PtrTy); @@ -112,7 +108,7 @@ static llvm::Constant *getUnwindResumeOrRethrowFn(CodeGenFunction &CGF) { llvm::FunctionType::get(llvm::Type::getVoidTy(CGF.getLLVMContext()), Args, false); - if (using_sjlj_exceptions) + if (CGF.CGM.getLangOptions().SjLjExceptions) return CGF.CGM.CreateRuntimeFunction(FTy, "_Unwind_SjLj_Resume"); return CGF.CGM.CreateRuntimeFunction(FTy, "_Unwind_Resume_or_Rethrow"); } |