================
@@ -1628,6 +1664,17 @@ TEST(SymtabTest, instr_prof_symtab_module_test) {
     EXPECT_EQ(StringRef(PGOName), PGOFuncName);
     EXPECT_THAT(PGOFuncName.str(), EndsWith(Funcs[I].str()));
   }
+
+  StringRef VTables[] = {"ExternalGV", "PrivateGV"};
+  for (size_t I = 0; I < std::size(VTables); I++) {
+    GlobalVariable *GV =
+        M->getGlobalVariable(VTables[I], /* AllowInternal=*/true);
+
+    std::string IRPGOName = getIRPGOObjectName(*GV);
+    EXPECT_EQ(IRPGOName, ProfSymtab.getFuncOrVarName(
+                             IndexedInstrProf::ComputeHash(IRPGOName)));
+    EXPECT_EQ(VTables[I], getParsedIRPGOFuncName(IRPGOName).second);
----------------
minglotus-6 wrote:

An NFC patch (https://github.com/llvm/llvm-project/pull/81054) was created to 
generalize the function name.

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

Reply via email to