[llvm] ec82eb2 - Fix unused variable warning. NFCI.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 19 15:00:12 PST 2019


I'm not sure having a commented out variable is the best thing here -
perhaps it should be deleted? (if "if (getThing())" is a bit
unclear/unintentional, perhaps a "if (getThing() != nullptr)" would be
suitable here?)

On Tue, Oct 29, 2019 at 5:12 AM Simon Pilgrim via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

>
> Author: Simon Pilgrim
> Date: 2019-10-29T12:12:28Z
> New Revision: ec82eb2d024a3535bc9fa1dbe36764be017381b1
>
> URL:
> https://github.com/llvm/llvm-project/commit/ec82eb2d024a3535bc9fa1dbe36764be017381b1
> DIFF:
> https://github.com/llvm/llvm-project/commit/ec82eb2d024a3535bc9fa1dbe36764be017381b1.diff
>
> LOG: Fix unused variable warning. NFCI.
>
> Added:
>
>
> Modified:
>     llvm/lib/CodeGen/MachineInstr.cpp
>
> Removed:
>
>
>
>
> ################################################################################
> diff  --git a/llvm/lib/CodeGen/MachineInstr.cpp
> b/llvm/lib/CodeGen/MachineInstr.cpp
> index e643bcfd390e..397c1239d85c 100644
> --- a/llvm/lib/CodeGen/MachineInstr.cpp
> +++ b/llvm/lib/CodeGen/MachineInstr.cpp
> @@ -1701,7 +1701,7 @@ void MachineInstr::print(raw_ostream &OS,
> ModuleSlotTracker &MST,
>      OS << " post-instr-symbol ";
>      MachineOperand::printSymbol(OS, *PostInstrSymbol);
>    }
> -  if (MDNode *HeapAllocMarker = getHeapAllocMarker()) {
> +  if (/*MDNode *HeapAllocMarker =*/getHeapAllocMarker()) {
>      if (!FirstOp) {
>        FirstOp = false;
>        OS << ',';
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191119/227e75ef/attachment.html>


More information about the llvm-commits mailing list