[llvm] [LLVM] Automatically strip `-fno-lifetime-dse` from compile_commands.json (PR #124623)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 27 12:57:06 PST 2025
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 7b1becd940cb93f8b63c9872e1af7431dea353d1...06c18fcc960329d79038a555dbb039c3141cc29d llvm/utils/merge-json.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- merge-json.py 2025-01-27 20:48:00.000000 +0000
+++ merge-json.py 2025-01-27 20:56:35.402124 +0000
@@ -38,11 +38,11 @@
# LLVM passes this argument by default but it is not supported by clang,
# causing annoying errors in the generated compile_commands.json file.
# Remove it here before we deduplicate the entries.
for entry in merged_data:
if isinstance(entry, dict) and "command" in entry:
- entry["command"] = entry["command"].replace("-fno-lifetime-dse ", "");
+ entry["command"] = entry["command"].replace("-fno-lifetime-dse ", "")
# Deduplicate by converting each entry to a tuple of sorted key-value pairs
unique_data = list({json.dumps(entry, sort_keys=True) for entry in merged_data})
unique_data = [json.loads(entry) for entry in unique_data]
``````````
</details>
https://github.com/llvm/llvm-project/pull/124623
More information about the llvm-commits
mailing list