[libprofile] Handle '\\' in __llvm_profile_recursive_mkdir
authorSean Silva <chisophugis@gmail.com>
Mon, 28 Mar 2016 21:32:46 +0000 (21:32 +0000)
committerSean Silva <chisophugis@gmail.com>
Mon, 28 Mar 2016 21:32:46 +0000 (21:32 +0000)
commitc2feac75fd3f3ef3f64465e498848699ff43286f
treeac072115418b5e82c3d38fdee90fddb2f84c1a4a
parent8a3e39ab67222f6f2c1e6954c6536ad53414ab27
[libprofile] Handle '\\' in __llvm_profile_recursive_mkdir

This is implicitly needed at least by gcc-flag-compatibility.test

The thing that needs it is the `\` preceding the "default.profraw"
appended internally by clang when doing `-fprofile-use=`.

Clang uses `\` because is uses sys::path::append which will use `\` on a
Windows host. This is wrong, but I don't think there's an easy way to
solve it (maybe just always using `/` since places that accept `\` also
tend to accept `/`, but not the other way around).

llvm-svn: 264665
compiler-rt/lib/profile/InstrProfilingFile.c
compiler-rt/lib/profile/InstrProfilingUtil.c