[PATCH] D149178: [DebugLocEntry][nfc] Remove redundant cast
Felipe de Azevedo Piovezan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 25 12:09:08 PDT 2023
fdeazeve created this revision.
fdeazeve added a reviewer: aprantl.
Herald added a subscriber: hiraditya.
Herald added a project: All.
fdeazeve requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
A cast from DIExpression->DIExpression is not needed.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D149178
Files:
llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
Index: llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
+++ llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h
@@ -126,7 +126,7 @@
: Expression(Expr), ValueLocEntries(Locs.begin(), Locs.end()),
IsVariadic(IsVariadic) {
#ifndef NDEBUG
- assert(cast<DIExpression>(Expr)->isValid() ||
+ assert(Expr->isValid() ||
!any_of(Locs, [](auto LE) { return LE.isLocation(); }));
if (!IsVariadic) {
assert(ValueLocEntries.size() == 1);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149178.516861.patch
Type: text/x-patch
Size: 574 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230425/5f0b99e8/attachment.bin>
More information about the llvm-commits
mailing list