[PATCH] D127612: [BOLT][NFC] Forward declare ReorderBlocks for MSVC19

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 13 10:27:22 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGa2c4d6d3322c: [BOLT][NFC] Forward declare ReorderBlocks for MSVC19 (authored by Amir).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127612/new/

https://reviews.llvm.org/D127612

Files:
  bolt/lib/Passes/BinaryPasses.cpp


Index: bolt/lib/Passes/BinaryPasses.cpp
===================================================================
--- bolt/lib/Passes/BinaryPasses.cpp
+++ bolt/lib/Passes/BinaryPasses.cpp
@@ -147,6 +147,9 @@
                     cl::desc("dump CFG of functions with unknown control flow"),
                     cl::cat(BoltCategory), cl::ReallyHidden);
 
+// Please MSVC19 with a forward declaration: otherwise it reports an error about
+// an undeclared variable inside a callback.
+extern cl::opt<bolt::ReorderBasicBlocks::LayoutType> ReorderBlocks;
 cl::opt<bolt::ReorderBasicBlocks::LayoutType> ReorderBlocks(
     "reorder-blocks", cl::desc("change layout of basic blocks in a function"),
     cl::init(bolt::ReorderBasicBlocks::LT_NONE),


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127612.436465.patch
Type: text/x-patch
Size: 738 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220613/137b9a00/attachment.bin>


More information about the llvm-commits mailing list