aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGRTTI.cpp
diff options
context:
space:
mode:
authorDavid Chisnall <csdavec@swan.ac.uk>2011-03-20 21:35:39 +0000
committerDavid Chisnall <csdavec@swan.ac.uk>2011-03-20 21:35:39 +0000
commit80558d2db10a96eada4d8fb79949b3263b44652b (patch)
treecb94a09927418be4f235403604cb18b5cd2cff9d /lib/CodeGen/CGRTTI.cpp
parentbd4a0732f2f261f8269a71c2090bc3e9d001eca6 (diff)
Fix Objective-C++ exceptions (GNU runtime).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127980 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGRTTI.cpp')
-rw-r--r--lib/CodeGen/CGRTTI.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/CGRTTI.cpp b/lib/CodeGen/CGRTTI.cpp
index 7ec0ee4b5c..e276d98f12 100644
--- a/lib/CodeGen/CGRTTI.cpp
+++ b/lib/CodeGen/CGRTTI.cpp
@@ -16,6 +16,7 @@
#include "clang/AST/RecordLayout.h"
#include "clang/AST/Type.h"
#include "clang/Frontend/CodeGenOptions.h"
+#include "CGObjCRuntime.h"
using namespace clang;
using namespace CodeGen;
@@ -977,6 +978,10 @@ llvm::Constant *CodeGenModule::GetAddrOfRTTIDescriptor(QualType Ty,
const llvm::Type *Int8PtrTy = llvm::Type::getInt8PtrTy(VMContext);
return llvm::Constant::getNullValue(Int8PtrTy);
}
+
+ if (ForEH && Ty->isObjCObjectPointerType() && !Features.NeXTRuntime) {
+ return Runtime->GetEHType(Ty);
+ }
return RTTIBuilder(*this).BuildTypeInfo(Ty);
}