Text.erase(
llvm::remove_if(
Text,
- [](char C) { return std::isspace(static_cast<unsigned char>(C)); }),
+ [](char C) { return llvm::isSpace(static_cast<unsigned char>(C)); }),
Text.end());
return Text;
}
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Tooling/FixIt.h"
+#include "llvm/ADT/StringExtras.h"
#include <cctype>
unsigned int TOffsetInRT = TOffset - ReturnTypeBeginOffset - DeletedChars;
unsigned int TLengthWithWS = CT.T.getLength();
while (TOffsetInRT + TLengthWithWS < ReturnType.size() &&
- std::isspace(ReturnType[TOffsetInRT + TLengthWithWS]))
+ llvm::isSpace(ReturnType[TOffsetInRT + TLengthWithWS]))
TLengthWithWS++;
std::string Specifier = ReturnType.substr(TOffsetInRT, TLengthWithWS);
- if (!std::isspace(Specifier.back()))
+ if (!llvm::isSpace(Specifier.back()))
Specifier.push_back(' ');
Auto.insert(Auto.size() - InitialAutoLength, Specifier);
ReturnType.erase(TOffsetInRT, TLengthWithWS);
ReturnTypeEnd.getLocWithOffset(1)),
SM, LangOpts);
bool NeedSpaceAfterAuto =
- CharAfterReturnType.empty() || !std::isspace(CharAfterReturnType[0]);
+ CharAfterReturnType.empty() || !llvm::isSpace(CharAfterReturnType[0]);
std::string Auto = NeedSpaceAfterAuto ? "auto " : "auto";
std::string ReturnType =
std::string removeSpace(std::string s) {
s.erase(std::remove_if(s.begin(), s.end(),
- [](char c) { return std::isspace(c); }),
+ [](char c) { return llvm::isSpace(c); }),
s.end());
return s;
}
inline QuotingType needsQuotes(StringRef S) {
if (S.empty())
return QuotingType::Single;
- if (isspace(static_cast<unsigned char>(S.front())) ||
- isspace(static_cast<unsigned char>(S.back())))
+ if (isSpace(static_cast<unsigned char>(S.front())) ||
+ isSpace(static_cast<unsigned char>(S.back())))
return QuotingType::Single;
if (isNull(S))
return QuotingType::Single;
//===----------------------------------------------------------------------===//
#include "llvm/CodeGen/TargetInstrInfo.h"
+#include "llvm/ADT/StringExtras.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineMemOperand.h"
AtInsnStart = false;
}
- if (AtInsnStart && !std::isspace(static_cast<unsigned char>(*Str))) {
+ if (AtInsnStart && !isSpace(static_cast<unsigned char>(*Str))) {
unsigned AddLength = MaxInstLength;
if (strncmp(Str, ".space", 6) == 0) {
char *EStr;
int SpaceSize;
SpaceSize = strtol(Str + 6, &EStr, 10);
SpaceSize = SpaceSize < 0 ? 0 : SpaceSize;
- while (*EStr != '\n' && std::isspace(static_cast<unsigned char>(*EStr)))
+ while (*EStr != '\n' && isSpace(static_cast<unsigned char>(*EStr)))
++EStr;
if (*EStr == '\0' || *EStr == '\n' ||
isAsmComment(EStr, MAI)) // Successfully parsed .space argument
#include "llvm/ExecutionEngine/RuntimeDyldChecker.h"
#include "RuntimeDyldCheckerImpl.h"
#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/StringExtras.h"
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCDisassembler/MCDisassembler.h"
#include "llvm/MC/MCInst.h"
const char *LineStart = MemBuf->getBufferStart();
// Eat whitespace.
- while (LineStart != MemBuf->getBufferEnd() && std::isspace(*LineStart))
+ while (LineStart != MemBuf->getBufferEnd() && isSpace(*LineStart))
++LineStart;
while (LineStart != MemBuf->getBufferEnd() && *LineStart != '\0') {
// Eat whitespace.
LineStart = LineEnd;
- while (LineStart != MemBuf->getBufferEnd() && std::isspace(*LineStart))
+ while (LineStart != MemBuf->getBufferEnd() && isSpace(*LineStart))
++LineStart;
}
return DidAllTestsPass && (NumRules != 0);
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/STLExtras.h"
+#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/IR/ProfileSummary.h"
#include "llvm/ProfileData/InstrProf.h"
StringRef buffer = Buffer.getBufferStart();
return count == 0 ||
std::all_of(buffer.begin(), buffer.begin() + count,
- [](char c) { return isPrint(c) || ::isspace(c); });
+ [](char c) { return isPrint(c) || isSpace(c); });
}
// Read the profile variant flag from the header: ":FE" means this is a FE
#include "llvm/Support/FileUtilities.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/SmallString.h"
+#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/MemoryBuffer.h"
// If one of the positions is at a space and the other isn't, chomp up 'til
// the end of the space.
- while (isspace(static_cast<unsigned char>(*F1P)) && F1P != F1End)
+ while (isSpace(static_cast<unsigned char>(*F1P)) && F1P != F1End)
++F1P;
- while (isspace(static_cast<unsigned char>(*F2P)) && F2P != F2End)
+ while (isSpace(static_cast<unsigned char>(*F2P)) && F2P != F2End)
++F2P;
// If we stop on numbers, compare their difference.
StringRef Raw(String.data(), Third.getString().data() - String.data() +
Third.getString().size());
std::string Collapsed = std::string(Raw);
- Collapsed.erase(llvm::remove_if(Collapsed, isspace), Collapsed.end());
+ Collapsed.erase(llvm::remove_if(Collapsed, isSpace), Collapsed.end());
StringRef Whole = Collapsed;
std::pair<StringRef, StringRef> DotSplit = Whole.split('.');
if (!matchRegister(DotSplit.first.lower()))
NeededWorkaround = NeededWorkaround || (Again && !(Contigious && Type));
}
std::string Collapsed = std::string(RawString);
- Collapsed.erase(llvm::remove_if(Collapsed, isspace), Collapsed.end());
+ Collapsed.erase(llvm::remove_if(Collapsed, isSpace), Collapsed.end());
StringRef FullString = Collapsed;
std::pair<StringRef, StringRef> DotSplit = FullString.split('.');
unsigned DotReg = matchRegister(DotSplit.first.lower());
if (*Str == '\n' || strncmp(Str, MAI.getSeparatorString(),
strlen(MAI.getSeparatorString())) == 0)
atInsnStart = true;
- if (atInsnStart && !std::isspace(static_cast<unsigned char>(*Str))) {
+ if (atInsnStart && !isSpace(static_cast<unsigned char>(*Str))) {
Length += MaxInstLength;
atInsnStart = false;
}
///===----------------------------------------------------------------------===//
#include "WebAssembly.h"
+#include "llvm/ADT/StringExtras.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IRBuilder.h"
if (FTy->isVarArg())
OS << "_...";
Sig = OS.str();
- Sig.erase(remove_if(Sig, isspace), Sig.end());
+ Sig.erase(remove_if(Sig, isSpace), Sig.end());
// When s2wasm parses .s file, a comma means the end of an argument. So a
// mangled function name can contain any character but a comma.
std::replace(Sig.begin(), Sig.end(), ',', '.');
//===---------------------------------------------------------------------===//
#include "ResourceScriptToken.h"
+#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
}
bool Tokenizer::skipWhitespaces() {
- while (!streamEof() && std::isspace(Data[Pos]))
+ while (!streamEof() && isSpace(Data[Pos]))
advance();
return !streamEof();
}