[PECOFF] Remove COFFDefinedFileAtom::originalOffset().
authorRui Ueyama <ruiu@google.com>
Fri, 2 Aug 2013 22:27:15 +0000 (22:27 +0000)
committerRui Ueyama <ruiu@google.com>
Fri, 2 Aug 2013 22:27:15 +0000 (22:27 +0000)
commitf6e90afbf4bfee9894fed71656969bdee410b1d4
tree189da52aa7885bc47e2b148b8ca441ffb852235e
parent3d27dad72851db4f7353387dbc46948dae476b97
[PECOFF] Remove COFFDefinedFileAtom::originalOffset().

The aim of this patch is to reduce the dependency from COFFDefinedAtom
to COFF structs defined in llvm/Object/COFF.h. Currently many attributes
of the atom are computed in the atom. That provide a simple interface but
does not work well in some cases.

There are some cases that the same type atom is created from different
parts of a COFF file. One example is the BSS atom, which can be created
from the defined symbol in the .bss section or from the undefined symbol.
Computing attributes from different sources in the atom complicates the
code. We should compute it outside the atom.

In the next patch, I'll move more code from Atoms.h to ReaderCOFF.cpp.

llvm-svn: 187681
lld/lib/ReaderWriter/PECOFF/Atoms.h
lld/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp