[all-commits] [llvm/llvm-project] 931d04: [ADT] Make StringRef::compare like std::string_vie...
Benjamin Kramer via All-commits
all-commits at lists.llvm.org
Sun Jan 15 12:10:43 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 931d04be2fc8f3f0505b43e64297f75d526cb42a
https://github.com/llvm/llvm-project/commit/931d04be2fc8f3f0505b43e64297f75d526cb42a
Author: Benjamin Kramer <benny.kra at googlemail.com>
Date: 2023-01-15 (Sun, 15 Jan 2023)
Changed paths:
M clang/lib/AST/DeclarationName.cpp
M clang/lib/Analysis/PathDiagnostic.cpp
M clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
M clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
M lld/COFF/Writer.cpp
M llvm/include/llvm/ADT/SmallString.h
M llvm/include/llvm/ADT/StringRef.h
M llvm/include/llvm/ProfileData/SampleProf.h
M llvm/lib/Transforms/IPO/MergeFunctions.cpp
M llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
M llvm/unittests/ADT/SmallStringTest.cpp
M llvm/unittests/ADT/StringRefTest.cpp
Log Message:
-----------
[ADT] Make StringRef::compare like std::string_view::compare
string_view has a slightly weaker contract, which only specifies whether
the value is bigger or smaller than 0. Adapt users accordingly and just
forward to the standard function (that also compiles down to memcmp)
More information about the All-commits
mailing list