/external/llvm/unittests/ADT/ |
D | StringRefTest.cpp | 109 StringRef Str("hello"); in TEST() local 110 EXPECT_EQ("lo", Str.substr(3)); in TEST() 111 EXPECT_EQ("", Str.substr(100)); in TEST() 112 EXPECT_EQ("hello", Str.substr(0, 100)); in TEST() 113 EXPECT_EQ("o", Str.substr(4, 10)); in TEST() 117 StringRef Str("hello"); in TEST() local 118 EXPECT_EQ("l", Str.slice(2, 3)); in TEST() 119 EXPECT_EQ("ell", Str.slice(1, 4)); in TEST() 120 EXPECT_EQ("llo", Str.slice(2, 100)); in TEST() 121 EXPECT_EQ("", Str.slice(2, 1)); in TEST() [all …]
|
/external/llvm/tools/llvm-mc/ |
D | Disassembler.cpp | 80 static bool SkipToToken(StringRef &Str) { in SkipToToken() argument 82 if (Str.empty()) in SkipToToken() 86 if (size_t Pos = Str.find_first_not_of(" \t\r\n,")) { in SkipToToken() 87 Str = Str.substr(Pos); in SkipToToken() 92 if (Str[0] == '#') { in SkipToToken() 93 Str = Str.substr(Str.find_first_of('\n')); in SkipToToken() 102 StringRef &Str, in ByteArrayFromString() argument 104 while (SkipToToken(Str)) { in ByteArrayFromString() 106 if (Str[0] == '[' || Str[0] == ']') in ByteArrayFromString() 110 size_t Next = Str.find_first_of(" \t\n\r,#[]"); in ByteArrayFromString() [all …]
|
/external/llvm/lib/Support/ |
D | StringRef.cpp | 142 size_t StringRef::find(StringRef Str, size_t From) const { in find() argument 143 size_t N = Str.size(); in find() 150 if (substr(i, N).equals(Str)) in find() 162 BadCharSkip[(uint8_t)Str[i]] = N-1-i; in find() 166 if (substr(Pos, N).equals(Str)) // See if this is the correct substring. in find() 182 size_t StringRef::rfind(StringRef Str) const { in rfind() 183 size_t N = Str.size(); in rfind() 188 if (substr(i, N).equals(Str)) in rfind() 303 size_t StringRef::count(StringRef Str) const { in count() 305 size_t N = Str.size(); in count() [all …]
|
D | ScaledNumber.cpp | 137 static void appendDigit(std::string &Str, unsigned D) { in appendDigit() argument 139 Str += '0' + D % 10; in appendDigit() 142 static void appendNumber(std::string &Str, uint64_t N) { in appendNumber() argument 144 appendDigit(Str, N % 10); in appendNumber() 238 std::string Str; in toString() local 241 appendNumber(Str, Above0); in toString() 242 DigitsOut = Str.size(); in toString() 244 appendDigit(Str, 0); in toString() 245 std::reverse(Str.begin(), Str.end()); in toString() 249 return Str + ".0"; in toString() [all …]
|
D | GraphWriter.cpp | 25 std::string Str(Label); in EscapeString() local 26 for (unsigned i = 0; i != Str.length(); ++i) in EscapeString() 27 switch (Str[i]) { in EscapeString() 29 Str.insert(Str.begin()+i, '\\'); // Escape character... in EscapeString() 31 Str[i] = 'n'; in EscapeString() 34 Str.insert(Str.begin()+i, ' '); // Convert to two spaces in EscapeString() 36 Str[i] = ' '; in EscapeString() 39 if (i+1 != Str.length()) in EscapeString() 40 switch (Str[i+1]) { in EscapeString() 43 Str.erase(Str.begin()+i); continue; in EscapeString() [all …]
|
/external/libnfc-nxp/inc/ |
D | phDbgTrace.h | 53 #define PHDBG_FATAL_ERROR(Str) {\ argument 62 #define PHDBG_CRITICAL_ERROR(Str) {\ argument 70 #define PHDBG_WARNING(Str) argument 71 #define PHDBG_INFO(Str) argument 77 #define PHDBG_FATAL_ERROR(Str) {\ argument 86 #define PHDBG_CRITICAL_ERROR(Str) {\ argument 95 #define PHDBG_WARNING(Str) {\ argument 99 phOsalNfc_DbgString (Str);\ 102 #define PHDBG_INFO(Str) argument 108 #define PHDBG_FATAL_ERROR(Str) {\ argument [all …]
|
/external/clang/tools/libclang/ |
D | CXString.cpp | 46 CXString Str; in createEmpty() local 47 Str.data = ""; in createEmpty() 48 Str.private_flags = CXS_Unmanaged; in createEmpty() 49 return Str; in createEmpty() 53 CXString Str; in createNull() local 54 Str.data = nullptr; in createNull() 55 Str.private_flags = CXS_Unmanaged; in createNull() 56 return Str; in createNull() 63 CXString Str; in createRef() local 64 Str.data = String; in createRef() [all …]
|
/external/llvm/tools/llvm-cov/ |
D | CoverageReport.cpp | 27 StringRef Str; member 32 Column(StringRef Str, unsigned Width) in Column() 33 : Str(Str), Width(Width), Trim(NoTrim), Alignment(LeftAlignment) {} in Column() 54 if (Str.size() <= Width) { in render() 56 OS.indent(Width - Str.size()); in render() 57 OS << Str; in render() 60 OS << Str; in render() 61 OS.indent(Width - Str.size()); in render() 67 OS << Str.substr(0, Width); in render() 70 OS << "..." << Str.substr(Str.size() - Width + 3); in render() [all …]
|
D | SourceCoverageView.cpp | 90 auto Str = BufferOS.str(); in renderLineCoverageColumn() local 92 Str = Str.substr(0, std::min(Str.size(), (size_t)LineCoverageColumnWidth)); in renderLineCoverageColumn() 94 OS.indent(LineCoverageColumnWidth - Str.size()); in renderLineCoverageColumn() 97 << Str; in renderLineCoverageColumn() 106 auto Str = BufferOS.str(); in renderLineNumberColumn() local 108 Str = Str.substr(0, std::min(Str.size(), (size_t)LineNumberColumnWidth)); in renderLineNumberColumn() 109 OS.indent(LineNumberColumnWidth - Str.size()) << Str << '|'; in renderLineNumberColumn() 126 StringRef Str = BufferOS.str(); in renderRegionMarkers() local 128 Str = Str.substr(0, std::min(Str.size(), (size_t)7)); in renderRegionMarkers() 129 PrevColumn += Str.size(); in renderRegionMarkers() [all …]
|
/external/llvm/utils/TableGen/ |
D | AsmWriterInst.h | 42 std::string Str; member 66 : OperandType(op), Str(LitStr) {} in OperandType() 74 : OperandType(op), Str(Printer), CGIOpNo(_CGIOpNo), MIOpNo(_MIOpNo), in OperandType() 78 if (OperandType != Other.OperandType || Str != Other.Str) return true; 105 void AddLiteralString(const std::string &Str) { in AddLiteralString() argument 110 Operands.back().Str.append(Str); in AddLiteralString() 112 Operands.push_back(AsmWriterOperand(Str)); in AddLiteralString()
|
/external/llvm/lib/IR/ |
D | DiagnosticPrinter.cpp | 37 DiagnosticPrinter &DiagnosticPrinterRawOStream::operator<<(StringRef Str) { in operator <<() argument 38 Stream << Str; in operator <<() 42 DiagnosticPrinter &DiagnosticPrinterRawOStream::operator<<(const char *Str) { in operator <<() argument 43 Stream << Str; in operator <<() 48 const std::string &Str) { in operator <<() argument 49 Stream << Str; in operator <<() 93 DiagnosticPrinter &DiagnosticPrinterRawOStream::operator<<(const Twine &Str) { in operator <<() argument 94 Str.print(Stream); in operator <<()
|
/external/llvm/unittests/Support/ |
D | raw_ostream_test.cpp | 121 std::string Str; in TEST() local 122 raw_string_ostream OS(Str); in TEST() 131 std::string Str; in TEST() local 133 Str = ""; in TEST() 134 raw_string_ostream(Str).write_escaped("hi"); in TEST() 135 EXPECT_EQ("hi", Str); in TEST() 137 Str = ""; in TEST() 138 raw_string_ostream(Str).write_escaped("\\\t\n\""); in TEST() 139 EXPECT_EQ("\\\\\\t\\n\\\"", Str); in TEST() 141 Str = ""; in TEST() [all …]
|
/external/llvm/include/llvm/MC/MCParser/ |
D | MCAsmLexer.h | 60 StringRef Str; variable 66 AsmToken(TokenKind Kind, StringRef Str, APInt IntVal) in AsmToken() argument 67 : Kind(Kind), Str(Str), IntVal(IntVal) {} in AsmToken() 68 AsmToken(TokenKind Kind, StringRef Str, int64_t IntVal = 0) 69 : Kind(Kind), Str(Str), IntVal(64, IntVal, true) {} in Kind() 82 return Str.slice(1, Str.size() - 1); in getStringContents() 100 StringRef getString() const { return Str; } in getString()
|
/external/clang/lib/Basic/ |
D | OpenMPKinds.cpp | 23 OpenMPDirectiveKind clang::getOpenMPDirectiveKind(StringRef Str) { in getOpenMPDirectiveKind() argument 24 return llvm::StringSwitch<OpenMPDirectiveKind>(Str) in getOpenMPDirectiveKind() 26 #define OPENMP_DIRECTIVE_EXT(Name, Str) .Case(Str, OMPD_##Name) in getOpenMPDirectiveKind() argument 39 #define OPENMP_DIRECTIVE_EXT(Name, Str) \ in getOpenMPDirectiveName() argument 41 return Str; in getOpenMPDirectiveName() 48 OpenMPClauseKind clang::getOpenMPClauseKind(StringRef Str) { in getOpenMPClauseKind() argument 53 if (Str == "flush") in getOpenMPClauseKind() 55 return llvm::StringSwitch<OpenMPClauseKind>(Str) in getOpenMPClauseKind() 77 StringRef Str) { in getOpenMPSimpleClauseType() argument 80 return llvm::StringSwitch<OpenMPDefaultClauseKind>(Str) in getOpenMPSimpleClauseType() [all …]
|
/external/llvm/include/llvm/TableGen/ |
D | StringToOffsetTable.h | 30 unsigned GetOrAddStringOffset(StringRef Str, bool appendZero = true) { 32 StringOffset.insert(std::make_pair(Str, AggregateString.size())); 35 AggregateString.append(Str.begin(), Str.end()); 45 SmallString<256> Str; in EmitString() local 46 raw_svector_ostream(Str).write_escaped(AggregateString); in EmitString() 47 AggregateString = Str.str(); in EmitString()
|
/external/llvm/include/llvm/ADT/ |
D | StringSwitch.h | 44 StringRef Str; variable 52 : Str(S), Result(nullptr) { } in StringSwitch() 56 if (!Result && N-1 == Str.size() && in Case() 57 (std::memcmp(S, Str.data(), N-1) == 0)) { in Case() 66 if (!Result && Str.size() >= N-1 && in EndsWith() 67 std::memcmp(S, Str.data() + Str.size() + 1 - N, N-1) == 0) { in EndsWith() 76 if (!Result && Str.size() >= N-1 && in StartsWith() 77 std::memcmp(S, Str.data(), N-1) == 0) { in StartsWith()
|
/external/llvm/include/llvm/IR/ |
D | DiagnosticPrinter.h | 38 virtual DiagnosticPrinter &operator<<(StringRef Str) = 0; 39 virtual DiagnosticPrinter &operator<<(const char *Str) = 0; 40 virtual DiagnosticPrinter &operator<<(const std::string &Str) = 0; 49 virtual DiagnosticPrinter &operator<<(const Twine &Str) = 0; 68 DiagnosticPrinter &operator<<(StringRef Str) override; 69 DiagnosticPrinter &operator<<(const char *Str) override; 70 DiagnosticPrinter &operator<<(const std::string &Str) override; 79 DiagnosticPrinter &operator<<(const Twine &Str) override;
|
/external/clang/lib/Lex/ |
D | TokenConcatenation.cpp | 23 static bool IsStringPrefix(StringRef Str, bool CPlusPlus11) { in IsStringPrefix() argument 25 if (Str[0] == 'L' || in IsStringPrefix() 26 (CPlusPlus11 && (Str[0] == 'u' || Str[0] == 'U' || Str[0] == 'R'))) { in IsStringPrefix() 28 if (Str.size() == 1) in IsStringPrefix() 33 if (Str[1] == 'R' && Str[0] != 'R' && Str.size() == 2 && CPlusPlus11) in IsStringPrefix() 37 if (Str[0] == 'u' && Str[1] == '8') { in IsStringPrefix() 38 if (Str.size() == 2) return true; // "u8" in IsStringPrefix() 39 if (Str.size() == 3 && Str[2] == 'R') return true; // "u8R" in IsStringPrefix()
|
/external/bison/src/ |
D | system.h | 161 # define obstack_sgrow(Obs, Str) \ argument 162 obstack_grow (Obs, Str, strlen (Str)) 169 # define obstack_escape(Obs, Str) \ argument 172 for (p = Str; *p; p++) \ 191 # define obstack_quote(Obs, Str) \ argument 193 char const* obstack_quote_p = Str; \
|
/external/llvm/include/llvm/Support/ |
D | raw_ostream.h | 160 raw_ostream &operator<<(StringRef Str) { 162 size_t Size = Str.size(); 166 return write(Str.data(), Size); 168 memcpy(OutBufCur, Str.data(), Size); 173 raw_ostream &operator<<(const char *Str) { 177 return this->operator<<(StringRef(Str)); 180 raw_ostream &operator<<(const std::string &Str) { 182 return write(Str.data(), Str.length()); 185 raw_ostream &operator<<(const llvm::SmallVectorImpl<char> &Str) { 186 return write(Str.data(), Str.size()); [all …]
|
/external/llvm/test/tools/llvm-objdump/ARM/ |
D | macho-symbolized-subtractor.test | 5 movw r3, :lower16:(Str-(PCinst+4)) 6 movt r3, :upper16:(Str-(PCinst+4)) 12 Str: 14 # CHECK: movw r3, :lower16:((Str-PCinst)-4) 15 # CHECK: movt r3, :upper16:((Str-PCinst)-4)
|
/external/llvm/lib/CodeGen/AsmPrinter/ |
D | DwarfStringPool.cpp | 18 StringRef Prefix, StringRef Str) { in getEntry() argument 19 std::pair<MCSymbol *, unsigned> &Entry = Pool[Str]; in getEntry() 27 MCSymbol *DwarfStringPool::getSymbol(AsmPrinter &Asm, StringRef Str) { in getSymbol() argument 28 return getEntry(Asm, Pool, Prefix, Str).first; in getSymbol() 31 unsigned DwarfStringPool::getIndex(AsmPrinter &Asm, StringRef Str) { in getIndex() argument 32 return getEntry(Asm, Pool, Prefix, Str).second; in getIndex()
|
/external/llvm/lib/Option/ |
D | OptTable.cpp | 175 static unsigned matchOption(const OptTable::Info *I, StringRef Str, in matchOption() argument 179 if (Str.startswith(Prefix)) { in matchOption() 180 StringRef Rest = Str.substr(Prefix.size()); in matchOption() 195 const char *Str = Args.getArgString(Index); in ParseOneArg() local 199 if (isInput(PrefixesUnion, Str)) in ParseOneArg() 200 return new Arg(getOption(TheInputOptionID), Str, Index++, Str); in ParseOneArg() 204 StringRef Name = StringRef(Str).ltrim(PrefixChars); in ParseOneArg() 221 if ((ArgSize = matchOption(Start, Str, IgnoreCase))) in ParseOneArg() 244 if (Str[0] == '/') in ParseOneArg() 245 return new Arg(getOption(TheInputOptionID), Str, Index++, Str); in ParseOneArg() [all …]
|
/external/clang/test/Analysis/inlining/ |
D | InlineObjCInstanceMethod.m | 22 CFStringRef Str = ((void*)0); 23 Str = getString(); 24 if (Str) { 25 CFRetain(Str); 27 return Str; 116 CFStringRef Str = ((void*)0); 117 Str = getString(); 118 if (Str) { 119 CFRetain(Str); 121 return Str;
|
/external/lldb/source/Core/ |
D | RegisterValue.cpp | 394 static inline void StripSpaces(llvm::StringRef &Str) in StripSpaces() argument 396 while (!Str.empty() && isspace(Str[0])) in StripSpaces() 397 Str = Str.substr(1); in StripSpaces() 398 while (!Str.empty() && isspace(Str.back())) in StripSpaces() 399 Str = Str.substr(0, Str.size()-1); in StripSpaces() 401 static inline void LStrip(llvm::StringRef &Str, char c) in LStrip() argument 403 if (!Str.empty() && Str.front() == c) in LStrip() 404 Str = Str.substr(1); in LStrip() 406 static inline void RStrip(llvm::StringRef &Str, char c) in RStrip() argument 408 if (!Str.empty() && Str.back() == c) in RStrip() [all …]
|