Commit 76f45e7
Fix IRBuilderHelper assertion when DtoDefineNakedFunction called at module scope
Use gIR->saveInsertPoint() instead of gIR->ir->saveIP() because the
latter goes through IRBuilderHelper::operator->() which asserts that
there's a valid insert block. At module scope (e.g., when compiling
naked functions in phobos), there may not be an existing insert point.
The RAII InsertPointGuard handles both null and non-null insert points
correctly, saving and restoring the builder state automatically.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 9ca884a commit 76f45e7
1 file changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
205 | | - | |
206 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
207 | 211 | | |
208 | 212 | | |
209 | 213 | | |
| |||
252 | 256 | | |
253 | 257 | | |
254 | 258 | | |
255 | | - | |
256 | | - | |
| 259 | + | |
| 260 | + | |
257 | 261 | | |
258 | 262 | | |
259 | 263 | | |
| |||
0 commit comments