[BOLT][NFC] Forward declare ReorderBlocks for MSVC19

Fix bolt-x86_64-wine-msvc builder:
https://lab.llvm.org/buildbot/#/builders/222/builds/1154

Reviewed By: maksfb

Differential Revision: https://reviews.llvm.org/D127612
This commit is contained in:
Amir Ayupov 2022-06-12 23:06:29 -07:00
parent 9d99870590
commit a2c4d6d332
1 changed files with 3 additions and 0 deletions

View File

@ -147,6 +147,9 @@ static cl::opt<bool>
cl::desc("dump CFG of functions with unknown control flow"), cl::desc("dump CFG of functions with unknown control flow"),
cl::cat(BoltCategory), cl::ReallyHidden); 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( cl::opt<bolt::ReorderBasicBlocks::LayoutType> ReorderBlocks(
"reorder-blocks", cl::desc("change layout of basic blocks in a function"), "reorder-blocks", cl::desc("change layout of basic blocks in a function"),
cl::init(bolt::ReorderBasicBlocks::LT_NONE), cl::init(bolt::ReorderBasicBlocks::LT_NONE),