mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-12 22:28:22 +00:00
[TableGen] Use range-based for loops. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236089 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ac9abe5e99
commit
40048e70d7
@ -443,11 +443,8 @@ static void
|
||||
ProfileBitsInit(FoldingSetNodeID &ID, ArrayRef<Init *> Range) {
|
||||
ID.AddInteger(Range.size());
|
||||
|
||||
for (ArrayRef<Init *>::iterator i = Range.begin(),
|
||||
iend = Range.end();
|
||||
i != iend;
|
||||
++i)
|
||||
ID.AddPointer(*i);
|
||||
for (Init *I : Range)
|
||||
ID.AddPointer(I);
|
||||
}
|
||||
|
||||
BitsInit *BitsInit::get(ArrayRef<Init *> Range) {
|
||||
@ -593,11 +590,8 @@ static void ProfileListInit(FoldingSetNodeID &ID,
|
||||
ID.AddInteger(Range.size());
|
||||
ID.AddPointer(EltTy);
|
||||
|
||||
for (ArrayRef<Init *>::iterator i = Range.begin(),
|
||||
iend = Range.end();
|
||||
i != iend;
|
||||
++i)
|
||||
ID.AddPointer(*i);
|
||||
for (Init *I : Range)
|
||||
ID.AddPointer(I);
|
||||
}
|
||||
|
||||
ListInit *ListInit::get(ArrayRef<Init *> Range, RecTy *EltTy) {
|
||||
@ -1540,17 +1534,12 @@ DagInit::get(Init *V, const std::string &VN,
|
||||
DagInit *
|
||||
DagInit::get(Init *V, const std::string &VN,
|
||||
const std::vector<std::pair<Init*, std::string> > &args) {
|
||||
typedef std::pair<Init*, std::string> PairType;
|
||||
|
||||
std::vector<Init *> Args;
|
||||
std::vector<std::string> Names;
|
||||
|
||||
for (std::vector<PairType>::const_iterator i = args.begin(),
|
||||
iend = args.end();
|
||||
i != iend;
|
||||
++i) {
|
||||
Args.push_back(i->first);
|
||||
Names.push_back(i->second);
|
||||
for (const auto &Arg : args) {
|
||||
Args.push_back(Arg.first);
|
||||
Names.push_back(Arg.second);
|
||||
}
|
||||
|
||||
return DagInit::get(V, VN, Args, Names);
|
||||
@ -1942,11 +1931,8 @@ void MultiClass::dump() const {
|
||||
Rec.dump();
|
||||
|
||||
errs() << "Defs:\n";
|
||||
for (RecordVector::const_iterator r = DefPrototypes.begin(),
|
||||
rend = DefPrototypes.end();
|
||||
r != rend;
|
||||
++r) {
|
||||
(*r)->dump();
|
||||
for (const auto &Proto : DefPrototypes) {
|
||||
Proto->dump();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user