mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Fix up Exception demo from recent opaque pointer type changes to GEP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235478 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
459448abcc
commit
337b35ae29
@ -1293,10 +1293,11 @@ static llvm::Function *createCatchWrappedInvokeFunction(
|
|||||||
// (_Unwind_Exception instance). This member tells us whether or not
|
// (_Unwind_Exception instance). This member tells us whether or not
|
||||||
// the exception is foreign.
|
// the exception is foreign.
|
||||||
llvm::Value *unwindExceptionClass =
|
llvm::Value *unwindExceptionClass =
|
||||||
builder.CreateLoad(builder.CreateStructGEP(
|
builder.CreateLoad(builder.CreateStructGEP(
|
||||||
builder.CreatePointerCast(unwindException,
|
ourUnwindExceptionType,
|
||||||
ourUnwindExceptionType->getPointerTo()),
|
builder.CreatePointerCast(unwindException,
|
||||||
0));
|
ourUnwindExceptionType->getPointerTo()),
|
||||||
|
0));
|
||||||
|
|
||||||
// Branch to the externalExceptionBlock if the exception is foreign or
|
// Branch to the externalExceptionBlock if the exception is foreign or
|
||||||
// to a catch router if not. Either way the finally block will be run.
|
// to a catch router if not. Either way the finally block will be run.
|
||||||
@ -1336,10 +1337,10 @@ static llvm::Function *createCatchWrappedInvokeFunction(
|
|||||||
//
|
//
|
||||||
// Note: Index is not relative to pointer but instead to structure
|
// Note: Index is not relative to pointer but instead to structure
|
||||||
// unlike a true getelementptr (GEP) instruction
|
// unlike a true getelementptr (GEP) instruction
|
||||||
typeInfoThrown = builder.CreateStructGEP(typeInfoThrown, 0);
|
typeInfoThrown = builder.CreateStructGEP(ourExceptionType, typeInfoThrown, 0);
|
||||||
|
|
||||||
llvm::Value *typeInfoThrownType =
|
llvm::Value *typeInfoThrownType =
|
||||||
builder.CreateStructGEP(typeInfoThrown, 0);
|
builder.CreateStructGEP(builder.getInt8PtrTy(), typeInfoThrown, 0);
|
||||||
|
|
||||||
generateIntegerPrint(context,
|
generateIntegerPrint(context,
|
||||||
module,
|
module,
|
||||||
|
Loading…
Reference in New Issue
Block a user