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

David Spickett via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 20 01:59:32 PDT 2023


================
@@ -198,13 +199,20 @@ static int PrintSupportedExtensions(std::string TargetStr) {
   std::unique_ptr<llvm::TargetMachine> TheTargetMachine(
       TheTarget->createTargetMachine(TargetStr, "", "", Options, std::nullopt));
   const llvm::Triple &MachineTriple = TheTargetMachine->getTargetTriple();
+  const llvm::MCSubtargetInfo *MCInfo = TheTargetMachine->getMCSubtargetInfo();
+  const llvm::ArrayRef<llvm::SubtargetFeatureKV> Features =
+    MCInfo->getAllProcessorFeatures();
+
+  llvm::StringMap<llvm::StringRef> llvmDescMap;
----------------
DavidSpickett wrote:

I don't see the need for the `llvm` prefix here, I guess you're saying that these come from llvm as in the backend, which is true but not really useful information here.

`DescMap` would be fine instead.

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


More information about the cfe-commits mailing list