[PATCH] D60766: Fixed error message printing in write_cmake_config.py

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 18 07:30:13 PDT 2019


thakis added inline comments.


================
Comment at: llvm/trunk/utils/gn/build/write_cmake_config.py:102
+            '\n'.join([x[0] or x[1] for x in leftovers]),
+            file=sys.stderr)
         return 1
----------------
Huh, did you actually hit this? I always thought this branch is effectively dead code after a refactoring: `in_lien = var_re.sub(repl, in_line)` should call repl() on all matches on each line, and if some pattern doesn't have a value in the `values` dict, then `return values[key]` will throw. I always wanted to make that set a bool instead and then print this error based on that bool, and remove the findall call down here (since I thought I shouldn't happen), but didn't get around to it yet.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D60766





More information about the llvm-commits mailing list