IDE: Remove getTypeFromMangledSymbolname()

There was only one remaining usage other than in testing tools.

Note that when a declaration mangling was passed in, the old entry
point would (try to) return the type of the declaration.

The new entry point no longer has this behavior. I changed the
bridging-header-first test to run lldb-moduleimport-test with
-decl-from-mangled instead of -type-from-mangled-old to preserve
the behavior of the test.

Also, I removed test/DebugInfo/DumpTypeFromMangledName.swift
completely. This test only covered a handful of cases, and a bunch
of them were declaration manglings rather than type manglings.
The new tests in test/TypeDecoder/ are much more comprehensive.
This commit is contained in:
Slava Pestov
2019-01-30 10:50:06 -05:00
parent a1d38c1012
commit b2f0327516
10 changed files with 27 additions and 162 deletions

View File

@@ -14,6 +14,7 @@
#include "swift/IDE/Utils.h"
#include "swift/Sema/IDETypeChecking.h"
#include "swift/AST/ASTContext.h"
#include "swift/AST/ASTDemangler.h"
#include "swift/AST/ASTPrinter.h"
#include "swift/AST/Decl.h"
#include "swift/AST/Module.h"
@@ -182,8 +183,8 @@ printTypeInterface(ModuleDecl *M, Type Ty, ASTPrinter &Printer,
bool swift::ide::
printTypeInterface(ModuleDecl *M, StringRef TypeUSR, ASTPrinter &Printer,
std::string &TypeName, std::string &Error) {
return printTypeInterface(M, getTypeFromMangledSymbolname(M->getASTContext(),
TypeUSR, Error),
return printTypeInterface(M, Demangle::getTypeForMangling(M->getASTContext(),
TypeUSR),
Printer, TypeName, Error);
}