[PATCH] D130719: [GlobalISel][nfc] Remove unnecessary cast
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 28 14:55:50 PDT 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0ef6809c4851: [GlobalISel][nfc] Remove unnecessary cast (authored by fdeazeve, committed by aprantl).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130719/new/
https://reviews.llvm.org/D130719
Files:
llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
Index: llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
===================================================================
--- llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
+++ llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
@@ -97,10 +97,10 @@
"Expected inlined-at fields to agree");
auto MIB = buildInstrNoInsert(TargetOpcode::DBG_VALUE);
- auto *NumericConstant = [&] {
+ auto *NumericConstant = [&] () -> const Constant* {
if (const auto *CE = dyn_cast<ConstantExpr>(&C))
if (CE->getOpcode() == Instruction::IntToPtr)
- return cast<const Constant>(CE->getOperand(0));
+ return CE->getOperand(0);
return &C;
}();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130719.448448.patch
Type: text/x-patch
Size: 671 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220728/69394c08/attachment.bin>
More information about the llvm-commits
mailing list