[PATCH] D127612: [BOLT][NFC] Forward declare ReorderBlocks for MSVC19
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 12 23:07:48 PDT 2022
Amir created this revision.
Herald added subscribers: jsji, ayermolo, pengfei.
Herald added a reviewer: rafauler.
Herald added a reviewer: maksfb.
Herald added a project: All.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.
Fix bolt-x86_64-wine-msvc builder:
https://lab.llvm.org/buildbot/#/builders/222/builds/1154
Repository:
rG LLVM Github Monorepo
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.436279.patch
Type: text/x-patch
Size: 738 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220613/a029a083/attachment.bin>
More information about the llvm-commits
mailing list