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 | 5e016ae983e1ddc24fca7a04d8399cbd673707c2 (patch) | |
tree | b8cd5a201ca00c55a7312eab58c3d47b08cb8ded /clang/lib/CodeGen/CGException.cpp | |
parent | e000907e136ec7b1f3fc025c49711780f6b1c4c8 (diff) | |
download | bcm5719-llvm-5e016ae983e1ddc24fca7a04d8399cbd673707c2.tar.gz bcm5719-llvm-5e016ae983e1ddc24fca7a04d8399cbd673707c2.zip |
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.
llvm-svn: 106977
Diffstat (limited to 'clang/lib/CodeGen/CGException.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGException.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp index 90edd19a33d..83d91edb106 100644 --- a/clang/lib/CodeGen/CGException.cpp +++ b/clang/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 = |