Commit 198519c
committed
SIL: Fix TypeExpansionContext() constructor to get the right DeclContext from a SILFunction
Using the SILFunction's DeclContext produces the wrong result for
the @main function, because it returns the ModuleDecl even in
a non-WMO build.
Instead, let's always just use SILModule::getAssociatedContext(),
which also simplifies the code here.
Fixes <rdar://problem/66791399>.1 parent bfb1e91 commit 198519c
File tree
2 files changed
+35
-11
lines changed- lib/SIL/IR
- test/SILGen
2 files changed
+35
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4477 | 4477 | | |
4478 | 4478 | | |
4479 | 4479 | | |
4480 | | - | |
4481 | | - | |
4482 | | - | |
4483 | | - | |
4484 | | - | |
4485 | | - | |
4486 | | - | |
4487 | | - | |
4488 | | - | |
4489 | | - | |
4490 | 4480 | | |
4491 | 4481 | | |
4492 | | - | |
| 4482 | + | |
4493 | 4483 | | |
4494 | 4484 | | |
4495 | 4485 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments