[PATCH] D110839: [LNT] Refactoring of cPerf

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 6 03:50:11 PDT 2021


thopre 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'))
----------------
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.


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