[PATCH] D89086: [MemProf] Allow the binary to specify the profile output filename
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 16 16:45:38 PDT 2020
tejohnson added inline comments.
================
Comment at: compiler-rt/lib/memprof/memprof_rtl.cpp:31
+// Allow the user to specify a profile output file via the binary.
+SANITIZER_WEAK_ATTRIBUTE char __memprof_profile_filename[1] = {0};
+
----------------
vitalybuka wrote:
> tejohnson wrote:
> > vitalybuka wrote:
> > > not needed?
> > This is to ensure that the if below at line 182 will fail when the compiler has not set up a strong version of this variable.
> Sorry, I asked if initialization is needed. "={0}" I'd expect it's already zeroes.
You're right. The global should get zero initialized so the init isn't really necessary. I can remove it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89086/new/
https://reviews.llvm.org/D89086
More information about the llvm-commits
mailing list