LLVM: lib/DebugInfo/MSF/MSFCommon.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

13#include

14#include

15

16using namespace llvm;

18

20

23 "MSF magic header doesn't match");

24

27 "Unsupported block size.");

28

29

32 "Directory size is not multiple of 4.");

33

34

35

38

39

40

41

44 "Too many directory blocks.");

45

48 "Block 0 is reserved");

49

52 "Block map address is invalid.");

53

57 "The free block map isn't at block 1 or block 2.");

58

60}

61

63 bool IncludeUnusedFpmData,

64 bool AltFpm) {

68

70

71 for (uint32_t I = 0; I < NumFpmIntervals; ++I) {

74 }

75

76 if (IncludeUnusedFpmData)

78 else

80

81 return FL;

82}

Lightweight error class with error context and mandatory checking.

static ErrorSuccess success()

Create a success value.

Describes the layout of a stream in an MSF layout.

std::vector< support::ulittle32_t > Blocks

LLVM_ABI Error validateSuperBlock(const SuperBlock &SB)

Definition MSFCommon.cpp:19

uint32_t getFpmIntervalLength(const MSFLayout &L)

bool isValidBlockSize(uint32_t Size)

LLVM_ABI MSFStreamLayout getFpmStreamLayout(const MSFLayout &Msf, bool IncludeUnusedFpmData=false, bool AltFpm=false)

Determine the layout of the FPM stream, given the MSF layout.

Definition MSFCommon.cpp:62

uint64_t bytesToBlocks(uint64_t NumBytes, uint64_t BlockSize)

uint32_t getNumFpmIntervals(uint32_t BlockSize, uint32_t NumBlocks, bool IncludeUnusedFpmData, int FpmNumber)

Given an MSF with the specified block size and number of blocks, determine how many pieces the specif...

static const char Magic[]

detail::packed_endian_specific_integral< uint32_t, llvm::endianness::little, unaligned > ulittle32_t

This is an optimization pass for GlobalISel generic memory operations.

Error make_error(ArgTs &&... Args)

Make a Error instance representing failure using the given error info type.

constexpr T divideCeil(U Numerator, V Denominator)

Returns the integer ceil(Numerator / Denominator).

uint32_t alternateFpmBlock() const

uint32_t mainFpmBlock() const

support::ulittle32_t NumBlocks

support::ulittle32_t BlockSize

char MagicBytes[sizeof(Magic)]

support::ulittle32_t NumDirectoryBytes

support::ulittle32_t BlockMapAddr

support::ulittle32_t FreeBlockMapBlock