Commit b5a1d34
committed
[lldb] Initialize a shared, blank SwiftASTContext in Objective-C frames
The result of an Objective-C expression can be a Swift
ValueObject. This means that `po foo` in Objective-C may run a Swift
expression to print the object description of the result of the
Objective-C expression `foo`. That expression has very few
dependencies:
```
Swift._DebuggerSupport.stringForPrintObject(Swift.unsafeBitCast(0x001234, to: AnyObject.self))
```
To avoid scanning potentially incompatible compiler flags and/or doing
implicit imports in anotherwise explicitly built project, this patch
ensures that one SwiftASTContext per triple is created, with no other
contextual information. This makes `po` in ObjC much faster and
reliable, the downside of this is that
```expr -l Swift -- import ModuleName```
will only work reliably for SDK modules outside of Swift frames.
rdar://1533320371 parent 2a5645a commit b5a1d34
File tree
14 files changed
+83
-129
lines changed- lldb
- source/Plugins/TypeSystem/Swift
- test/API/lang/swift
- po/objc
- unit-tests
14 files changed
+83
-129
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2705 | 2705 | | |
2706 | 2706 | | |
2707 | 2707 | | |
| 2708 | + | |
2708 | 2709 | | |
2709 | 2710 | | |
2710 | 2711 | | |
2711 | 2712 | | |
2712 | 2713 | | |
2713 | 2714 | | |
2714 | 2715 | | |
2715 | | - | |
| 2716 | + | |
2716 | 2717 | | |
2717 | 2718 | | |
2718 | | - | |
| 2719 | + | |
2719 | 2720 | | |
2720 | 2721 | | |
2721 | 2722 | | |
| |||
2795 | 2796 | | |
2796 | 2797 | | |
2797 | 2798 | | |
2798 | | - | |
| 2799 | + | |
| 2800 | + | |
2799 | 2801 | | |
2800 | 2802 | | |
2801 | 2803 | | |
| |||
3131 | 3133 | | |
3132 | 3134 | | |
3133 | 3135 | | |
3134 | | - | |
| 3136 | + | |
| 3137 | + | |
3135 | 3138 | | |
3136 | 3139 | | |
3137 | 3140 | | |
| |||
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2072 | 2072 | | |
2073 | 2073 | | |
2074 | 2074 | | |
2075 | | - | |
| 2075 | + | |
2076 | 2076 | | |
2077 | 2077 | | |
2078 | 2078 | | |
2079 | | - | |
2080 | | - | |
2081 | | - | |
2082 | | - | |
2083 | | - | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
2084 | 2083 | | |
2085 | 2084 | | |
2086 | 2085 | | |
| |||
2563 | 2562 | | |
2564 | 2563 | | |
2565 | 2564 | | |
| 2565 | + | |
| 2566 | + | |
| 2567 | + | |
2566 | 2568 | | |
2567 | 2569 | | |
2568 | 2570 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
This file was deleted.
This file was deleted.
0 commit comments