This fixes an assertion when building the FreeBSD MIPS64 kernel.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I've seen this patch in the CHERI fork, thanks for upstreaming it. Some nits inlined and can you use update_llc_test_checks.py to generate the CHECK lines?
Thanks.
| lib/Target/Mips/MipsTargetObjectFile.cpp | ||
|---|---|---|
| 140 ↗ | (On Diff #131561) | Change this to: "It is possible that the type of the global is unsized, i.e. a declaration of a extern struct. In this case don't presume it is in the small data section. This happens e.g. when building the FreeBSD kernel." |
| test/CodeGen/Mips/unsized-global.ll | ||
| 2 ↗ | (On Diff #131561) | Add -mattr=+noabicalls here. |
| 4–7 ↗ | (On Diff #131561) | This metadata can be removed. |
| 13 ↗ | (On Diff #131561) | This line can be removed. |
| 14 ↗ | (On Diff #131561) | You can drop the 'local_unnamed_addr #0" here. |
| 14–32 ↗ | (On Diff #131561) | This llvm-ir can all be simplified to: define %struct.a* @d() {
entry:
ret %struct.a* @b
} |
| 34–40 ↗ | (On Diff #131561) | All of this can be dropped as well. |