[PATCH] D96423: [DebugInfo] Remove early implicit cast of TypeSize to unsigned
Joe Ellis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 10 07:48:27 PST 2021
joechrisellis created this revision.
joechrisellis added reviewers: DavidTruby, willlovett.
Herald added a subscriber: hiraditya.
joechrisellis requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This commit changes a line in SelectionDAGBuilder::handleDebugValue to
avoid implicitly casting a TypeSize object to an unsigned earlier than
necessary. It is possible for the TypeSize to never be used, so casting
it to an unsigned early-on means that we are creating a superfluous warning.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D96423
Files:
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -1321,7 +1321,7 @@
if (auto Fragment = Expr->getFragmentInfo())
BitsToDescribe = Fragment->SizeInBits;
for (auto RegAndSize : RFV.getRegsAndSizes()) {
- unsigned RegisterSize = RegAndSize.second;
+ auto RegisterSize = RegAndSize.second;
// Bail out if all bits are described already.
if (Offset >= BitsToDescribe)
break;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96423.322688.patch
Type: text/x-patch
Size: 651 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210210/c28962d5/attachment.bin>
More information about the llvm-commits
mailing list