aboutsummaryrefslogtreecommitdiffstats
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
commita7a27f16ca446a3803bfa6fce260d7a227a7b14c (patch)
tree68cba4c194ed5aff15376d28db6d3b7bccdeb9af
parent8b51330c5162cc1cd36ab3d3e6c35189efa5fd1d (diff)
downloadexternal_llvm-a7a27f16ca446a3803bfa6fce260d7a227a7b14c.zip
external_llvm-a7a27f16ca446a3803bfa6fce260d7a227a7b14c.tar.gz
external_llvm-a7a27f16ca446a3803bfa6fce260d7a227a7b14c.tar.bz2
fix think-o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105291 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Utils/LowerInvoke.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp
index 75d5cdf..90e9b31 100644
--- a/lib/Transforms/Utils/LowerInvoke.cpp
+++ b/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);
}
}