[PECOFF] Writer: Refactor the chunk class hierarchy.
Before this patch, we had the following class hierarchy. Chunk -> AtomChunk -> SectionChunk -> GenericSectionChunk -> BaseRelocChunk -> HeaderChunk Chunk represented the generic concept of contiguous range in an output file. AtomChunk represented a chunk consists of atoms. That class hierarchy had many issues: 1) BaseRelocChunk does not really consist of atoms, so inheriting from AtomChunk was plainly wrong, and 2) the hierarchy is unecessarily too deep. This patch correct them. The new hierachy is shown below. Chunk -> SectionChunk -> AtomChunk -> BaseRelocChunk -> HeaderChunk In the new hierarchy, AtomChunk represents a chunk consists of atoms. Other types of sections (currently only BaseRelocChunk) should inherit directly from SectionChunk. llvm-svn: 197038
Loading
Please register or sign in to comment