mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-11 21:24:33 +00:00
Use foreach loop over constant operands. NFC.
A number of places had explicit loops over Constant::operands(). Just use foreach loops where possible. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240694 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1519,8 +1519,8 @@ static void WriteConstants(unsigned FirstVal, unsigned LastVal,
|
||||
} else if (isa<ConstantArray>(C) || isa<ConstantStruct>(C) ||
|
||||
isa<ConstantVector>(C)) {
|
||||
Code = bitc::CST_CODE_AGGREGATE;
|
||||
for (unsigned i = 0, e = C->getNumOperands(); i != e; ++i)
|
||||
Record.push_back(VE.getValueID(C->getOperand(i)));
|
||||
for (const Value *Op : C->operands())
|
||||
Record.push_back(VE.getValueID(Op));
|
||||
AbbrevToUse = AggregateAbbrev;
|
||||
} else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
|
||||
switch (CE->getOpcode()) {
|
||||
|
Reference in New Issue
Block a user