aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-06-01 21:35:50 +0000
committerJim Grosbach <grosbach@apple.com>2010-06-01 21:35:50 +0000
commit0e20dc5cd6345f8aed6be22491c13d747daeeb0c (patch)
tree1b51c4eb9119c3584264118a4deb7ee5c1bae3a2 /llvm/lib/Transforms
parent47a07244256b9c69c2e8bf1ad148bc5287635f6f (diff)
downloadllvm-0e20dc5cd6345f8aed6be22491c13d747daeeb0c.zip
llvm-0e20dc5cd6345f8aed6be22491c13d747daeeb0c.tar.gz
llvm-0e20dc5cd6345f8aed6be22491c13d747daeeb0c.tar.bz2
fix think-o
llvm-svn: 105291
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Utils/LowerInvoke.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Utils/LowerInvoke.cpp b/llvm/lib/Transforms/Utils/LowerInvoke.cpp
index 75d5cdf..90e9b31 100644
--- a/llvm/lib/Transforms/Utils/LowerInvoke.cpp
+++ b/llvm/lib/Transforms/Utils/LowerInvoke.cpp
@@ -186,6 +186,8 @@ bool LowerInvoke::doInitialization(Module &M) {
}
void LowerInvoke::createAbortMessage(Module *M) {
+ Constant *Null32 = Constant::getNullValue(Type::getInt32Ty(M->getContext()));
+ Constant *GEPIdx[2] = { Null32, Null32 };
if (useExpensiveEHSupport) {
// The abort message for expensive EH support tells the user that the
// program 'unwound' without an 'invoke' instruction.
@@ -197,9 +199,6 @@ void LowerInvoke::createAbortMessage(Module *M) {
GlobalVariable *MsgGV = new GlobalVariable(*M, Msg->getType(), true,
GlobalValue::InternalLinkage,
Msg, "abortmsg");
- Constant *GEPIdx[2] = {
- ConstantInt::get(Type::getInt32Ty(M->getContext()), 2),
- Constant::getNullValue(Type::getInt32Ty(M->getContext())) };
AbortMessage = ConstantExpr::getGetElementPtr(MsgGV, &GEPIdx[0], 2);
} else {
// The abort message for cheap EH support tells the user that EH is not
@@ -213,9 +212,6 @@ void LowerInvoke::createAbortMessage(Module *M) {
GlobalVariable *MsgGV = new GlobalVariable(*M, Msg->getType(), true,
GlobalValue::InternalLinkage,
Msg, "abortmsg");
- Constant *GEPIdx[2] = {
- ConstantInt::get(Type::getInt32Ty(M->getContext()), 2),
- Constant::getNullValue(Type::getInt32Ty(M->getContext())) };
AbortMessage = ConstantExpr::getGetElementPtr(MsgGV, &GEPIdx[0], 2);
}
}