aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-10-09 07:49:28 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-10-09 07:49:28 +0000
commitdd9cff2ede7793bb2ffefac055f720443e67a1a9 (patch)
treecca33bf4a6a0d781fc8d30e411f04921ae50eb02 /clang/lib/CodeGen/CodeGenModule.cpp
parentedba30c43476b097a5d1a489acc1ea99d80536ed (diff)
downloadllvm-dd9cff2ede7793bb2ffefac055f720443e67a1a9.zip
llvm-dd9cff2ede7793bb2ffefac055f720443e67a1a9.tar.gz
llvm-dd9cff2ede7793bb2ffefac055f720443e67a1a9.tar.bz2
Object, COFF: Cap the section contents to min(VirtualSize, SizeOfRawData)
It is not useful to return the data beyond VirtualSize it's less than SizeOfRawData. An implementation detail of COFF requires the section size to be rounded up to a multiple of FileAlignment; this means that SizeOfRawData is not representative of how large the section is. Instead, we should cap it to VirtualSize when this occurs as it represents the true size of the section. Note that this is only relevant in executable files because this rounding doesn't occur in object files (and VirtualSize is always zero). llvm-svn: 219388
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions