forked from OSchip/llvm-project
[Profile] create a copy of profile file name from environment
Original patch by Max Moroz. Differential Revsion: http://reviews.llvm.org/D36903 llvm-svn: 311607
This commit is contained in:
parent
a845167dca
commit
c7c5303fa3
|
@ -519,8 +519,10 @@ void __llvm_profile_initialize_file(void) {
|
||||||
|
|
||||||
EnvFilenamePat = getFilenamePatFromEnv();
|
EnvFilenamePat = getFilenamePatFromEnv();
|
||||||
if (EnvFilenamePat) {
|
if (EnvFilenamePat) {
|
||||||
SelectedPat = EnvFilenamePat;
|
/* Pass CopyFilenamePat = 1, to ensure that the filename would be valid
|
||||||
PNS = PNS_environment;
|
at the moment when __llvm_profile_write_file() gets executed. */
|
||||||
|
parseAndSetFilename(EnvFilenamePat, PNS_environment, 1);
|
||||||
|
return;
|
||||||
} else if (hasCommandLineOverrider) {
|
} else if (hasCommandLineOverrider) {
|
||||||
SelectedPat = INSTR_PROF_PROFILE_NAME_VAR;
|
SelectedPat = INSTR_PROF_PROFILE_NAME_VAR;
|
||||||
PNS = PNS_command_line;
|
PNS = PNS_command_line;
|
||||||
|
|
Loading…
Reference in New Issue