mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Add a new keyword 'inbounds' for use with getelementptr. See the
LangRef.html changes for details. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77259 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -706,6 +706,8 @@ static void WriteConstants(unsigned FirstVal, unsigned LastVal,
|
||||
break;
|
||||
case Instruction::GetElementPtr:
|
||||
Code = bitc::CST_CODE_CE_GEP;
|
||||
if (cast<GEPOperator>(C)->isInBounds())
|
||||
Code = bitc::CST_CODE_CE_INBOUNDS_GEP;
|
||||
for (unsigned i = 0, e = CE->getNumOperands(); i != e; ++i) {
|
||||
Record.push_back(VE.getTypeID(C->getOperand(i)->getType()));
|
||||
Record.push_back(VE.getValueID(C->getOperand(i)));
|
||||
@ -829,6 +831,8 @@ static void WriteInstruction(const Instruction &I, unsigned InstID,
|
||||
|
||||
case Instruction::GetElementPtr:
|
||||
Code = bitc::FUNC_CODE_INST_GEP;
|
||||
if (cast<GEPOperator>(&I)->isInBounds())
|
||||
Code = bitc::FUNC_CODE_INST_INBOUNDS_GEP;
|
||||
for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i)
|
||||
PushValueAndType(I.getOperand(i), InstID, Vals, VE);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user