Changeset 3813 in CLRX


Ignore:
Timestamp:
Feb 16, 2018, 5:38:21 PM (16 months ago)
Author:
matszpk
Message:

CLRadeonExtender: Tests: Sort extraSymbols by names before dumping.

Location:
CLRadeonExtender/trunk/tests/amdasm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CLRadeonExtender/trunk/tests/amdasm/AsmAmdCL2Format.cpp

    r3791 r3813  
    286286    }
    287287    // print extra symbols from main binary if supplied
    288     for (BinSymbol symbol: output->extraSymbols)
     288    Array<BinSymbol> extraSymbols(output->extraSymbols.begin(), output->extraSymbols.end());
     289    std::sort(extraSymbols.begin(), extraSymbols.end(),
     290              [](const BinSymbol& s1, const BinSymbol& s2)
     291              { return s1.name < s2.name; });
     292    for (BinSymbol symbol: extraSymbols)
    289293        os << "  Symbol: name=" << symbol.name << ", value=" << symbol.value <<
    290294                ", size=" << symbol.size << ", section=" << symbol.sectionId << "\n";
  • CLRadeonExtender/trunk/tests/amdasm/AsmAmdFormat.cpp

    r3755 r3813  
    195195        }
    196196        // print extra symbols in inner binaries
    197         for (BinSymbol symbol: kernel.extraSymbols)
     197        Array<BinSymbol> extraSymbols(kernel.extraSymbols.begin(),
     198                                      kernel.extraSymbols.end());
     199        std::sort(extraSymbols.begin(), extraSymbols.end(),
     200                [](const BinSymbol& s1, const BinSymbol& s2)
     201                { return s1.name < s2.name; });
     202        for (BinSymbol symbol: extraSymbols)
    198203                os << "    Symbol: name=" << symbol.name << ", value=" << symbol.value <<
    199204                ", size=" << symbol.size << ", section=" << symbol.sectionId << "\n";
     
    210215    }
    211216    // print extra symbols in main binaries
    212     for (BinSymbol symbol: output->extraSymbols)
     217    Array<BinSymbol> extraSymbols(output->extraSymbols.begin(), output->extraSymbols.end());
     218    std::sort(extraSymbols.begin(), extraSymbols.end(),
     219              [](const BinSymbol& s1, const BinSymbol& s2)
     220              { return s1.name < s2.name; });
     221   
     222    for (BinSymbol symbol: extraSymbols)
    213223        os << "  Symbol: name=" << symbol.name << ", value=" << symbol.value <<
    214224                ", size=" << symbol.size << ", section=" << symbol.sectionId << "\n";
  • CLRadeonExtender/trunk/tests/amdasm/AsmGalliumFormat.cpp

    r3746 r3813  
    202202    }
    203203    // print extra symbols when supplied
    204     for (BinSymbol symbol: output->extraSymbols)
     204    Array<BinSymbol> extraSymbols(output->extraSymbols.begin(), output->extraSymbols.end());
     205    std::sort(extraSymbols.begin(), extraSymbols.end(),
     206              [](const BinSymbol& s1, const BinSymbol& s2)
     207              { return s1.name < s2.name; });
     208    for (BinSymbol symbol: extraSymbols)
    205209        os << "  Symbol: name=" << symbol.name << ", value=" << symbol.value <<
    206210                ", size=" << symbol.size << ", section=" << symbol.sectionId << "\n";
Note: See TracChangeset for help on using the changeset viewer.