================
@@ -560,6 +602,28 @@ Error InstrProfSymtab::addFuncWithName(Function &F, 
StringRef PGOFuncName) {
   return Error::success();
 }
 
+uint64_t InstrProfSymtab::getVTableHashFromAddress(uint64_t Address) {
+  finalizeSymtab();
----------------
snehasish wrote:

Summarizing offline discussion - if we chose to refactor it makes more sense to 
add appropriate factory methods of cases `addElement` are called. This seems to 
be the intent of the original implementation with a few different `create` 
methods. Then we can make `addElement` private. This will enforce what we want 
through a better API rather than runtime checks. 

For this patch, we can add a comment and look into the refactor later.

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

Reply via email to