diff options
author | 2020-12-01 14:35:21 -0500 | |
---|---|---|
committer | 2020-12-01 14:35:27 -0500 | |
commit | cacb1a9f930e35371c885cb572823626fc90a0ee (patch) | |
tree | eb3436792c3c272a0327026f80c7d6e00505d55a | |
parent | [DAGCombiner][NFC] Replace duplicate implementation flipBoolean with DAG.getL... (diff) | |
download | llvm-project-cacb1a9f930e35371c885cb572823626fc90a0ee.tar.gz llvm-project-cacb1a9f930e35371c885cb572823626fc90a0ee.tar.bz2 llvm-project-cacb1a9f930e35371c885cb572823626fc90a0ee.zip |
[gn build] sync script: try to make sync script even clearer
Turns out startswith() takes an optional start parameter :)
No behavior change.
-rwxr-xr-x | llvm/utils/gn/build/sync_source_lists_from_cmake.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/gn/build/sync_source_lists_from_cmake.py b/llvm/utils/gn/build/sync_source_lists_from_cmake.py index 912cf37c7e54..1906c2a9234f 100755 --- a/llvm/utils/gn/build/sync_source_lists_from_cmake.py +++ b/llvm/utils/gn/build/sync_source_lists_from_cmake.py @@ -29,7 +29,7 @@ def patch_gn_file(gn_file, add, remove): if add: srcs_tok = 'sources = [' tokloc = gn_contents.find(srcs_tok) - while gn_contents[tokloc:].startswith('sources = []'): + while gn_contents.startswith('sources = []', tokloc): tokloc = gn_contents.find(srcs_tok, tokloc + 1) if tokloc == -1: raise ValueError(gn_file + ': No source list') if gn_contents.find(srcs_tok, tokloc + 1) != -1: |