diff options
author | Xinliang David Li <davidxl@google.com> | 2016-07-19 20:48:00 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@google.com> | 2016-07-19 20:48:00 +0000 |
commit | d9a4e3bb666e094620540b1132938c99dfdec1cd (patch) | |
tree | 95ca371c5018e5c18cd17f7e3680830ac53287b7 /lib/profile/InstrProfilingFile.c | |
parent | cb081e1fa6099e26db36319d52fdfc1e47568341 (diff) |
[Profile] introduce reusable internal interfaces to find dir separator \NFC
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@276027 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/InstrProfilingFile.c')
-rw-r--r-- | lib/profile/InstrProfilingFile.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/profile/InstrProfilingFile.c b/lib/profile/InstrProfilingFile.c index 32762d14e..6670a2361 100644 --- a/lib/profile/InstrProfilingFile.c +++ b/lib/profile/InstrProfilingFile.c @@ -229,11 +229,7 @@ static void truncateCurrentFile(void) { 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); |