|
18 | 18 | #include "lldb/Target/Language.h"
|
19 | 19 | #include "lldb/Utility/Log.h"
|
20 | 20 |
|
| 21 | +// BEGIN SWIFT |
| 22 | +#include "Plugins/TypeSystem/Clang/TypeSystemClang.h" |
| 23 | +// END SWIFT |
| 24 | + |
21 | 25 | using namespace lldb;
|
22 | 26 | using namespace lldb_private;
|
23 | 27 | using namespace lldb_private::formatters;
|
@@ -192,14 +196,21 @@ void FormatManager::GetPossibleMatches(
|
192 | 196 | entries.push_back(
|
193 | 197 | {type_name, did_strip_ptr, did_strip_ref, did_strip_typedef});
|
194 | 198 |
|
195 |
| - const SymbolContext *sc = nullptr; |
196 |
| - if (valobj.GetFrameSP()) |
197 |
| - sc = &valobj.GetFrameSP()->GetSymbolContext(eSymbolContextFunction); |
198 |
| - |
199 |
| - ConstString display_type_name(compiler_type.GetTypeName()); |
200 |
| - if (display_type_name != type_name) |
201 |
| - entries.push_back({display_type_name, did_strip_ptr, |
202 |
| - did_strip_ref, did_strip_typedef}); |
| 199 | +// BEGIN SWIFT |
| 200 | + TypeSystem *ts = compiler_type.GetTypeSystem(); |
| 201 | + if (ts && !llvm::isa<TypeSystemClang>(ts)) { |
| 202 | +// END SWIFT |
| 203 | + const SymbolContext *sc = nullptr; |
| 204 | + if (valobj.GetFrameSP()) |
| 205 | + sc = &valobj.GetFrameSP()->GetSymbolContext(eSymbolContextFunction); |
| 206 | + |
| 207 | + ConstString display_type_name(compiler_type.GetDisplayTypeName(sc)); |
| 208 | + if (display_type_name != type_name) |
| 209 | + entries.push_back({display_type_name, reason, did_strip_ptr, |
| 210 | + did_strip_ref, did_strip_typedef}); |
| 211 | +// BEGIN SWIFT |
| 212 | + } |
| 213 | +// END SWIFT |
203 | 214 | }
|
204 | 215 |
|
205 | 216 | for (bool is_rvalue_ref = true, j = true;
|
|
0 commit comments