================ @@ -479,15 +479,37 @@ Error InstrProfSymtab::create(Module &M, bool InLTO) { continue; Types.clear(); G.getMetadata(LLVMContext::MD_type, Types); - if (!Types.empty()) { - MD5VTableMap.emplace_back(G.getGUID(), &G); - } + if (Types.empty()) + continue; + if (Error E = addVTableWithName( + G, getIRPGOObjectName(G, InLTO, /* PGONameMetadata */ nullptr))) + return E; } Sorted = false; finalizeSymtab(); return Error::success(); } +Error InstrProfSymtab::addVTableWithName(GlobalVariable &VTable, + StringRef VTablePGOName) { + + auto mapName = [&](StringRef Name) -> Error { + if (Error E = addVTableName(Name)) ---------------- minglotus-6 wrote:
This is [defined](https://github.com/llvm/llvm-project/pull/66825/files#diff-da37bd91946b34b8d50ced64d8e9f79455b61e8d29b304d0ae9fe3148bc63333R556-R564) in InstrProf.h in the PR to instrument vtables and [used](https://github.com/llvm/llvm-project/pull/66825/files#diff-da37bd91946b34b8d50ced64d8e9f79455b61e8d29b304d0ae9fe3148bc63333R642-R645) to add vtable strings from raw profiles (`InstrProfSymtab::create` called [here](https://github.com/llvm/llvm-project/pull/66825/files#diff-b196b796c5a396c7cdf93b347fe47e2b29b72d0b7dd0e2b88abb964d376ee50eR544-R545)) The diff is not shown in this PR, but I got a [link](https://github.com/llvm/llvm-project/pull/81051/files#diff-da37bd91946b34b8d50ced64d8e9f79455b61e8d29b304d0ae9fe3148bc63333L579-L587) pointing to it. https://github.com/llvm/llvm-project/pull/81051 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits