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"
15 int mkdir(const char*, unsigned short);
18 #include <sys/types.h>
21 __attribute__((visibility("hidden")))
22 void __llvm_profile_recursive_mkdir(char *path) {
25 for (i = 1; path[i] != '\0'; ++i) {
26 if (path[i] != '/') continue;
31 mkdir(path, 0755); /* Some of these will fail, ignore it. */