Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/tools/llvm-pdbutil/LinePrinter.cpp
Show First 20 Lines • Show All 248 Lines • ▼ Show 20 Lines | void LinePrinter::formatMsfStreamBlocks( | ||||
uint32_t L = StreamLayout.Length; | uint32_t L = StreamLayout.Length; | ||||
while (L > 0) { | while (L > 0) { | ||||
NewLine(); | NewLine(); | ||||
assert(!Blocks.empty()); | assert(!Blocks.empty()); | ||||
OS << formatv("Block {0} (\n", uint32_t(Blocks.front())); | OS << formatv("Block {0} (\n", uint32_t(Blocks.front())); | ||||
uint32_t UsedBytes = std::min(L, File.getBlockSize()); | uint32_t UsedBytes = std::min(L, File.getBlockSize()); | ||||
ArrayRef<uint8_t> BlockData = | ArrayRef<uint8_t> BlockData = | ||||
cantFail(File.getBlockData(Blocks.front(), File.getBlockSize())); | llvm_cantFail(File.getBlockData(Blocks.front(), File.getBlockSize())); | ||||
uint64_t BaseOffset = Blocks.front(); | uint64_t BaseOffset = Blocks.front(); | ||||
BaseOffset *= File.getBlockSize(); | BaseOffset *= File.getBlockSize(); | ||||
OS << format_bytes_with_ascii(BlockData, BaseOffset, 32, 4, | OS << format_bytes_with_ascii(BlockData, BaseOffset, 32, 4, | ||||
CurrentIndent + IndentSpaces, true); | CurrentIndent + IndentSpaces, true); | ||||
NewLine(); | NewLine(); | ||||
OS << ")"; | OS << ")"; | ||||
NewLine(); | NewLine(); | ||||
L -= UsedBytes; | L -= UsedBytes; | ||||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |