about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorThe Miri Conjob Bot <miri@cron.bot>2023-08-29 05:43:09 +0000
committerThe Miri Conjob Bot <miri@cron.bot>2023-08-29 05:43:09 +0000
commit650294cdc240de273af88d4165e7a47b5357811e (patch)
treedd01bdce3994dd6fcbff03e39a13e2294541cb39 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parentca7acd48e6f9878b023d1d3b39e46c04bef14a7e (diff)
parentf3284dc3ad9254236d296daa1285dd273b492b01 (diff)
downloadrust-650294cdc240de273af88d4165e7a47b5357811e.tar.gz
rust-650294cdc240de273af88d4165e7a47b5357811e.zip
Merge from rustc
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
index b566ea496de..6af5c24c458 100644
--- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
@@ -321,13 +321,13 @@ extern "C" void LLVMRustPrintTargetCPUs(LLVMTargetMachineRef TM,
                                         PrintBackendInfo Print,
                                         void* Out) {
   const TargetMachine *Target = unwrap(TM);
-  const MCSubtargetInfo *MCInfo = Target->getMCSubtargetInfo();
   const Triple::ArchType HostArch = Triple(sys::getDefaultTargetTriple()).getArch();
   const Triple::ArchType TargetArch = Target->getTargetTriple().getArch();
 
   std::ostringstream Buf;
 
 #if LLVM_VERSION_GE(17, 0)
+  const MCSubtargetInfo *MCInfo = Target->getMCSubtargetInfo();
   const ArrayRef<SubtargetSubTypeKV> CPUTable = MCInfo->getAllProcessorDescriptions();
 #else
   Buf << "Full target CPU help is not supported by this LLVM version.\n\n";