================ @@ -459,6 +472,16 @@ Error InstrProfSymtab::create(Module &M, bool InLTO) { if (Error E = addFuncWithName(F, getPGOFuncName(F, InLTO))) return E; } + + SmallVector<MDNode *, 2> Types; + for (GlobalVariable &G : M.globals()) { + if (!G.hasName()) + continue; + Types.clear(); + G.getMetadata(LLVMContext::MD_type, Types); + if (!Types.empty()) ---------------- minglotus-6 wrote:
yes, and this is more consistent with vtable detection in InstrProfiling.cpp. Done. https://github.com/llvm/llvm-project/pull/66825 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits