@@ -1086,7 +1086,7 @@ void BinaryContext::generateSymbolHashes() {
1086
1086
auto isPadding = [](const BinaryData &BD) {
1087
1087
StringRef Contents = BD.getSection ().getContents ();
1088
1088
StringRef SymData = Contents.substr (BD.getOffset (), BD.getSize ());
1089
- return (BD.getName ().startswith (" HOLEat" ) ||
1089
+ return (BD.getName ().starts_with (" HOLEat" ) ||
1090
1090
SymData.find_first_not_of (0 ) == StringRef::npos);
1091
1091
};
1092
1092
@@ -1326,8 +1326,8 @@ void BinaryContext::postProcessSymbolTable() {
1326
1326
bool Valid = true ;
1327
1327
for (auto &Entry : BinaryDataMap) {
1328
1328
BinaryData *BD = Entry.second ;
1329
- if ((BD->getName ().startswith (" SYMBOLat" ) ||
1330
- BD->getName ().startswith (" DATAat" )) &&
1329
+ if ((BD->getName ().starts_with (" SYMBOLat" ) ||
1330
+ BD->getName ().starts_with (" DATAat" )) &&
1331
1331
!BD->getParent () && !BD->getSize () && !BD->isAbsolute () &&
1332
1332
BD->getSection ()) {
1333
1333
errs () << " BOLT-WARNING: zero-sized top level symbol: " << *BD << " \n " ;
@@ -1410,9 +1410,9 @@ void BinaryContext::fixBinaryDataHoles() {
1410
1410
auto isNotHole = [&Section](const binary_data_iterator &Itr) {
1411
1411
BinaryData *BD = Itr->second ;
1412
1412
bool isHole = (!BD->getParent () && !BD->getSize () && BD->isObject () &&
1413
- (BD->getName ().startswith (" SYMBOLat0x" ) ||
1414
- BD->getName ().startswith (" DATAat0x" ) ||
1415
- BD->getName ().startswith (" ANONYMOUS" )));
1413
+ (BD->getName ().starts_with (" SYMBOLat0x" ) ||
1414
+ BD->getName ().starts_with (" DATAat0x" ) ||
1415
+ BD->getName ().starts_with (" ANONYMOUS" )));
1416
1416
return !isHole && BD->getSection () == Section && !BD->getParent ();
1417
1417
};
1418
1418
@@ -1818,14 +1818,14 @@ MarkerSymType BinaryContext::getMarkerType(const SymbolRef &Symbol) const {
1818
1818
if (*TypeOrError != SymbolRef::ST_Unknown)
1819
1819
return MarkerSymType::NONE;
1820
1820
1821
- if (*NameOrError == " $x" || NameOrError->startswith (" $x." ))
1821
+ if (*NameOrError == " $x" || NameOrError->starts_with (" $x." ))
1822
1822
return MarkerSymType::CODE;
1823
1823
1824
1824
// $x<ISA>
1825
- if (isRISCV () && NameOrError->startswith (" $x" ))
1825
+ if (isRISCV () && NameOrError->starts_with (" $x" ))
1826
1826
return MarkerSymType::CODE;
1827
1827
1828
- if (*NameOrError == " $d" || NameOrError->startswith (" $d." ))
1828
+ if (*NameOrError == " $d" || NameOrError->starts_with (" $d." ))
1829
1829
return MarkerSymType::DATA;
1830
1830
1831
1831
return MarkerSymType::NONE;
0 commit comments