mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 15:17:25 +00:00
Prefer int 0 instead of long 0 for GEP arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21924 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -157,7 +157,7 @@ void LowerInvoke::createAbortMessage() {
|
|||||||
GlobalVariable *MsgGV = new GlobalVariable(Msg->getType(), true,
|
GlobalVariable *MsgGV = new GlobalVariable(Msg->getType(), true,
|
||||||
GlobalValue::InternalLinkage,
|
GlobalValue::InternalLinkage,
|
||||||
Msg, "abortmsg", &M);
|
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);
|
AbortMessage = ConstantExpr::getGetElementPtr(MsgGV, GEPIdx);
|
||||||
} else {
|
} else {
|
||||||
// The abort message for cheap EH support tells the user that EH is not
|
// 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,
|
GlobalVariable *MsgGV = new GlobalVariable(Msg->getType(), true,
|
||||||
GlobalValue::InternalLinkage,
|
GlobalValue::InternalLinkage,
|
||||||
Msg, "abortmsg", &M);
|
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);
|
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
|
// Now that we have a pointer to the whole record, remove the entry from the
|
||||||
// JBList.
|
// JBList.
|
||||||
std::vector<Value*> Idx;
|
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));
|
Idx.push_back(ConstantUInt::get(Type::UIntTy, 0));
|
||||||
Value *NextFieldPtr = new GetElementPtrInst(RecPtr, Idx, "NextField", RI);
|
Value *NextFieldPtr = new GetElementPtrInst(RecPtr, Idx, "NextField", RI);
|
||||||
Value *NextRec = new LoadInst(NextFieldPtr, "NextRecord", RI);
|
Value *NextRec = new LoadInst(NextFieldPtr, "NextRecord", RI);
|
||||||
|
|||||||
Reference in New Issue
Block a user