1 /*===- InstrProfilingUtil.c - Support library for PGO instrumentation -----===*\
3 |* The LLVM Compiler Infrastructure
5 |* This file is distributed under the University of Illinois Open Source
6 |* License. See LICENSE.TXT for details.
8 \*===----------------------------------------------------------------------===*/
10 #include "InstrProfilingUtil.h"
11 #include "InstrProfiling.h"
16 int mkdir(const char*, unsigned short);
19 #include <sys/types.h>
22 COMPILER_RT_VISIBILITY
23 void __llvm_profile_recursive_mkdir(char *path) {
26 for (i = 1; path[i] != '\0'; ++i) {
27 if (path[i] != '/') continue;
32 mkdir(path, 0755); /* Some of these will fail, ignore it. */