[Profile] bug fix: profile dir not recursively created
llvm-svn: 276234
This commit is contained in:
parent
38136197bb
commit
e3fc4d0fdd
|
@ -236,6 +236,11 @@ static void truncateCurrentFile(void) {
|
||||||
__llvm_profile_recursive_mkdir(Copy);
|
__llvm_profile_recursive_mkdir(Copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* By pass file truncation to allow online raw profile
|
||||||
|
* merging. */
|
||||||
|
if (lprofCurFilename.MergePoolSize)
|
||||||
|
return;
|
||||||
|
|
||||||
/* Truncate the file. Later we'll reopen and append. */
|
/* Truncate the file. Later we'll reopen and append. */
|
||||||
File = fopen(Filename, "w");
|
File = fopen(Filename, "w");
|
||||||
if (!File)
|
if (!File)
|
||||||
|
@ -350,7 +355,6 @@ static void parseAndSetFilename(const char *FilenamePat,
|
||||||
getPNSStr(PNS));
|
getPNSStr(PNS));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!lprofCurFilename.MergePoolSize)
|
|
||||||
truncateCurrentFile();
|
truncateCurrentFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue