Exemplo n.º 1
0
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();
}
Exemplo n.º 2
0
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();
}