Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/DebugInfo/MSF/MSFBuilder.cpp
Show First 20 Lines • Show All 324 Lines • ▼ Show 20 Lines | while (BI < Layout.SB->NumBlocks) { | ||||
uint8_t ThisByte = 0; | uint8_t ThisByte = 0; | ||||
for (uint32_t I = 0; I < 8; ++I) { | for (uint32_t I = 0; I < 8; ++I) { | ||||
bool IsFree = | bool IsFree = | ||||
(BI < Layout.SB->NumBlocks) ? Layout.FreePageMap.test(BI) : true; | (BI < Layout.SB->NumBlocks) ? Layout.FreePageMap.test(BI) : true; | ||||
uint8_t Mask = uint8_t(IsFree) << I; | uint8_t Mask = uint8_t(IsFree) << I; | ||||
ThisByte |= Mask; | ThisByte |= Mask; | ||||
++BI; | ++BI; | ||||
} | } | ||||
cantFail(FpmWriter.writeObject(ThisByte)); | llvm_cantFail(FpmWriter.writeObject(ThisByte)); | ||||
} | } | ||||
assert(FpmWriter.bytesRemaining() == 0); | assert(FpmWriter.bytesRemaining() == 0); | ||||
} | } | ||||
Expected<FileBufferByteStream> MSFBuilder::commit(StringRef Path, | Expected<FileBufferByteStream> MSFBuilder::commit(StringRef Path, | ||||
MSFLayout &Layout) { | MSFLayout &Layout) { | ||||
Expected<MSFLayout> L = generateLayout(); | Expected<MSFLayout> L = generateLayout(); | ||||
if (!L) | if (!L) | ||||
Show All 40 Lines |