Skip to content

Commit 25d7fd3

Browse files
[Analysis] Remove unnecessary casts (NFC) (#146216)
PImpl is already of LazyValueInfoImpl *.
1 parent c57c5f5 commit 25d7fd3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

llvm/lib/Analysis/LazyValueInfo.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,14 +1745,10 @@ LazyValueInfoImpl &LazyValueInfo::getOrCreateImpl(const Module *M) {
17451745
Intrinsic::getDeclarationIfExists(M, Intrinsic::experimental_guard);
17461746
PImpl = new LazyValueInfoImpl(AC, DL, GuardDecl);
17471747
}
1748-
return *static_cast<LazyValueInfoImpl *>(PImpl);
1748+
return *PImpl;
17491749
}
17501750

1751-
LazyValueInfoImpl *LazyValueInfo::getImpl() {
1752-
if (!PImpl)
1753-
return nullptr;
1754-
return static_cast<LazyValueInfoImpl *>(PImpl);
1755-
}
1751+
LazyValueInfoImpl *LazyValueInfo::getImpl() { return PImpl; }
17561752

17571753
LazyValueInfo::~LazyValueInfo() { releaseMemory(); }
17581754

0 commit comments

Comments
 (0)