Home
last modified time | relevance | path

Searched refs:strchr (Results 1 – 25 of 125) sorted by relevance

12345

/llvm-project-15.0.7/libc/test/src/string/
H A Dstrchr_test.cpp16 ASSERT_STREQ(__llvm_libc::strchr(src, 'a'), "abcde"); in TEST()
25 ASSERT_STREQ(__llvm_libc::strchr(src, 'c'), "cde"); in TEST()
34 ASSERT_STREQ(__llvm_libc::strchr(src, 'e'), "e"); in TEST()
43 ASSERT_STREQ(__llvm_libc::strchr(src, '\0'), ""); in TEST()
56 __llvm_libc::strchr(src, 'd'); in TEST()
59 __llvm_libc::strchr(src, 'z'); in TEST()
62 __llvm_libc::strchr(src, '\0'); in TEST()
72 ASSERT_STREQ(__llvm_libc::strchr(dups, 'X'), dups); in TEST()
77 ASSERT_STREQ(__llvm_libc::strchr("", '\0'), ""); in TEST()
79 ASSERT_STREQ(__llvm_libc::strchr("", 'Z'), nullptr); in TEST()
[all …]
/llvm-project-15.0.7/clang/include/clang/Basic/
H A DBuiltins.h105 return strchr(getRecord(ID).Attributes, 'U') != nullptr; in isPure()
111 return strchr(getRecord(ID).Attributes, 'c') != nullptr; in isConst()
116 return strchr(getRecord(ID).Attributes, 'n') != nullptr; in isNoThrow()
121 return strchr(getRecord(ID).Attributes, 'r') != nullptr; in isNoReturn()
126 return strchr(getRecord(ID).Attributes, 'j') != nullptr; in isReturnsTwice()
132 return strchr(getRecord(ID).Attributes, 'u') != nullptr; in isUnevaluated()
138 return strchr(getRecord(ID).Attributes, 'F') != nullptr; in isLibFunction()
149 return strchr(getRecord(ID).Attributes, 'f') != nullptr; in isPredefinedLibFunction()
198 return strchr(getRecord(ID).Type, '*') != nullptr; in hasPtrArgsOrResult()
204 return strchr(getRecord(ID).Type, '&') != nullptr || in hasReferenceArgsOrResult()
[all …]
/llvm-project-15.0.7/llvm/test/Transforms/InstCombine/
H A Dstrchr-4.ll4 ; Verify that the result of strchr calls used in equality expressions
7 declare i8* @strchr(i8*, i32)
10 ; Fold strchr(s, c) == s to *s == c.
19 %p = call i8* @strchr(i8* %s, i32 %c)
25 ; Fold strchr(s, c) != s to *s != c.
34 %p = call i8* @strchr(i8* %s, i32 %c)
47 %p = call i8* @strchr(i8* %s, i32 0)
53 ; Fold strchr(s, '\0') != null to true.
59 %p = call i8* @strchr(i8* %s, i32 0)
67 ; Fold strchr(a5, c) == a5 to *a5 == c.
[all …]
H A Dstrchr-1.ll2 ; Test that the strchr library call simplifier works correctly.
12 declare i8* @strchr(i8*, i32)
21 %dst = call i8* @strchr(i8* %str, i32 119)
33 %dst = call i8* @strchr(i8* %str, i32 119)
45 %dst = call i8* @strchr(i8* %src, i32 0)
58 %dst = call i8* @strchr(i8* %src, i32 %chr)
70 %dst = call i8* @strchr(i8* %src, i32 65280)
75 ; Check transformation strchr(p, 0) -> p + strlen(p)
84 %dst = call i8* @strchr(i8* %str, i32 0)
113 %ret = call i8* @strchr(i8* %str, i32 %c)
[all …]
H A Dstrchr-3.ll14 declare i8* @strchr(i8*, i32)
29 %ret = call i8* @strchr(i8* %ptr, i32 %C)
46 %ret = call i8* @strchr(i8* %ptr, i32 %C)
63 %ret = call i8* @strchr(i8* %ptr, i32 %C)
68 ; Fold strchr(S = "\00\00\00", C) to C == '\0' ? S : null.
78 %ret = call i8* @strchr(i8* %ptr, i32 %C)
92 %ret = call i8* @strchr(i8* %ptr, i32 %C)
97 ; Fold strchr(S = "\02\01\01\01\01" + 1, C) to
110 %ret = call i8* @strchr(i8* %ptr, i32 %C)
114 ; Fold strchr(S = "\01\01\01\00\02", C) to
[all …]
H A Dstrchr-2.ll1 ; Test that the strchr libcall simplifier works correctly.
10 declare i8 @strchr(i8*, i32)
14 ; CHECK: call i8 @strchr
18 %dst = call i8 @strchr(i8* %str, i32 119)
H A Dpr43081.ll5 declare i8* @strchr(i8*, i32)
12 %call = call i8* @strchr(i8* %0, i32 0)
14 ; CHECK: call i8* @strchr
H A Dmemchr-7.ll7 declare i8* @strchr(i8*, i32)
16 …%call = tail call i8* @strchr(i8* nonnull dereferenceable(27) getelementptr inbounds ([27 x i8], […
64 …%call = tail call i8* @strchr(i8* nonnull dereferenceable(27) getelementptr inbounds ([27 x i8], […
77 …%call = tail call i8* @strchr(i8* nonnull dereferenceable(3) getelementptr inbounds ([2 x i8], [2 …
89 …%call = tail call i8* @strchr(i8* nonnull dereferenceable(27) getelementptr inbounds ([27 x i8], […
/llvm-project-15.0.7/clang/lib/Basic/
H A DBuiltins.cpp56 (bool)strchr(BuiltinInfo[i].Attributes, 'z') == InStdNamespace) in isBuiltinFunc()
57 return strchr(BuiltinInfo[i].Attributes, 'f') != nullptr; in isBuiltinFunc()
67 LangOpts.NoBuiltin && strchr(BuiltinInfo.Attributes, 'f') != nullptr; in builtinIsSupported()
135 const char *WidthPos = ::strchr(getRecord(ID).Attributes, 'V'); in getRequiredVectorWidth()
168 assert(::strchr(Like, ':') && "Format specifier must end with a ':'"); in isLike()
185 const char *CalleePos = ::strchr(getRecord(ID).Attributes, 'C'); in performsCallback()
/llvm-project-15.0.7/llvm/test/Transforms/NewGVN/
H A Dcalls-readonly.ll2 ; Should delete the second call to strlen even though the intervening strchr call exists.
19 %3 = tail call i8* @strchr(i8* %Q, i32 97) ; <i8*> [#uses=1]
37 ; CHECK-NEXT: %3 = tail call i8* @strchr(i8* %Q, i32 97)
45 declare i8* @strchr(i8*, i32) nounwind readonly
/llvm-project-15.0.7/llvm/test/Transforms/GVN/
H A Dcalls-readonly.ll2 ; Should delete the second call to strlen even though the intervening strchr call exists.
19 %3 = tail call i8* @strchr(i8* %Q, i32 97) ; <i8*> [#uses=1]
37 ; CHECK-NEXT: %3 = tail call i8* @strchr(i8* %Q, i32 97)
45 declare i8* @strchr(i8*, i32) nounwind readonly
/llvm-project-15.0.7/libcxx/include/
H A Dstring.h73 char* __libcpp_strchr(const char* __s, int __c) {return (char*)strchr(__s, __c);} in __libcpp_strchr()
75 const char* strchr(const char* __s, int __c) {return __libcpp_strchr(__s, __c);} in strchr() function
77 char* strchr( char* __s, int __c) {return __libcpp_strchr(__s, __c);} in strchr() function
H A Dcstring40 const char* strchr(const char* s, int c);
41 char* strchr( char* s, int c);
82 using ::strchr _LIBCPP_USING_IF_EXISTS;
/llvm-project-15.0.7/openmp/runtime/src/
H A Dkmp_str.cpp316 Str = strchr(CCAST(char *, Psource), ';'); in __kmp_str_loc_numbers()
318 Str = strchr(Psource, ';'); in __kmp_str_loc_numbers()
323 Str = strchr(Str + 1, ';'); in __kmp_str_loc_numbers()
327 Str = strchr(Str + 1, ';'); in __kmp_str_loc_numbers()
333 Str = strchr(Str + 1, ';'); in __kmp_str_loc_numbers()
564 found = strchr(str, search_for); in __kmp_str_replace()
567 found = strchr(found + 1, search_for); in __kmp_str_replace()
579 char *ptr = strchr(str, delim); in __kmp_str_split()
/llvm-project-15.0.7/llvm/test/Transforms/InstCombine/SystemZ/
H A Dlibcall-arg-exts.ll72 ; CHECK: call i8* @strchr
78 ; CHECK: declare i8* @strchr(i8*, i32 signext)
82 declare i8* @strchr(i8*, i32)
87 %dst = call i8* @strchr(i8* %src, i32 %chr)
/llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/bugprone/
H A Dnot-null-terminated-result-strlen.c21 pos = strchr(src, '\0'); in good_memchr_1()
31 pos = strchr("foobar", '\0'); in good_memchr_2()
/llvm-project-15.0.7/lldb/source/Host/common/
H A DGetOptInc.cpp124 if ((has_equal = strchr(current_argv, '=')) != NULL) { in parse_long_options()
276 (place[1] == '\0' && strchr(options, '-') == NULL)) { in getopt_internal()
338 else if (*place != ':' && strchr(options, *place) != NULL) in getopt_internal()
350 (oli = strchr(options, optchar)) == NULL) { in getopt_internal()
/llvm-project-15.0.7/libcxx/test/std/depr/depr.c.headers/
H A Dstring_h.pass.cpp40 ASSERT_SAME_TYPE(char*, decltype(strchr(cp, 0))); in main()
41 ASSERT_SAME_TYPE(const char*, decltype(strchr(cpc, 0))); in main()
/llvm-project-15.0.7/lldb/examples/functions/
H A Dmain.cpp271 strchr(class_name_start, ' '); in main()
283 strchr(selector_pos, ':') + 1; in main()
305 if (strchr(func_demangled_name, '(')) in main()
/llvm-project-15.0.7/libcxx/test/std/strings/c.strings/
H A Dcstring.pass.cpp41 ASSERT_SAME_TYPE(char*, decltype(std::strchr(cp, 0))); in main()
42 ASSERT_SAME_TYPE(const char*, decltype(std::strchr(cpc, 0))); in main()
/llvm-project-15.0.7/polly/lib/External/isl/interface/
H A Dgenerator.cc641 s = strchr(s, '('); in callback_takes_argument()
644 s = strchr(s + 1, '('); in callback_takes_argument()
647 end = strchr(s + 1, ')'); in callback_takes_argument()
651 s = strchr(s + 1, ','); in callback_takes_argument()
655 next = strchr(s + 1, ','); in callback_takes_argument()
658 s = strchr(s + 1, '_'); in callback_takes_argument()
/llvm-project-15.0.7/clang/test/CodeGen/
H A Dlibcalls-fno-builtin.c25 char *strchr(const char *s, int c);
81 char *t8(void) { return strchr("hello, world", 'w'); } in t8()
/llvm-project-15.0.7/llvm/test/MC/Mips/
H A Dmicromips-relocations.s20 # CHECK-FIXUP: lw $25, %call16(strchr)($gp)
23 # CHECK-FIXUP: value: %call16(strchr),
100 lw $25, %call16(strchr)($gp)
/llvm-project-15.0.7/libc/src/string/
H A Dstrchr.h14 char *strchr(const char *src, int c);
/llvm-project-15.0.7/polly/lib/External/isl/imath/
H A Dimtest.c287 if ((code_brk = strchr(line, ':')) == NULL) return 0; in parse_line()
288 if ((in_brk = strchr(code_brk + 1, ':')) == NULL) return 0; in parse_line()
330 while ((line = strchr(line, delim)) != NULL) { in parse_fields()

12345