[clang] Use 'starts_with' instead of 'startswith' in Gnu.cpp (NFC)

llvm-project/clang/lib/Driver/ToolChains/Gnu.cpp:1757:14:
 error: 'startswith' is deprecated: Use starts_with instead [-Werror,-Wdeprecated-declarations]
 1757 |     if (Flag.startswith("!march=") || Flag.startswith("-march="))
      |              ^~~~~~~~~~
      |              starts_with
This commit is contained in:
Jie Fu 2023-12-18 16:10:01 +08:00
parent ca1034341c
commit c7cdf3cd5d

View File

@ -1754,7 +1754,7 @@ selectRISCVMultilib(const MultilibSet &RISCVMultilibSet, StringRef Arch,
// Collect all flags except march=*
for (StringRef Flag : Flags) {
if (Flag.startswith("!march=") || Flag.startswith("-march="))
if (Flag.starts_with("!march=") || Flag.starts_with("-march="))
continue;
NewFlags.push_back(Flag.str());