[Profile] introduce reusable internal interfaces to find dir separator \NFC
llvm-svn: 276027
diff --git a/compiler-rt/lib/profile/InstrProfilingFile.c b/compiler-rt/lib/profile/InstrProfilingFile.c
index 32762d1..6670a23 100644
--- a/compiler-rt/lib/profile/InstrProfilingFile.c
+++ b/compiler-rt/lib/profile/InstrProfilingFile.c
@@ -229,11 +229,7 @@
return;
/* Create the directory holding the file, if needed. */
- if (strchr(Filename, DIR_SEPARATOR)
-#if defined(DIR_SEPARATOR_2)
- || strchr(Filename, DIR_SEPARATOR_2)
-#endif
- ) {
+ if (lprofFindFirstDirSeparator(Filename)) {
char *Copy = (char *)COMPILER_RT_ALLOCA(Length + 1);
strncpy(Copy, Filename, Length + 1);
__llvm_profile_recursive_mkdir(Copy);