[PATCH] D20724: [pdb] Apply zero-copy algorithms to symbol stream iteration

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri May 27 08:13:48 PDT 2016


ruiu added a comment.

I mean it seems you can define `static uint32_t extract(const StreamInterface &Stream, CVRecord &Item)` for CVRecord class and template VarStreamArray with CVRecord (instead of the traits class).

So you are currently doing this.

  VarStreamArrayIterator(const VarStreamArray<TraitsType> &Array)
      : Array(&Array), IterRef(Array.Stream) {
    ThisLen = TraitsType::extract(IterRef, ThisValue);
  }

But looks like it can be written like this if you remove the template class and directly use CVRecord class.

  VarStreamArrayIterator(const VarStreamArray<T> &Array)
      : Array(&Array), IterRef(Array.Stream) {
    ThisLen = T::extract(IterRef, ThisValue);
  }

no?


http://reviews.llvm.org/D20724





More information about the llvm-commits mailing list