[llvm-commits] [llvm] r105291 - /llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp
Jim Grosbach
grosbach at apple.com
Tue Jun 1 14:35:50 PDT 2010
Author: grosbach
Date: Tue Jun 1 16:35:50 2010
New Revision: 105291
URL: http://llvm.org/viewvc/llvm-project?rev=105291&view=rev
Log:
fix think-o
Modified:
llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp
Modified: llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp?rev=105291&r1=105290&r2=105291&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp Tue Jun 1 16:35:50 2010
@@ -186,6 +186,8 @@
}
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 @@
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 @@
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);
}
}
More information about the llvm-commits
mailing list