diff --git a/bolt/lib/Passes/BinaryPasses.cpp b/bolt/lib/Passes/BinaryPasses.cpp --- a/bolt/lib/Passes/BinaryPasses.cpp +++ b/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 ReorderBlocks; cl::opt ReorderBlocks( "reorder-blocks", cl::desc("change layout of basic blocks in a function"), cl::init(bolt::ReorderBasicBlocks::LT_NONE),