[PATCH] D110839: [LNT] Refactoring of cPerf

Sergey Yakushkin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 7 02:36:06 PDT 2021


yakush added inline comments.


================
Comment at: lnt/testing/profile/profile.py:34-36
+                                  binaryCacheRoot = os.getenv('LNT_BINARY_CACHE_ROOT', ''),
+                                  nm = os.getenv('CMAKE_NM', 'nm'),
+                                  objdump = os.getenv('CMAKE_OBJDUMP', 'objdump'))
----------------
thopre wrote:
> slydiman wrote:
> > thopre wrote:
> > > This will set the parameters to None (and thus override the default values of the parameter) when the environment variables are not set. I don't think this is what you meant.
> > ```
> > import os
> > 
> > def prn(x):
> >     print(x)
> > 
> > prn(x = os.getenv('MISSING_VAR', 'abc'))
> > ```
> > Output: abc
> > What am I missing?
> Nothing, **I** missed something: the second parameter of getenv.
this patch was actually tested in production setup, so it works at least on some platforms.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110839



More information about the llvm-commits mailing list