[MachOYAML] Improve section offset misalignment error message
authorMichael Buch <michaelbuch12@gmail.com>
Thu, 15 Dec 2022 17:57:53 +0000 (17:57 +0000)
committerMichael Buch <michaelbuch12@gmail.com>
Thu, 15 Dec 2022 22:46:43 +0000 (22:46 +0000)
commit3db65daa4497beea217c2eb9929ed1f49ba8d40e
tree6b7e356cfefb66459bc9ebc7812c7f9b1a0a3084
parentc46587bb83232bd639c1e6ba6bce2f290941675d
[MachOYAML] Improve section offset misalignment error message

Before:
```
wrote too much data somewhere, section offsets don't line up
```

After:
```
wrote too much data somewhere, section offsets in section __debug_str for segment __DWARF don't line up: [cursor=0x581], [fileStart=0x0], [sectionOffset=0x579]
```

Differential Revision: https://reviews.llvm.org/D140116
llvm/lib/ObjectYAML/MachOEmitter.cpp
llvm/test/ObjectYAML/MachO/sections.yaml