diff --git a/lib/IRGen/IRGenDebugInfo.cpp b/lib/IRGen/IRGenDebugInfo.cpp index 3811f4a8ab799..af24749ba30b2 100644 --- a/lib/IRGen/IRGenDebugInfo.cpp +++ b/lib/IRGen/IRGenDebugInfo.cpp @@ -2987,11 +2987,6 @@ void IRGenDebugInfoImpl::emitGlobalVariableDeclaration( if (Opts.DebugInfoLevel <= IRGenDebugInfoLevel::LineTables) return; - if (swift::TypeBase *ty = DbgTy.getType()) { - if (MetatypeType *metaTy = dyn_cast(ty)) - ty = metaTy->getInstanceType().getPointer(); - } - llvm::DIType *DITy = getOrCreateType(DbgTy); VarDecl *VD = nullptr; if (Loc) diff --git a/lib/IRGen/IRGenSIL.cpp b/lib/IRGen/IRGenSIL.cpp index 6bec19b3d5c77..e59f4e5411963 100644 --- a/lib/IRGen/IRGenSIL.cpp +++ b/lib/IRGen/IRGenSIL.cpp @@ -1159,11 +1159,6 @@ class IRGenSILFunction : const SILDebugScope *DS, SILLocation VarLoc, SILDebugVariable VarInfo, IndirectionKind Indirection, AddrDbgInstrKind DbgInstrKind = AddrDbgInstrKind::DbgDeclare) { - if (swift::TypeBase *ty = SILTy.getASTType().getPointer()) { - if (MetatypeType *metaTy = dyn_cast(ty)) - ty = metaTy->getRootClass().getPointer(); - } - assert(IGM.DebugInfo && "debug info not enabled"); if (VarInfo.ArgNo) {