diff options
author | Chris Lattner <sabre@nondot.org> | 2010-06-27 07:15:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-06-27 07:15:29 +0000 |
commit | 77b89b87c3b9220fea1bc80f6d6598d2003cc8a8 (patch) | |
tree | 1d5d19bdc8f8f05fd100a0e161b3bad78cd58269 /lib/CodeGen/CGException.cpp | |
parent | ec2830d930e306124c2ba6bf1060a3c71dced6ea (diff) |
finally get around to doing a significant cleanup to irgen:
have CGF create and make accessible standard int32,int64 and
intptr types. This fixes a ton of 80 column violations
introduced by LLVMContextification and cleans up stuff a lot.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106977 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGException.cpp')
-rw-r--r-- | lib/CodeGen/CGException.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/CodeGen/CGException.cpp b/lib/CodeGen/CGException.cpp index 90edd19a33..83d91edb10 100644 --- a/lib/CodeGen/CGException.cpp +++ b/lib/CodeGen/CGException.cpp @@ -384,7 +384,7 @@ void CodeGenFunction::EmitStartEHSpec(const Decl *D) { SelectorArgs.push_back(Exc); SelectorArgs.push_back(Personality); - SelectorArgs.push_back(llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), + SelectorArgs.push_back(llvm::ConstantInt::get(Int32Ty, Proto->getNumExceptions()+1)); for (unsigned i = 0; i < Proto->getNumExceptions(); ++i) { @@ -406,8 +406,7 @@ void CodeGenFunction::EmitStartEHSpec(const Decl *D) { Builder.CreateStore(Exc, RethrowPtr); Builder.CreateCondBr(Builder.CreateICmpSLT(Selector, - llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), - 0)), + llvm::ConstantInt::get(Int32Ty, 0)), Match, Unwind); EmitBlock(Match); @@ -594,8 +593,7 @@ void CodeGenFunction::ExitCXXTryStmt(const CXXTryStmt &S, // We are required to emit this call to satisfy LLVM, even // though we don't use the result. llvm::Value *Args[] = { - Exc, Personality, - llvm::ConstantInt::getNullValue(llvm::Type::getInt32Ty(VMContext)) + Exc, Personality, llvm::ConstantInt::getNullValue(Int32Ty) }; Builder.CreateCall(llvm_eh_selector, &Args[0], llvm::array_endof(Args)); Builder.CreateStore(Exc, RethrowPtr); @@ -738,8 +736,7 @@ llvm::BasicBlock *CodeGenFunction::getTerminateHandler() { // We are required to emit this call to satisfy LLVM, even // though we don't use the result. llvm::Value *Args[] = { - Exc, Personality, - llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1) + Exc, Personality, llvm::ConstantInt::get(Int32Ty, 1) }; Builder.CreateCall(llvm_eh_selector, &Args[0], llvm::array_endof(Args)); llvm::CallInst *TerminateCall = |