[PATCH] D130719: [GlobalISel][nfc] Remove unnecessary cast
Felipe de Azevedo Piovezan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 28 11:04:15 PDT 2022
fdeazeve updated this revision to Diff 448389.
fdeazeve retitled this revision from "[GlobalISEL][nfc] Remove unnecessary cast" to "[GlobalISel][nfc] Remove unnecessary cast".
fdeazeve added a comment.
Changed commit message style
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.448389.patch
Type: text/x-patch
Size: 671 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220728/82518f92/attachment.bin>
More information about the llvm-commits
mailing list