void RawInstrProfReader<IntPtrT>::createSymtab(InstrProfSymtab &Symtab) { Symtab.create(StringRef(NamesStart, NamesSize)); for (const RawInstrProf::ProfileData<IntPtrT> *I = Data; I != DataEnd; ++I) { const IntPtrT FPtr = swap(I->FunctionPointer); if (!FPtr) continue; Symtab.mapAddress(FPtr, I->NameRef); } Symtab.finalizeSymtab(); }
void RawInstrProfReader<IntPtrT>::createSymtab(InstrProfSymtab &Symtab) { for (const RawInstrProf::ProfileData<IntPtrT> *I = Data; I != DataEnd; ++I) { StringRef FunctionName(getName(I->NamePtr), swap(I->NameSize)); Symtab.addFuncName(FunctionName); const IntPtrT FPtr = swap(I->FunctionPointer); if (!FPtr) continue; Symtab.mapAddress(FPtr, IndexedInstrProf::ComputeHash(FunctionName)); } Symtab.finalizeSymtab(); }