mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
[llvm] Use llvm::erase_value and llvm::erase_if (NFC)
This commit is contained in:
parent
201d0ba7d2
commit
ae4745f165
@ -804,13 +804,9 @@ void WinEHPrepare::cloneCommonBlocks(Function &F) {
|
||||
<< "\' to block \'" << NewBlock->getName()
|
||||
<< "\'.\n");
|
||||
|
||||
BlocksInFunclet.erase(
|
||||
std::remove(BlocksInFunclet.begin(), BlocksInFunclet.end(), OldBlock),
|
||||
BlocksInFunclet.end());
|
||||
llvm::erase_value(BlocksInFunclet, OldBlock);
|
||||
ColorVector &OldColors = BlockColors[OldBlock];
|
||||
OldColors.erase(
|
||||
std::remove(OldColors.begin(), OldColors.end(), FuncletPadBB),
|
||||
OldColors.end());
|
||||
llvm::erase_value(OldColors, FuncletPadBB);
|
||||
|
||||
DEBUG_WITH_TYPE("winehprepare-coloring",
|
||||
dbgs() << " Removed color \'" << FuncletPadBB->getName()
|
||||
|
@ -997,7 +997,7 @@ OperandMatchResultTy HexagonAsmParser::tryParseRegister(unsigned &RegNo,
|
||||
NeededWorkaround = NeededWorkaround || (Again && !(Contigious && Type));
|
||||
}
|
||||
std::string Collapsed = std::string(RawString);
|
||||
Collapsed.erase(llvm::remove_if(Collapsed, isSpace), Collapsed.end());
|
||||
llvm::erase_if(Collapsed, isSpace);
|
||||
StringRef FullString = Collapsed;
|
||||
std::pair<StringRef, StringRef> DotSplit = FullString.split('.');
|
||||
unsigned DotReg = matchRegister(DotSplit.first.lower());
|
||||
|
@ -39,7 +39,7 @@ inline bool isNumericRegex(llvm::StringRef S) {
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
std::string Input(reinterpret_cast<const char *>(Data), Size);
|
||||
Input.erase(std::remove(Input.begin(), Input.end(), 0), Input.end());
|
||||
llvm::erase_value(Input, 0);
|
||||
if (!Input.empty() && llvm::yaml::isNumeric(Input) != isNumericRegex(Input))
|
||||
LLVM_BUILTIN_TRAP;
|
||||
return 0;
|
||||
|
@ -25,7 +25,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
|
||||
isValidYaml(Input.data(), Input.size());
|
||||
|
||||
// Ensure we don't crash on byte strings with no null characters.
|
||||
Input.erase(std::remove(Input.begin(), Input.end(), 0), Input.end());
|
||||
llvm::erase_value(Input, 0);
|
||||
Input.shrink_to_fit();
|
||||
bool IsValidWithout0s = isValidYaml(Input.data(), Input.size());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user