| /llvm-project-15.0.7/libc/test/src/stdlib/ |
| H A D | strtol_test.cpp | 20 ASSERT_EQ(__llvm_libc::strtol(ten, nullptr, -1), 0l); in TEST() 29 ASSERT_EQ(__llvm_libc::strtol(ten, &str_end, 10), 10l); in TEST() 34 ASSERT_EQ(__llvm_libc::strtol(ten, nullptr, 10), 10l); in TEST() 39 ASSERT_EQ(__llvm_libc::strtol(hundred, &str_end, 10), 100l); in TEST() 45 ASSERT_EQ(__llvm_libc::strtol(negative, &str_end, 10), -100l); in TEST() 101 ASSERT_EQ(__llvm_libc::strtol(word_before, &str_end, 10), 0l); in TEST() 107 ASSERT_EQ(__llvm_libc::strtol(word_after, &str_end, 10), 10l); in TEST() 119 ASSERT_EQ(__llvm_libc::strtol(two_signs, &str_end, 10), 0l); in TEST() 125 ASSERT_EQ(__llvm_libc::strtol(sign_before, &str_end, 10), 2l); in TEST() 131 ASSERT_EQ(__llvm_libc::strtol(sign_after, &str_end, 10), 2l); in TEST() [all …]
|
| /llvm-project-15.0.7/llvm/test/Transforms/InstCombine/ |
| H A D | str-int-2.ll | 13 declare i64 @strtol(i8*, i8**, i32) 23 …%call = call i64 @strtol(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8*… 31 …%call = call i64 @strtol(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8*… 39 …%call = call i64 @strtol(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8*… 43 ; Fold a call to strtol with an endptr known to be nonnull. 50 …%call = call i64 @strtol(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8*… 54 ; Don't fold a call to strtol with an endptr that's not known to be nonnull. 61 …%call = call i64 @strtol(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0), i… 75 ; CHECK-NEXT: [[CALL:%.*]] = call i64 @strtol(i8* nocapture [[S:%.*]], i8** null, i32 10) 78 %call = call i64 @strtol(i8* %s, i8** null, i32 10) #3 [all …]
|
| H A D | str-int.ll | 13 declare i32 @strtol(i8*, i8**, i32) 23 …%call = call i32 @strtol(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8*… 31 …%call = call i32 @strtol(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8*… 39 …%call = call i32 @strtol(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8*… 43 ; Fold a call to strtol with an endptr known to be nonnull (the result 53 …%call = call i32 @strtol(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8*… 57 ; Don't fold a call to strtol with an endptr that's not known to be nonnull. 64 …%call = call i32 @strtol(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0), i… 78 ; CHECK-NEXT: [[CALL:%.*]] = call i32 @strtol(i8* nocapture [[S:%.*]], i8** null, i32 10) 81 %call = call i32 @strtol(i8* %s, i8** null, i32 10) #3 [all …]
|
| H A D | str-int-4.ll | 7 declare i32 @strtol(i8*, i8**, i32) 41 ; Exercise folding calls to 32-bit strtol. 96 %i0 = call i32 @strtol(i8* %psi0, i8** @endptr, i32 0) 102 %i9 = call i32 @strtol(i8* %psi9, i8** @endptr, i32 0) 108 %ia = call i32 @strtol(i8* %psia, i8** @endptr, i32 16) 157 ; Exercise not folding calls to 32-bit strtol. 228 %ia = call i32 @strtol(i8* %psia, i8** @endptr, i32 0) 234 %i8 = call i32 @strtol(i8* %psi8, i8** @endptr, i32 8) 421 %n1 = call i32 @strtol(i8* %p1, i8** @endptr, i32 10) 426 %n2 = call i32 @strtol(i8* %p2, i8** @endptr, i32 10) [all …]
|
| H A D | strto-1.ll | 7 declare i64 @strtol(i8* %s, i8** %endptr, i32 %base) 8 ; CHECK: declare i64 @strtol(i8* readonly, i8** nocapture, i32) 30 call i64 @strtol(i8* %x, i8** null, i32 10) 31 ; CHECK-NEXT: call i64 @strtol(i8* nocapture %x, i8** null, i32 10) 79 call i64 @strtol(i8* %x, i8** %endptr, i32 10) 80 ; CHECK-NEXT: call i64 @strtol(i8* %x, i8** %endptr, i32 10)
|
| H A D | str-int-3.ll | 10 declare i64 @strtol(i8*, i8**, i32) 222 ; Fold strtol(a[0].a, 0, 0) to 1. 224 %ia0a = call i64 @strtol(i8* %pa0a, i8** null, i32 0) 228 ; Fold strtol(a[0].b + 1, 0, 0, i8** null, i32 0) to 2. 230 %ia0bp1 = call i64 @strtol(i8* %pa0bp1, i8** null, i32 0) 234 ; Fold strtol(a[0].c + 3, 0, 0, i8** null, i32 0) to 89. 236 %ia0cp3 = call i64 @strtol(i8* %pa0cp3, i8** null, i32 0) 240 ; Fold strtol(a[1].a + 2, 0, 0, i8** null, i32 0) to 3. 242 %ia1ap2 = call i64 @strtol(i8* %pa1ap2, i8** null, i32 0) 246 ; Fold strtol(a[1].b + 3, 0, 0, i8** null, i32 0) to 4. [all …]
|
| /llvm-project-15.0.7/compiler-rt/test/asan/TestCases/ |
| H A D | strtol_strict.c | 34 long r = strtol(array, &endptr, 3); in test1() 42 long r = strtol(array, &endptr, 35); in test2() 60 long r = strtol(array + 1, NULL, -1); in test3() 76 long r = strtol(array + 3, NULL, 1); in test4() 85 long r = strtol(array, NULL, 0); in test5() 93 long r = strtol(array, &endptr, 0); in test6() 101 long r = strtol(array + 2, NULL, 0); in test7()
|
| H A D | interception_failure_test.cpp | 22 extern "C" long strtol(const char *nptr, char **endptr, int base) { in strtol() function 32 return (int)strtol(x, 0, 10); in main()
|
| /llvm-project-15.0.7/flang/runtime/ |
| H A D | environment.cpp | 52 auto n{std::strtol(x, &end, 10)}; in Configure() 72 auto n{std::strtol(x, &end, 10)}; in Configure() 83 auto n{std::strtol(x, &end, 10)}; in Configure()
|
| /llvm-project-15.0.7/compiler-rt/test/asan/TestCases/Linux/ |
| H A D | interception_test.cpp | 11 extern "C" long strtol(const char *nptr, char **endptr, int base) { in strtol() function 19 return (int)strtol(x, 0, 10); in main()
|
| H A D | interception_malloc_test.cpp | 20 return (int)strtol(x, 0, 10); in main()
|
| /llvm-project-15.0.7/clang-tools-extra/test/clang-tidy/checkers/cert/ |
| H A D | err33-c.c | 11 long strtol(const char *restrict nptr, char **restrict endptr, int base); 13 strtol("123", 0, 10); in test_strtol()
|
| /llvm-project-15.0.7/compiler-rt/lib/memprof/ |
| H A D | memprof_interceptors.cpp | 275 INTERCEPTOR(long, strtol, const char *nptr, char **endptr, int base) { in INTERCEPTOR() argument 277 MEMPROF_INTERCEPTOR_ENTER(ctx, strtol); in INTERCEPTOR() 280 long result = REAL(strtol)(nptr, &real_endptr, base); in INTERCEPTOR() 294 int result = REAL(strtol)(nptr, &real_endptr, 10); in INTERCEPTOR() 305 long result = REAL(strtol)(nptr, &real_endptr, 10); in INTERCEPTOR() 351 MEMPROF_INTERCEPT_FUNC(strtol); in InitializeMemprofInterceptors()
|
| /llvm-project-15.0.7/llvm/test/CodeGen/PowerPC/ |
| H A D | sms-phi-1.ll | 12 ; CHECK-NEXT: bl strtol 42 %1 = tail call i64 @strtol() 64 declare i64 @strtol() local_unnamed_addr
|
| /llvm-project-15.0.7/llvm/test/CodeGen/X86/ |
| H A D | 2009-05-23-available_externally.ll | 17 …%call = tail call i64 @strtol(ptr nocapture %__nptr, ptr null, i32 10) nounwind readonly ; <i64> … 22 declare i64 @strtol(ptr, ptr nocapture, i32) nounwind
|
| /llvm-project-15.0.7/clang/lib/Basic/ |
| H A D | Builtins.cpp | 145 unsigned Width = ::strtol(WidthPos, &EndPos, 10); in getRequiredVectorWidth() 169 FormatIdx = ::strtol(Like, nullptr, 10); in isLike() 195 int CalleeIdx = ::strtol(CalleePos, &EndPos, 10); in performsCallback() 202 int PayloadIdx = ::strtol(PayloadPos, &EndPos, 10); in performsCallback()
|
| /llvm-project-15.0.7/clang-tools-extra/docs/clang-tidy/checks/cert/ |
| H A D | err34-c.rst | 8 does not flag calls to ``strtol()``, or other, related conversion functions that 20 not report conversion errors; consider using 'strtol' instead. */
|
| /llvm-project-15.0.7/compiler-rt/lib/asan/ |
| H A D | asan_interceptors.cpp | 490 INTERCEPTOR(long, strtol, const char *nptr, char **endptr, int base) { in INTERCEPTOR() argument 492 ASAN_INTERCEPTOR_ENTER(ctx, strtol); in INTERCEPTOR() 495 return REAL(strtol)(nptr, endptr, base); in INTERCEPTOR() 498 long result = REAL(strtol)(nptr, &real_endptr, base); in INTERCEPTOR() 518 int result = REAL(strtol)(nptr, &real_endptr, 10); in INTERCEPTOR() 535 long result = REAL(strtol)(nptr, &real_endptr, 10); in INTERCEPTOR() 652 ASAN_INTERCEPT_FUNC(strtol); in InitializeAsanInterceptors()
|
| /llvm-project-15.0.7/libc/src/stdlib/ |
| H A D | CMakeLists.txt | 82 strtol 84 strtol.cpp 86 strtol.h
|
| H A D | strtol.h | 14 long strtol(const char *__restrict str, char **__restrict str_end, int base);
|
| H A D | strtol.cpp | 15 LLVM_LIBC_FUNCTION(long, strtol,
|
| /llvm-project-15.0.7/clang/test/CodeGen/ |
| H A D | libcalls-fno-builtin.c | 38 long int strtol(const char *nptr, char **endptr, int base); 133 long int t21(char **x) { return strtol("1234", x, 10); } in t21()
|
| /llvm-project-15.0.7/llvm/test/CodeGen/Hexagon/vect/ |
| H A D | vect-bitcast-1.ll | 54 %call191 = call i32 @strtol() nounwind 68 declare i32 @strtol() nounwind
|
| /llvm-project-15.0.7/libcxx/include/__support/openbsd/ |
| H A D | xlocale.h | 26 return ::strtol(__nptr, __endptr, __base); in strtol_l()
|
| /llvm-project-15.0.7/libcxx/include/__support/android/ |
| H A D | locale_bionic.h | 61 return ::strtol(__nptr, __endptr, __base); in strtol_l()
|