Object/COFF: Define coff_symbol_generic.
authorRui Ueyama <ruiu@google.com>
Tue, 30 Jun 2015 00:03:56 +0000 (00:03 +0000)
committerRui Ueyama <ruiu@google.com>
Tue, 30 Jun 2015 00:03:56 +0000 (00:03 +0000)
commit13b58ec74ade26579f1dfba872564396670e56c0
treec0483898348e29794e230480946a834cc4f2ba5c
parent2edab1ac31e1633eb5f9e07171f72b47fb2b1c8d
Object/COFF: Define coff_symbol_generic.

If you only need Name and Value fields in the COFF symbol,
you don't need to distinguish 32 bit and 64 bit COFF symbols.
These fields start at the same offsets and have the same size.

This data strucutre is one pointer smaller than COFFSymbolRef
thus slightly efficient. I'll use this class in LLD as we create
millions of LLD symbol objects that currently contain COFFSymbolRef.
Shaving off 8 byte (or 4 byte on 32 bit) from that class actually
matters becasue of the number of objects we create in LLD.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241024 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/COFF.h
lib/Object/COFFObjectFile.cpp