[libcxx-commits] [libcxx] 4b5d59f - [libc++] libcxx/utils: s/preambule/preamble/g. NFC.
Arthur O'Dwyer via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 10 08:38:37 PST 2022
Author: Arthur O'Dwyer
Date: 2022-01-10T11:38:25-05:00
New Revision: 4b5d59ffd073393b898b58c09a2dfd1d20f711e5
URL: https://github.com/llvm/llvm-project/commit/4b5d59ffd073393b898b58c09a2dfd1d20f711e5
DIFF: https://github.com/llvm/llvm-project/commit/4b5d59ffd073393b898b58c09a2dfd1d20f711e5.diff
LOG: [libc++] libcxx/utils: s/preambule/preamble/g. NFC.
Added:
Modified:
libcxx/utils/generate_header_tests.py
Removed:
################################################################################
diff --git a/libcxx/utils/generate_header_tests.py b/libcxx/utils/generate_header_tests.py
index a8a30d3f8a8d1..e9271e64bebff 100755
--- a/libcxx/utils/generate_header_tests.py
+++ b/libcxx/utils/generate_header_tests.py
@@ -113,7 +113,7 @@ def should_keep_header(p, exclusions=None):
def produce_include(relpath, indent_level, post_include=None):
relpath = posixpath.join(*os.path.split(relpath))
- template = "{preambule}#{indentation}include <{include}>{post_include}{postambule}"
+ template = "{preamble}#{indentation}include <{include}>{post_include}{postamble}"
base_indentation = ' '*(indent_width * indent_level)
next_indentation = base_indentation + ' '*(indent_width)
@@ -121,24 +121,24 @@ def produce_include(relpath, indent_level, post_include=None):
markup = header_markup.get(relpath, None)
if markup:
- preambule = '#{indentation}{directive}\n'.format(
+ preamble = '#{indentation}{directive}\n'.format(
directive=markup[0],
indentation=base_indentation,
)
- postambule = '\n#{indentation}endif'.format(
+ postamble = '\n#{indentation}endif'.format(
indentation=base_indentation,
)
indentation = next_indentation
else:
- preambule = ''
- postambule = ''
+ preamble = ''
+ postamble = ''
indentation = base_indentation
return template.format(
include=relpath,
post_include=post_include,
- preambule=preambule,
- postambule=postambule,
+ preamble=preamble,
+ postamble=postamble,
indentation=indentation,
)
@@ -174,10 +174,10 @@ def replace_generated_headers(test_path, test_str):
with open(test_path, 'r') as f:
content = f.read()
- preambule = begin_pattern + '\n// clang-format off\n\n' + warning_note
- postambule = '\n// clang-format on\n\n' + end_pattern
+ preamble = begin_pattern + '\n// clang-format off\n\n' + warning_note
+ postamble = '\n// clang-format on\n\n' + end_pattern
content = generated_part_pattern.sub(
- preambule + test_str + postambule, content)
+ preamble + test_str + postamble, content)
with open(test_path, 'w', newline='\n') as f:
f.write(content)
More information about the libcxx-commits
mailing list