Address spaces equal or larger than 1 << 24 don't fit and produce an
assertion during debug builds, or worse in release. This causes an error
to be reported during parsing instead.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Minor suggestions inline. Would you mind rebasing this on https://reviews.llvm.org/D138789 (which I will commit once approved). Should make the diff slightly smaller.
| llvm/lib/AsmParser/LLParser.cpp | ||
|---|---|---|
| 1795–1796 | To match the logic in DataLayout.cpp. However, ideally we should have a shared constant somewhere instead of duplicating this knowledge. | |
| llvm/lib/AsmParser/LLParser.cpp | ||
|---|---|---|
| 1794 | Nit: I think "24-bit" would be consistent with similar strings in LLVM. | |
| llvm/test/Assembler/invalid-addrspace.ll | ||
|---|---|---|
| 5 ↗ | (On Diff #481252) | Does not match the updated diagnostic. |
Nit: I think "24-bit" would be consistent with similar strings in LLVM.