Lines Matching refs:FilenamePat
69 const char *FilenamePat; member
676 if (lprofCurFilename.FilenamePat && lprofCurFilename.OwnsFilenamePat) { in resetFilenameToDefault()
677 free((void *)lprofCurFilename.FilenamePat); in resetFilenameToDefault()
680 lprofCurFilename.FilenamePat = DefaultProfileName; in resetFilenameToDefault()
684 static unsigned getMergePoolSize(const char *FilenamePat, int *I) { in getMergePoolSize() argument
687 char C = FilenamePat[*I + J]; in getMergePoolSize()
704 static int parseFilenamePattern(const char *FilenamePat, in parseFilenamePattern() argument
715 if (lprofCurFilename.FilenamePat && lprofCurFilename.OwnsFilenamePat) { in parseFilenamePattern()
716 free((void *)lprofCurFilename.FilenamePat); in parseFilenamePattern()
722 lprofCurFilename.FilenamePat = FilenamePat; in parseFilenamePattern()
724 lprofCurFilename.FilenamePat = strdup(FilenamePat); in parseFilenamePattern()
728 for (I = 0; FilenamePat[I]; ++I) in parseFilenamePattern()
729 if (FilenamePat[I] == '%') { in parseFilenamePattern()
730 if (FilenamePat[++I] == 'p') { in parseFilenamePattern()
735 FilenamePat); in parseFilenamePattern()
739 } else if (FilenamePat[I] == 'h') { in parseFilenamePattern()
744 FilenamePat); in parseFilenamePattern()
747 } else if (FilenamePat[I] == 't') { in parseFilenamePattern()
752 FilenamePat); in parseFilenamePattern()
755 } else if (FilenamePat[I] == 'c') { in parseFilenamePattern()
758 FilenamePat); in parseFilenamePattern()
766 unsigned MergePoolSize = getMergePoolSize(FilenamePat, &I); in parseFilenamePattern()
771 FilenamePat); in parseFilenamePattern()
784 static void parseAndSetFilename(const char *FilenamePat, in parseAndSetFilename() argument
788 const char *OldFilenamePat = lprofCurFilename.FilenamePat; in parseAndSetFilename()
795 if (!FilenamePat) in parseAndSetFilename()
796 FilenamePat = DefaultProfileName; in parseAndSetFilename()
798 if (OldFilenamePat && !strcmp(OldFilenamePat, FilenamePat)) { in parseAndSetFilename()
804 if (!FilenamePat || parseFilenamePattern(FilenamePat, CopyFilenamePat)) in parseAndSetFilename()
811 lprofCurFilename.FilenamePat, getPNSStr(PNS)); in parseAndSetFilename()
815 OldFilenamePat, getPNSStr(OldPNS), lprofCurFilename.FilenamePat, in parseAndSetFilename()
834 if (!lprofCurFilename.FilenamePat || !lprofCurFilename.FilenamePat[0]) in getCurFilenameLength()
839 return strlen(lprofCurFilename.FilenamePat); in getCurFilenameLength()
841 Len = strlen(lprofCurFilename.FilenamePat) + in getCurFilenameLength()
857 const char *FilenamePat = lprofCurFilename.FilenamePat; in getCurFilename() local
859 if (!lprofCurFilename.FilenamePat || !lprofCurFilename.FilenamePat[0]) in getCurFilename()
866 return lprofCurFilename.FilenamePat; in getCurFilename()
868 FilenamePatLength = strlen(lprofCurFilename.FilenamePat); in getCurFilename()
869 memcpy(FilenameBuf, lprofCurFilename.FilenamePat, FilenamePatLength); in getCurFilename()
878 for (I = 0, J = 0; FilenamePat[I]; ++I) in getCurFilename()
879 if (FilenamePat[I] == '%') { in getCurFilename()
880 if (FilenamePat[++I] == 'p') { in getCurFilename()
883 } else if (FilenamePat[I] == 'h') { in getCurFilename()
886 } else if (FilenamePat[I] == 't') { in getCurFilename()
891 if (!getMergePoolSize(FilenamePat, &I)) in getCurFilename()
905 FilenameBuf[J++] = FilenamePat[I]; in getCurFilename()
1016 void __llvm_profile_set_filename(const char *FilenamePat) { in __llvm_profile_set_filename() argument
1019 parseAndSetFilename(FilenamePat, PNS_runtime_api, 1); in __llvm_profile_set_filename()