MC: Simplify handling of temporary symbols in COFF writer.
authorPeter Collingbourne <peter@pcc.me.uk>
Thu, 26 Nov 2015 23:29:27 +0000 (23:29 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Thu, 26 Nov 2015 23:29:27 +0000 (23:29 +0000)
commit41984d3288cfbc1ad14510ac3a87f0f398b551da
tree1af4ae43646f1621597f2fef23d9ef5fd706bee4
parentd87d4991ce23d1e6e300b054fbea3bedb6cf8f4b
MC: Simplify handling of temporary symbols in COFF writer.

The COFF object writer was previously adding unnecessary symbols to its
temporary data structures and cleaning them up later. This made the code
harder to understand and caused a bug (aliases classed as temporary symbols
would cause an assertion failure). A much simpler way of handling such
symbols is to ask the layout for their section-relative position when needed.

Tested with a bootstrap on Windows and by building Chrome.

Differential Revision: http://reviews.llvm.org/D14975

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254183 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/WinCOFFObjectWriter.cpp
test/MC/COFF/temporary-alias.s [new file with mode: 0644]