Skip to content

Commit 27f670b

Browse files
committed
DefiniteInitialization: remove an always-true dyn_cast
NFC
1 parent 7fb4815 commit 27f670b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/SILOptimizer/Mandatory/DIMemoryUseCollector.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,8 @@ class DIMemoryObjectInfo {
9898
/// instruction. For alloc_box though it returns the project_box associated
9999
/// with the memory info.
100100
SingleValueInstruction *getUninitializedValue() const {
101-
if (auto *mui = dyn_cast<MarkUninitializedInst>(MemoryInst)) {
102-
if (auto *pbi = mui->getSingleUserOfType<ProjectBoxInst>()) {
103-
return pbi;
104-
}
105-
}
101+
if (auto *pbi = MemoryInst->getSingleUserOfType<ProjectBoxInst>())
102+
return pbi;
106103
return MemoryInst;
107104
}
108105

0 commit comments

Comments
 (0)