summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorGarrison Venn <gvenn.cfe.dev@gmail.com>2011-07-12 15:34:42 +0000
committerGarrison Venn <gvenn.cfe.dev@gmail.com>2011-07-12 15:34:42 +0000
commitc0f33cb59006d42d9d37b02a9158e1a370fc246b (patch)
tree939f2e5941a7b43d514ba96f392a59b94dadfc34 /examples
parent5fdd6c8793462549e3593890ec61573da06e3346 (diff)
Reverted 134901 because of 134959. Did not use svn merge -r but rather:
1,$s/llvm::Type::getInt\(..\)Ty(builder.getContext())/builder.getInt\1Ty()/g 1,$s/builder.getInt\(..*\)Ty()->getPointerTo()/builder.getInt\1PtrTy()/g vi sub commands (second one was not a reversion but requested by Tobias Grosser. Mod was tested, but other examples have failed to build as they are currently being thrashed with the const qualifier removal change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134985 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
-rw-r--r--examples/ExceptionDemo/ExceptionDemo.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/examples/ExceptionDemo/ExceptionDemo.cpp b/examples/ExceptionDemo/ExceptionDemo.cpp
index c6499e4a16..e5d9451446 100644
--- a/examples/ExceptionDemo/ExceptionDemo.cpp
+++ b/examples/ExceptionDemo/ExceptionDemo.cpp
@@ -895,7 +895,7 @@ void generateStringPrint(llvm::LLVMContext &context,
llvm::Value *cast =
builder.CreatePointerCast(stringVar,
- builder.getInt8Ty()->getPointerTo());
+ builder.getInt8PtrTy());
builder.CreateCall(printFunct, cast);
}
@@ -939,7 +939,7 @@ void generateIntegerPrint(llvm::LLVMContext &context,
llvm::Value *cast =
builder.CreateBitCast(stringVar,
- builder.getInt8Ty()->getPointerTo());
+ builder.getInt8PtrTy());
builder.CreateCall2(&printFunct, &toPrint, cast);
}
@@ -987,7 +987,7 @@ static llvm::BasicBlock *createFinallyBlock(llvm::LLVMContext &context,
ourExceptionNotThrownState);
const llvm::PointerType *exceptionStorageType =
- builder.getInt8Ty()->getPointerTo();
+ builder.getInt8PtrTy();
*exceptionStorage =
createEntryBlockAlloca(toAddTo,
"exceptionStorage",
@@ -1098,7 +1098,7 @@ llvm::Function *createCatchWrappedInvokeFunction(llvm::Module &module,
llvm::Function *toPrint32Int = module.getFunction("print32Int");
ArgTypes argTypes;
- argTypes.push_back(llvm::Type::getInt32Ty(builder.getContext()));
+ argTypes.push_back(builder.getInt32Ty());
ArgNames argNames;
argNames.push_back("exceptTypeToThrow");
@@ -1239,7 +1239,7 @@ llvm::Function *createCatchWrappedInvokeFunction(llvm::Module &module,
llvm::Function *personality = module.getFunction("ourPersonality");
llvm::Value *functPtr =
builder.CreatePointerCast(personality,
- builder.getInt8Ty()->getPointerTo());
+ builder.getInt8PtrTy());
args.clear();
args.push_back(unwindException);
@@ -1376,7 +1376,7 @@ llvm::Function *createThrowExceptionFunction(llvm::Module &module,
llvm::LLVMContext &context = module.getContext();
namedValues.clear();
ArgTypes unwindArgTypes;
- unwindArgTypes.push_back(llvm::Type::getInt32Ty(builder.getContext()));
+ unwindArgTypes.push_back(builder.getInt32Ty());
ArgNames unwindArgNames;
unwindArgNames.push_back("exceptTypeToThrow");
@@ -1650,7 +1650,7 @@ static void createStandardUtilityFunctions(unsigned numTypeInfos,
// Create our type info type
ourTypeInfoType = llvm::StructType::get(context,
- TypeArray(llvm::Type::getInt32Ty(builder.getContext())));
+ TypeArray(builder.getInt32Ty()));
// Create OurException type
ourExceptionType = llvm::StructType::get(context,
TypeArray(ourTypeInfoType));
@@ -1661,7 +1661,7 @@ static void createStandardUtilityFunctions(unsigned numTypeInfos,
// Does this cause problems?
ourUnwindExceptionType =
llvm::StructType::get(context,
- TypeArray(llvm::Type::getInt64Ty(builder.getContext())));
+ TypeArray(builder.getInt64Ty()));
struct OurBaseException_t dummyException;
@@ -1727,8 +1727,8 @@ static void createStandardUtilityFunctions(unsigned numTypeInfos,
const llvm::Type *retType = builder.getVoidTy();
argTypes.clear();
- argTypes.push_back(llvm::Type::getInt32Ty(builder.getContext()));
- argTypes.push_back(builder.getInt8Ty()->getPointerTo());
+ argTypes.push_back(builder.getInt32Ty());
+ argTypes.push_back(builder.getInt8PtrTy());
argNames.clear();
@@ -1746,8 +1746,8 @@ static void createStandardUtilityFunctions(unsigned numTypeInfos,
retType = builder.getVoidTy();
argTypes.clear();
- argTypes.push_back(llvm::Type::getInt64Ty(builder.getContext()));
- argTypes.push_back(builder.getInt8Ty()->getPointerTo());
+ argTypes.push_back(builder.getInt64Ty());
+ argTypes.push_back(builder.getInt8PtrTy());
argNames.clear();
@@ -1765,7 +1765,7 @@ static void createStandardUtilityFunctions(unsigned numTypeInfos,
retType = builder.getVoidTy();
argTypes.clear();
- argTypes.push_back(builder.getInt8Ty()->getPointerTo());
+ argTypes.push_back(builder.getInt8PtrTy());
argNames.clear();
@@ -1783,7 +1783,7 @@ static void createStandardUtilityFunctions(unsigned numTypeInfos,
retType = builder.getVoidTy();
argTypes.clear();
- argTypes.push_back(llvm::Type::getInt32Ty(builder.getContext()));
+ argTypes.push_back(builder.getInt32Ty());
argNames.clear();
@@ -1801,7 +1801,7 @@ static void createStandardUtilityFunctions(unsigned numTypeInfos,
retType = builder.getVoidTy();
argTypes.clear();
- argTypes.push_back(builder.getInt8Ty()->getPointerTo());
+ argTypes.push_back(builder.getInt8PtrTy());
argNames.clear();
@@ -1816,10 +1816,10 @@ static void createStandardUtilityFunctions(unsigned numTypeInfos,
// createOurException
- retType = builder.getInt8Ty()->getPointerTo();
+ retType = builder.getInt8PtrTy();
argTypes.clear();
- argTypes.push_back(llvm::Type::getInt32Ty(builder.getContext()));
+ argTypes.push_back(builder.getInt32Ty());
argNames.clear();
@@ -1837,7 +1837,7 @@ static void createStandardUtilityFunctions(unsigned numTypeInfos,
retType = builder.getInt32Ty();
argTypes.clear();
- argTypes.push_back(builder.getInt8Ty()->getPointerTo());
+ argTypes.push_back(builder.getInt8PtrTy());
argNames.clear();
@@ -1857,7 +1857,7 @@ static void createStandardUtilityFunctions(unsigned numTypeInfos,
retType = builder.getInt32Ty();
argTypes.clear();
- argTypes.push_back(builder.getInt8Ty()->getPointerTo());
+ argTypes.push_back(builder.getInt8PtrTy());
argNames.clear();
@@ -1877,11 +1877,11 @@ static void createStandardUtilityFunctions(unsigned numTypeInfos,
retType = builder.getInt32Ty();
argTypes.clear();
- argTypes.push_back(llvm::Type::getInt32Ty(builder.getContext()));
- argTypes.push_back(llvm::Type::getInt32Ty(builder.getContext()));
- argTypes.push_back(llvm::Type::getInt64Ty(builder.getContext()));
- argTypes.push_back(builder.getInt8Ty()->getPointerTo());
- argTypes.push_back(builder.getInt8Ty()->getPointerTo());
+ argTypes.push_back(builder.getInt32Ty());
+ argTypes.push_back(builder.getInt32Ty());
+ argTypes.push_back(builder.getInt64Ty());
+ argTypes.push_back(builder.getInt8PtrTy());
+ argTypes.push_back(builder.getInt8PtrTy());
argNames.clear();