[llvm-commits] [llvm] r129139 - /llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp
Chris Lattner
sabre at nondot.org
Fri Apr 8 10:56:47 PDT 2011
Author: lattner
Date: Fri Apr 8 12:56:47 2011
New Revision: 129139
URL: http://llvm.org/viewvc/llvm-project?rev=129139&view=rev
Log:
fix this to build with the recent StructType changes.
Modified:
llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp
Modified: llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp?rev=129139&r1=129138&r2=129139&view=diff
==============================================================================
--- llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp (original)
+++ llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp Fri Apr 8 12:56:47 2011
@@ -1637,6 +1637,8 @@
// End test functions
//
+typedef llvm::ArrayRef<const llvm::Type*> TypeArray;
+
/// This initialization routine creates type info globals and
/// adds external function declarations to module.
/// @param numTypeInfos number of linear type info associated type info types
@@ -1660,23 +1662,21 @@
llvm::ConstantInt::get(llvm::Type::getInt8Ty(context), 2),
+
// Create our type info type
ourTypeInfoType = llvm::StructType::get(context,
- builder.getInt32Ty(),
- NULL);
+ TypeArray(builder.getInt32Ty()));
// Create OurException type
ourExceptionType = llvm::StructType::get(context,
- ourTypeInfoType,
- NULL);
+ TypeArray(ourTypeInfoType));
// Create portion of _Unwind_Exception type
//
// Note: Declaring only a portion of the _Unwind_Exception struct.
// Does this cause problems?
ourUnwindExceptionType = llvm::StructType::get(context,
- builder.getInt64Ty(),
- NULL);
+ TypeArray(builder.getInt64Ty()));
struct OurBaseException_t dummyException;
// Calculate offset of OurException::unwindException member.
More information about the llvm-commits
mailing list