[llvm] [BOLT] [Profile] Fix type mismatch error (PR #73016)

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 21 12:58:54 PST 2023


================
@@ -354,7 +357,15 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) {
       matchProfileToFunction(YamlBF, Function);
   }
 
-  for (auto &[CommonName, LTOProfiles]: LTOCommonNameMap) {
+  using BinaryFunctionProfileVector =
+      std::vector<llvm::yaml::bolt::BinaryFunctionProfile *,
+                  std::allocator<llvm::yaml::bolt::BinaryFunctionProfile *>>;
+
+  llvm::StringMap<BinaryFunctionProfileVector> LTOCommonNameMap;
----------------
maksfb wrote:

This definition of `LTOCommonNameMap` will override the class member.

https://github.com/llvm/llvm-project/pull/73016


More information about the llvm-commits mailing list