mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
Two ParamAttrsVectors which differ by a permutation
of their elements do not yield the same ParamAttrsList, though they should. On the other hand, everyone seems to pass such vectors with elements ordered by increasing index, so rather than sorting the elements simply assert that the elements are ordered in this way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41845 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b84abcd77d
commit
d50dc73b89
@ -124,6 +124,10 @@ static ManagedStatic<FoldingSet<ParamAttrsList> > ParamAttrsLists;
|
|||||||
ParamAttrsList *
|
ParamAttrsList *
|
||||||
ParamAttrsList::get(const ParamAttrsVector &attrVec) {
|
ParamAttrsList::get(const ParamAttrsVector &attrVec) {
|
||||||
assert(!attrVec.empty() && "Illegal to create empty ParamAttrsList");
|
assert(!attrVec.empty() && "Illegal to create empty ParamAttrsList");
|
||||||
|
#ifndef NDEBUG
|
||||||
|
for (unsigned i = 1, e = attrVec.size(); i < e; ++i)
|
||||||
|
assert(attrVec[i-1].index < attrVec[i].index && "Misordered ParamAttrsList!");
|
||||||
|
#endif
|
||||||
ParamAttrsList key(attrVec);
|
ParamAttrsList key(attrVec);
|
||||||
FoldingSetNodeID ID;
|
FoldingSetNodeID ID;
|
||||||
key.Profile(ID);
|
key.Profile(ID);
|
||||||
|
Loading…
Reference in New Issue
Block a user