[clang] [MSP430][Clang] Update list of MCUs (PR #91258)
via cfe-commits
cfe-commits at lists.llvm.org
Tue May 7 00:15:58 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r d0be944aa51194145cd15c987af67489f735059d...6d2759a81ff7c3e88fd2098c1e49d41e2426fa24 clang/include/clang/Basic/Target/MSP430/gen-msp430-def.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- gen-msp430-def.py 2024-05-07 07:12:17.000000 +0000
+++ gen-msp430-def.py 2024-05-07 07:15:29.741381 +0000
@@ -48,10 +48,11 @@
#undef MSP430_MCU
#undef MSP430_MCU_FEAT
"""
+
def csv2def(csv_path, def_path):
"""
Parse the devices.csv file at the given path, generate the definitions and
write them to the given path.
@@ -94,25 +95,25 @@
with open(def_path, "w") as def_file:
def_file.write(PREFIX.format(version))
for mcu in mcus_multiplier_sw:
- def_file.write(f"MSP430_MCU(\"{mcu}\")\n")
+ def_file.write(f'MSP430_MCU("{mcu}")\n')
def_file.write("\n// With 16-bit hardware multiplier\n")
for mcu in mcus_multiplier_hw_16:
- def_file.write(f"MSP430_MCU_FEAT(\"{mcu}\", \"16bit\")\n")
+ def_file.write(f'MSP430_MCU_FEAT("{mcu}", "16bit")\n')
def_file.write("\n// With 32-bit hardware multiplier\n")
for mcu in mcus_multiplier_hw_32:
- def_file.write(f"MSP430_MCU_FEAT(\"{mcu}\", \"32bit\")\n")
+ def_file.write(f'MSP430_MCU_FEAT("{mcu}", "32bit")\n')
def_file.write(SUFFIX)
-if __name__ == '__main__':
+if __name__ == "__main__":
if len(sys.argv) != 3:
sys.exit(f"Usage: {sys.argv[0]} <CSV_FILE> <DEF_FILE>")
csv2def(sys.argv[1], sys.argv[2])
``````````
</details>
https://github.com/llvm/llvm-project/pull/91258
More information about the cfe-commits
mailing list