File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,9 @@ class RemoteASTContext {
221
221
Type staticType);
222
222
};
223
223
224
+ Type getTypeForMangling (ASTContext &ctx,
225
+ StringRef mangling);
226
+
224
227
} // end namespace remoteAST
225
228
} // end namespace swift
226
229
Original file line number Diff line number Diff line change 29
29
#include " swift/AST/TypeRepr.h"
30
30
#include " swift/Basic/Mangler.h"
31
31
#include " swift/ClangImporter/ClangImporter.h"
32
+ #include " swift/Demangling/Demangler.h"
32
33
#include " llvm/ADT/StringSwitch.h"
33
34
34
35
// TODO: Develop a proper interface for this.
@@ -1342,3 +1343,14 @@ RemoteASTContext::getDynamicTypeAndAddressForExistential(
1342
1343
return asImpl (Impl)->getDynamicTypeAndAddressForExistential (address,
1343
1344
staticType);
1344
1345
}
1346
+
1347
+ Type swift::remoteAST::getTypeForMangling (ASTContext &ctx,
1348
+ StringRef mangling) {
1349
+ Demangle::Context Dem;
1350
+ auto node = Dem.demangleSymbolAsNode (mangling);
1351
+ if (!node)
1352
+ return Type ();
1353
+
1354
+ RemoteASTTypeBuilder builder (ctx);
1355
+ return swift::Demangle::decodeMangledType (builder, node);
1356
+ }
You can’t perform that action at this time.
0 commit comments