Prefer int 0 instead of long 0 for GEP arguments.
authorChris Lattner <sabre@nondot.org>
Fri, 13 May 2005 06:10:12 +0000 (06:10 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 13 May 2005 06:10:12 +0000 (06:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21924 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/LowerInvoke.cpp

index b751bc0d26d41231735d5a8c85c6e0a58022770c..2738b4aa5e3b762b98e3e1eeaa4232d11f7718c4 100644 (file)
@@ -157,7 +157,7 @@ void LowerInvoke::createAbortMessage() {
     GlobalVariable *MsgGV = new GlobalVariable(Msg->getType(), true,
                                                GlobalValue::InternalLinkage,
                                                Msg, "abortmsg", &M);
-    std::vector<Constant*> GEPIdx(2, Constant::getNullValue(Type::LongTy));
+    std::vector<Constant*> GEPIdx(2, Constant::getNullValue(Type::IntTy));
     AbortMessage = ConstantExpr::getGetElementPtr(MsgGV, GEPIdx);
   } else {
     // The abort message for cheap EH support tells the user that EH is not
@@ -170,7 +170,7 @@ void LowerInvoke::createAbortMessage() {
     GlobalVariable *MsgGV = new GlobalVariable(Msg->getType(), true,
                                                GlobalValue::InternalLinkage,
                                                Msg, "abortmsg", &M);
-    std::vector<Constant*> GEPIdx(2, Constant::getNullValue(Type::LongTy));
+    std::vector<Constant*> GEPIdx(2, Constant::getNullValue(Type::IntTy));
     AbortMessage = ConstantExpr::getGetElementPtr(MsgGV, GEPIdx);
   }
 }
@@ -355,7 +355,7 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) {
     // Now that we have a pointer to the whole record, remove the entry from the
     // JBList.
     std::vector<Value*> Idx;
-    Idx.push_back(Constant::getNullValue(Type::LongTy));
+    Idx.push_back(Constant::getNullValue(Type::IntTy));
     Idx.push_back(ConstantUInt::get(Type::UIntTy, 0));
     Value *NextFieldPtr = new GetElementPtrInst(RecPtr, Idx, "NextField", RI);
     Value *NextRec = new LoadInst(NextFieldPtr, "NextRecord", RI);