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

David Spickett via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 20 07:55:00 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();
----------------
DavidSpickett wrote:

It's possible `TheTargetMachine` is already null in this situation, and this is best fixed outside of this change.

I'll check that.

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


More information about the cfe-commits mailing list