[LLVMdev] Fwd: BitcodeWriter.cpp, WriteAttributeGroupTable attribute slot index is hardcoded.. ?

Stepan Dyatkovskiy stpworld at narod.ru
Tue Sep 10 06:52:21 PDT 2013


Hi all.
In the beginning of this method I see the next:

   for (unsigned i = 0, e = AttrGrps.size(); i != e; ++i) {
     AttributeSet AS = AttrGrps[i];
     for (unsigned i = 0, e = AS.getNumSlots(); i != e; ++i) {
       AttributeSet A = AS.getSlotAttributes(i);

       Record.push_back(VE.getAttributeGroupID(A));
       Record.push_back(AS.getSlotIndex(i));

       for (AttributeSet::iterator I = AS.begin(0), E = AS.end(0);
       ...

Why 'begin(0)'?
Shouldn't it be 'AS.begin(i)'?

-Stepan.




More information about the llvm-dev mailing list