These are all inspired by existing test coverage we have in an internal testsuite.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
It feels like common-mixed1.ll and common-mixed2.ll are very similar and can be merged?
lld/test/ELF/lto/bitcode-wrapper.ll | ||
---|---|---|
51 | I'd comment fields here. They are: | |
lld/test/ELF/lto/common-mixed2.ll | ||
7 | Perhaps, use split-file or just echo rather than adding a new tiny input? |
lld/test/ELF/lto/Inputs/common-mixed2.s | ||
---|---|---|
1 | This can be inlined into common-mixed2.ll |
I'll see if I can merge common-mixed1.ll and common-mixed2.ll and inline the input files. That should allow me to avoid renaming common4.ll too.
lld/test/ELF/lto/resolution.ll | ||
---|---|---|
15 | This test is failing for reasons I've yet to discover. I thought it passed previously, but it's possible it didn't. Currently, it fails because both versions of b are present in the contents of .data, which clearly isn't correct (only one b appears in the symbol table). |
Reworked resolution.ll and common.ll, fixing the former, and inlining the input files. Also undid the test renaming and made the wrap_bitcode.py script python3 compatible.
You need to update the patch description which still mentions "common-mixed1.ll".
The rest looks fine to me.
lld/test/ELF/lto/bitcode-wrapper.ll | ||
---|---|---|
28 | aside: we probably want to lowercase this message. |
lld/test/ELF/lto/bitcode-wrapper.ll | ||
---|---|---|
28 | I took a quick look, and this is just one of several error messages within the BitcodeReader and BitcodeAnalyzer files, and most of them use upper-case, so that would probably want to be part of a much wider change. Think we'd need to discuss the preferred style of the library with whoever owns/maintains it before doing that. |
lld/test/ELF/lto/bitcode-wrapper.ll | ||
---|---|---|
28 |
perhaps we could just lower case all error messages on the lld side. |
lld/test/ELF/lto/bitcode-wrapper.ll | ||
---|---|---|
28 | I thought about that, but that would risk us occasionally converting strings to lower-case that shouldn't be (e.g. file paths, names, accronyms like ELF or DWARF etc). |
lld/test/ELF/lto/bitcode-wrapper.ll | ||
---|---|---|
28 | I meant to lower case just the first character. Perhaps it is a low risk here. Though probably |
LGTM.
lld/test/ELF/lto/bitcode-wrapper.ll | ||
---|---|---|
28 | I'd prefer not transforming the error messages. If people search for "Invalid bitcode wrapper header", they can find occurrences in llvm/ and lld/test/ELF. If they happen to change the messages (e.g. to add more information; many BitcodeReader.cpp messages are duplicated in multiple places and are generally not so informational), they can update the lld one as well. Suredly they can use grep -i or rg -i, or not search for the first character, but that is extra hurdle. We lose a bit of inconsistency, but the loss seems very small to me. |
This can be inlined into common-mixed2.ll