Previously, write_cmake_config.py would raise an error while printing
the error, because leftovers in "'\n'.join(leftovers)" is a tuple.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 30606 Build 30605: arc lint + arc unit
Event Timeline
llvm/trunk/utils/gn/build/write_cmake_config.py | ||
---|---|---|
102 ↗ | (On Diff #195512) | 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. |
llvm/trunk/utils/gn/build/write_cmake_config.py | ||
---|---|---|
102 ↗ | (On Diff #195512) | From IRC, the way to hit this is by invoking a variable whose substitution is a variable reference: llvm/utils/gn/build/write_cmake_config.py -o foo llvm/include/llvm/Config/AsmParsers.def.in 'LLVM_ENUM_ASM_PARSERS=@LLVM_ENUM_ASM_PARSERS@' |