[PATCH] D106206: Remove the NotUnderValgrind caching flag

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 20 15:20:13 PDT 2021


dexonsmith added inline comments.


================
Comment at: llvm/lib/Support/Valgrind.cpp:23
 
-static bool InitNotUnderValgrind() {
-  return !RUNNING_ON_VALGRIND;
-}
-
-// This bool is negated from what we'd expect because code may run before it
-// gets initialized.  If that happens, it will appear to be 0 (false), and we
-// want that to cause the rest of the code in this file to run the
-// Valgrind-provided macros.
-static const bool NotUnderValgrind = InitNotUnderValgrind();
-
 bool llvm::sys::RunningOnValgrind() {
   return RUNNING_ON_VALGRIND;
----------------
mehdi_amini wrote:
> dexonsmith wrote:
> > Probably clang-format will want to delete some newlines here.
> I have a clang-format running automatically on `arc diff` ;)
> 
> I think the lines appear empty here because of the removal on the left hand side, but if you look at the line numbers there aren't any blank line I think?
> 
Aha, yeah, that explains it :).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106206/new/

https://reviews.llvm.org/D106206



More information about the llvm-commits mailing list