[llvm] [llvm-profgen] Loading binary functions from .symtab when DWARF info is incomplete (PR #163654)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 23 14:51:33 PDT 2025


================
@@ -482,6 +483,10 @@ inline uint64_t SymbolRef::getCommonSize() const {
   return getObject()->getCommonSymbolSize(getRawDataRefImpl());
 }
 
+inline uint64_t SymbolRef::getSize() const {
+  return getObject()->getCommonSymbolSizeImpl(getRawDataRefImpl());
----------------
HighW4y2H3ll wrote:

makes sense. let me change it to ELF-specific then. I did something like this:
```c++
// ProfiledBinary::populateSymbolsFromBinary()
uint64_t Size = 0;
if (isa<ELFObjectFileBase>(Symbol.getObject())) {
  ELFSymbolRef ElfSymbol(Symbol);
  Size = ElfSymbol.getSize();
}
```

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


More information about the llvm-commits mailing list