[clang] [clang] Enable descriptions for --print-supported-extensions (PR #66715)

David Spickett via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 20 02:46:14 PDT 2023


================
@@ -22,7 +23,8 @@ struct RISCVExtensionInfo {
   unsigned MinorVersion;
 };
 
-void riscvExtensionsHelp();
+void getAllExtensions(StringMap<RISCVExtensionInfo> &Features);
----------------
DavidSpickett wrote:

Ok but I'll refer you to MaskRay's comment there:
```
We need justification to have this API, ideally tested by an in-tree target, otherwise this is prone to be removed by another contributor as an unused function.
```

There is no need to add a dummy description to every extension just for the test. Just pick one that already exists. Then there's no in tree use for this function and MaskRay's logic applies again.

The fact that you were able to add such a method without much trouble also tells us that carrying it in tree, unused, isn't going to save anyone much effort when it finally is needed.

https://github.com/llvm/llvm-project/pull/66715


More information about the cfe-commits mailing list