Fix bug where WinCOFFObjectWriter would assume starting from an empty output.
authorManuel Klimek <klimek@google.com>
Wed, 18 Nov 2015 15:24:17 +0000 (15:24 +0000)
committerManuel Klimek <klimek@google.com>
Wed, 18 Nov 2015 15:24:17 +0000 (15:24 +0000)
commitfc0981ecbc83809ca8f2157fb7408150f63fa978
treede58048da365c02bf8402d3bb322d0be84de2c9e
parentc68dcdb413079d92118839dbd835e125293f411a
Fix bug where WinCOFFObjectWriter would assume starting from an empty output.

Starting on an input stream that is not at offset 0 would trigger the
assert in WinCOFFObjectWriter.cpp:1065:

  assert(getStream().tell() <= (*i)->Header.PointerToRawData &&
               "Section::PointerToRawData is insane!");

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