llvm.org GIT mirror llvm / 337b35a
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 David Blaikie 4 years ago
1 changed file(s) with 7 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
12921292 // (_Unwind_Exception instance). This member tells us whether or not
12931293 // the exception is foreign.
12941294 llvm::Value *unwindExceptionClass =
1295 builder.CreateLoad(builder.CreateStructGEP(
1296 builder.CreatePointerCast(unwindException,
1297 ourUnwindExceptionType->getPointerTo()),
1298 0));
1295 builder.CreateLoad(builder.CreateStructGEP(
1296 ourUnwindExceptionType,
1297 builder.CreatePointerCast(unwindException,
1298 ourUnwindExceptionType->getPointerTo()),
1299 0));
12991300
13001301 // Branch to the externalExceptionBlock if the exception is foreign or
13011302 // to a catch router if not. Either way the finally block will be run.
13351336 //
13361337 // Note: Index is not relative to pointer but instead to structure
13371338 // unlike a true getelementptr (GEP) instruction
1338 typeInfoThrown = builder.CreateStructGEP(typeInfoThrown, 0);
1339 typeInfoThrown = builder.CreateStructGEP(ourExceptionType, typeInfoThrown, 0);
13391340
13401341 llvm::Value *typeInfoThrownType =
1341 builder.CreateStructGEP(typeInfoThrown, 0);
1342 builder.CreateStructGEP(builder.getInt8PtrTy(), typeInfoThrown, 0);
13421343
13431344 generateIntegerPrint(context,
13441345 module,