fix this to build with the recent StructType changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129139 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2011-04-08 17:56:47 +00:00
parent b027105fa5
commit cad3f77fa8

View File

@ -1637,6 +1637,8 @@ void runExceptionThrow(llvm::ExecutionEngine* engine,
// End test functions // End test functions
// //
typedef llvm::ArrayRef<const llvm::Type*> TypeArray;
/// This initialization routine creates type info globals and /// This initialization routine creates type info globals and
/// adds external function declarations to module. /// adds external function declarations to module.
/// @param numTypeInfos number of linear type info associated type info types /// @param numTypeInfos number of linear type info associated type info types
@ -1660,23 +1662,21 @@ static void createStandardUtilityFunctions(unsigned numTypeInfos,
llvm::ConstantInt::get(llvm::Type::getInt8Ty(context), 2), llvm::ConstantInt::get(llvm::Type::getInt8Ty(context), 2),
// Create our type info type // Create our type info type
ourTypeInfoType = llvm::StructType::get(context, ourTypeInfoType = llvm::StructType::get(context,
builder.getInt32Ty(), TypeArray(builder.getInt32Ty()));
NULL);
// Create OurException type // Create OurException type
ourExceptionType = llvm::StructType::get(context, ourExceptionType = llvm::StructType::get(context,
ourTypeInfoType, TypeArray(ourTypeInfoType));
NULL);
// Create portion of _Unwind_Exception type // Create portion of _Unwind_Exception type
// //
// Note: Declaring only a portion of the _Unwind_Exception struct. // Note: Declaring only a portion of the _Unwind_Exception struct.
// Does this cause problems? // Does this cause problems?
ourUnwindExceptionType = llvm::StructType::get(context, ourUnwindExceptionType = llvm::StructType::get(context,
builder.getInt64Ty(), TypeArray(builder.getInt64Ty()));
NULL);
struct OurBaseException_t dummyException; struct OurBaseException_t dummyException;
// Calculate offset of OurException::unwindException member. // Calculate offset of OurException::unwindException member.