Revert "[sil] Add a new API SILFunction::getTypeLowering(SILType)."

The new API is broken. Popping a generic context frees all
dependent type lowerings, so this function returns a pointer
to freed memory.

This reverts commit 24dfae0716.
This commit is contained in:
Slava Pestov
2017-04-02 19:44:15 -07:00
parent ebe0c83795
commit f5b6f22ed6
6 changed files with 26 additions and 41 deletions

View File

@@ -32,9 +32,6 @@ namespace swift {
class ASTContext;
class SILInstruction;
class SILModule;
namespace Lowering {
class TypeLowering;
} // namespace Lowering
enum IsBare_t { IsNotBare, IsBare };
enum IsTransparent_t { IsNotTransparent, IsTransparent };
@@ -603,10 +600,6 @@ public:
GenericEnv = env;
}
/// Returns the type lowering for the \p Type given the generic signature of
/// the current function.
const Lowering::TypeLowering &getTypeLowering(SILType Type) const;
/// Map the given type, which is based on an interface SILFunctionType and may
/// therefore be dependent, to a type based on the context archetypes of this
/// SILFunction.