Lines Matching refs:FilenamePat
65 const char *FilenamePat; member
248 lprofCurFilename.FilenamePat = DefaultProfileName; in resetFilenameToDefault()
252 static int containsMergeSpecifier(const char *FilenamePat, int I) { in containsMergeSpecifier() argument
253 return (FilenamePat[I] == 'm' || in containsMergeSpecifier()
254 (FilenamePat[I] >= '1' && FilenamePat[I] <= '9' && in containsMergeSpecifier()
257 FilenamePat[I + 1] == 'm')); in containsMergeSpecifier()
262 static int parseFilenamePattern(const char *FilenamePat) { in parseFilenamePattern() argument
268 lprofCurFilename.FilenamePat = FilenamePat; in parseFilenamePattern()
270 for (I = 0; FilenamePat[I]; ++I) in parseFilenamePattern()
271 if (FilenamePat[I] == '%') { in parseFilenamePattern()
272 if (FilenamePat[++I] == 'p') { in parseFilenamePattern()
277 FilenamePat); in parseFilenamePattern()
281 } else if (FilenamePat[I] == 'h') { in parseFilenamePattern()
286 FilenamePat); in parseFilenamePattern()
289 } else if (containsMergeSpecifier(FilenamePat, I)) { in parseFilenamePattern()
292 FilenamePat); in parseFilenamePattern()
296 if (FilenamePat[I] == 'm') in parseFilenamePattern()
299 lprofCurFilename.MergePoolSize = FilenamePat[I] - '0'; in parseFilenamePattern()
310 static void parseAndSetFilename(const char *FilenamePat, in parseAndSetFilename() argument
313 const char *OldFilenamePat = lprofCurFilename.FilenamePat; in parseAndSetFilename()
319 if (!FilenamePat) in parseAndSetFilename()
320 FilenamePat = DefaultProfileName; in parseAndSetFilename()
328 if (OldFilenamePat && !strcmp(OldFilenamePat, FilenamePat)) { in parseAndSetFilename()
334 if (!FilenamePat || parseFilenamePattern(FilenamePat)) in parseAndSetFilename()
340 lprofCurFilename.FilenamePat, getPNSStr(PNS)); in parseAndSetFilename()
343 OldFilenamePat, getPNSStr(OldPNS), lprofCurFilename.FilenamePat, in parseAndSetFilename()
357 if (!lprofCurFilename.FilenamePat || !lprofCurFilename.FilenamePat[0]) in getCurFilenameLength()
362 return strlen(lprofCurFilename.FilenamePat); in getCurFilenameLength()
364 Len = strlen(lprofCurFilename.FilenamePat) + in getCurFilenameLength()
378 const char *FilenamePat = lprofCurFilename.FilenamePat; in getCurFilename() local
380 if (!lprofCurFilename.FilenamePat || !lprofCurFilename.FilenamePat[0]) in getCurFilename()
385 return lprofCurFilename.FilenamePat; in getCurFilename()
390 for (I = 0, J = 0; FilenamePat[I]; ++I) in getCurFilename()
391 if (FilenamePat[I] == '%') { in getCurFilename()
392 if (FilenamePat[++I] == 'p') { in getCurFilename()
395 } else if (FilenamePat[I] == 'h') { in getCurFilename()
398 } else if (containsMergeSpecifier(FilenamePat, I)) { in getCurFilename()
408 if (FilenamePat[I] != 'm') in getCurFilename()
413 FilenameBuf[J++] = FilenamePat[I]; in getCurFilename()
434 const char *FilenamePat; in __llvm_profile_initialize_file() local
436 FilenamePat = getFilenamePatFromEnv(); in __llvm_profile_initialize_file()
437 parseAndSetFilename(FilenamePat, FilenamePat ? PNS_environment : PNS_default); in __llvm_profile_initialize_file()
445 void __llvm_profile_set_filename(const char *FilenamePat) { in __llvm_profile_set_filename() argument
446 parseAndSetFilename(FilenamePat, PNS_runtime_api); in __llvm_profile_set_filename()
456 void __llvm_profile_override_default_filename(const char *FilenamePat) { in __llvm_profile_override_default_filename() argument
457 parseAndSetFilename(FilenamePat, PNS_command_line); in __llvm_profile_override_default_filename()