[PATCH] D49529: [profile] Add interface to get profile filename
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 19 07:24:33 PDT 2018
tejohnson added inline comments.
================
Comment at: lib/profile/InstrProfilingFile.c:529
+ Length = getCurFilenameLength();
+ FilenameBuf = (char *)COMPILER_RT_ALLOCA(Length + 1);
+ Filename = getCurFilename(FilenameBuf);
----------------
davidxl wrote:
> Why not directly passing the malloced buffer to getCurFilename?
getCurFilename doesn't always use the provided FilenameBuf, only if it needs to substitute in a value to the filename pattern. If not, the FilenamePat is returned (note also that this code is modeled after __llvm_profile_get_path_prefix).
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D49529
More information about the llvm-commits
mailing list