From af6599ff312dd1fe55b152b54cec3312758f9a38 Mon Sep 17 00:00:00 2001 From: Felipe de Azevedo Piovezan Date: Mon, 14 Aug 2023 10:02:22 -0400 Subject: [PATCH] [IRGen] Delete no-op code Commit 5c3ccf505065 added a number of blocks of code which were partially removed by 39af79f491b. This partial remove left lines of code doing nothin; we remove them here. --- lib/IRGen/IRGenDebugInfo.cpp | 5 ----- lib/IRGen/IRGenSIL.cpp | 5 ----- 2 files changed, 10 deletions(-) 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) {