[llvm] af86a10 - [llvm] Fix unused variable warning

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 18:50:37 PDT 2020


Please roll single-use variables into their assertions, rather than
adding void casts.

On Tue, Jun 2, 2020 at 1:48 PM Kadir Cetinkaya via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
>
>
> Author: Kadir Cetinkaya
> Date: 2020-06-02T22:46:24+02:00
> New Revision: af86a10bad28d1829370bfa9b8b7bb9302f637d2
>
> URL: https://github.com/llvm/llvm-project/commit/af86a10bad28d1829370bfa9b8b7bb9302f637d2
> DIFF: https://github.com/llvm/llvm-project/commit/af86a10bad28d1829370bfa9b8b7bb9302f637d2.diff
>
> LOG: [llvm] Fix unused variable warning
>
> Added:
>
>
> Modified:
>     llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
>
> Removed:
>
>
>
> ################################################################################
> diff  --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
> index 707a8fd6c35b..538c93d1b8c6 100644
> --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
> +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
> @@ -7944,6 +7944,7 @@ static SDValue combineShiftToMULH(SDNode *N, SelectionDAG &DAG,
>
>    EVT WideVT1 = LeftOp.getValueType();
>    EVT WideVT2 = RightOp.getValueType();
> +  (void)WideVT2;
>    // Proceed with the transformation if the wide types match.
>    assert((WideVT1 == WideVT2) &&
>           "Cannot have a multiply node with two
> diff erent operand types.");
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list