Commit 7095b8e
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 <[email protected]>1 parent 9ca884a commit 7095b8e
1 file changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
205 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
| |||
252 | 255 | | |
253 | 256 | | |
254 | 257 | | |
255 | | - | |
256 | | - | |
| 258 | + | |
| 259 | + | |
257 | 260 | | |
258 | 261 | | |
259 | 262 | | |
| |||
0 commit comments