[llvm] [BOLT] [Profile] Fix type mismatch error (PR #73016)
Ho Cheung via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 21 19:04:12 PST 2023
https://github.com/gz83 updated https://github.com/llvm/llvm-project/pull/73016
>From bce8d2eed1ec74ff4935f1ed66c643327993624f Mon Sep 17 00:00:00 2001
From: Ho Cheung <uioptt24 at gmail.com>
Date: Wed, 22 Nov 2023 00:45:57 +0800
Subject: [PATCH] [BOLT] [Profile] Fix type mismatch error
Fix build issue on Windows.
issue:https://github.com/llvm/llvm-project/issues/73006
---
bolt/lib/Profile/YAMLProfileReader.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bolt/lib/Profile/YAMLProfileReader.cpp b/bolt/lib/Profile/YAMLProfileReader.cpp
index 06cad69754816fd..079cb352d36e77c 100644
--- a/bolt/lib/Profile/YAMLProfileReader.cpp
+++ b/bolt/lib/Profile/YAMLProfileReader.cpp
@@ -31,7 +31,7 @@ static llvm::cl::opt<bool>
llvm::cl::opt<bool> ProfileUseDFS("profile-use-dfs",
cl::desc("use DFS order for YAML profile"),
cl::Hidden, cl::cat(BoltOptCategory));
-}
+} // namespace opts
namespace llvm {
namespace bolt {
@@ -354,7 +354,7 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
matchProfileToFunction(YamlBF, Function);
}
- for (auto &[CommonName, LTOProfiles]: LTOCommonNameMap) {
+ for (const auto &[CommonName, LTOProfiles] : LTOCommonNameMap) {
if (!LTOCommonNameFunctionMap.contains(CommonName))
continue;
std::unordered_set<BinaryFunction *> &Functions =
More information about the llvm-commits
mailing list