Fix -Asserts warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99499 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2010-03-25 07:10:05 +00:00
parent f104f5b17a
commit b026d64bf2

View File

@ -276,11 +276,10 @@ public:
const MCSectionData &SD, uint64_t FileOffset,
uint64_t RelocationsStart, unsigned NumRelocations) {
uint64_t SectionSize = Layout.getSectionSize(&SD);
uint64_t SectionFileSize = Layout.getSectionFileSize(&SD);
// The offset is unused for virtual sections.
if (Asm.getBackend().isVirtualSection(SD.getSection())) {
assert(SectionFileSize == 0 && "Invalid file size!");
assert(Layout.getSectionFileSize(&SD) == 0 && "Invalid file size!");
FileOffset = 0;
}