diff options
author | John McCall <rjmccall@apple.com> | 2010-04-30 01:15:21 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-04-30 01:15:21 +0000 |
commit | 48bf349471549a5885a0116265af8a87e8fe65c3 (patch) | |
tree | 6f2c5dc577a1d8797b3f181a4411e9f3fb77243b /clang/lib/CodeGen/CGException.cpp | |
parent | 5117a555e0aa36013d6191bab6f0cc297b3dc31d (diff) | |
download | bcm5719-llvm-48bf349471549a5885a0116265af8a87e8fe65c3.tar.gz bcm5719-llvm-48bf349471549a5885a0116265af8a87e8fe65c3.zip |
Fix -fno-rtti -fexceptions by forcing the emission of (non-"builtin") RTTI
when used by the exceptions routines. Fixes PR 6974.
llvm-svn: 102684
Diffstat (limited to 'clang/lib/CodeGen/CGException.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGException.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp index a18aaf61c15..c1d05bf233b 100644 --- a/clang/lib/CodeGen/CGException.cpp +++ b/clang/lib/CodeGen/CGException.cpp @@ -271,7 +271,7 @@ void CodeGenFunction::EmitCXXThrowExpr(const CXXThrowExpr *E) { // Now throw the exception. const llvm::Type *Int8PtrTy = llvm::Type::getInt8PtrTy(getLLVMContext()); - llvm::Constant *TypeInfo = CGM.GetAddrOfRTTIDescriptor(ThrowType); + llvm::Constant *TypeInfo = CGM.GetAddrOfRTTIDescriptor(ThrowType, true); // The address of the destructor. If the exception type has a // trivial destructor (or isn't a record), we just pass null. @@ -371,7 +371,7 @@ void CodeGenFunction::EmitStartEHSpec(const Decl *D) { QualType Ty = Proto->getExceptionType(i); QualType ExceptType = Ty.getNonReferenceType().getUnqualifiedType(); - llvm::Value *EHType = CGM.GetAddrOfRTTIDescriptor(ExceptType); + llvm::Value *EHType = CGM.GetAddrOfRTTIDescriptor(ExceptType, true); SelectorArgs.push_back(EHType); } if (Proto->getNumExceptions()) @@ -494,7 +494,7 @@ void CodeGenFunction::ExitCXXTryStmt(const CXXTryStmt &S, // are ignored. QualType CaughtType = C->getCaughtType().getNonReferenceType(); llvm::Value *EHTypeInfo - = CGM.GetAddrOfRTTIDescriptor(CaughtType.getUnqualifiedType()); + = CGM.GetAddrOfRTTIDescriptor(CaughtType.getUnqualifiedType(), true); SelectorArgs.push_back(EHTypeInfo); } else { // null indicates catch all |