[llvm] r206376 - Fixing a compile error in debug versions of MSVC. It seems that the range-based for loop is confused by the DEBUG macro expansion unless a compound statement is used.

Yaron Keren yaron.keren at gmail.com
Wed Apr 16 05:21:55 PDT 2014


There was a similar problem (fixed) with Assert1 macro in IR/verifier.cpp.

Yaron



2014-04-16 14:15 GMT+03:00 Aaron Ballman <aaron at aaronballman.com>:

> Author: aaronballman
> Date: Wed Apr 16 06:15:57 2014
> New Revision: 206376
>
> URL: http://llvm.org/viewvc/llvm-project?rev=206376&view=rev
> Log:
> Fixing a compile error in debug versions of MSVC. It seems that the
> range-based for loop is confused by the DEBUG macro expansion unless a
> compound statement is used.
>
> Modified:
>     llvm/trunk/lib/Target/ARM64/ARM64CollectLOH.cpp
>
> Modified: llvm/trunk/lib/Target/ARM64/ARM64CollectLOH.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM64/ARM64CollectLOH.cpp?rev=206376&r1=206375&r2=206376&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM64/ARM64CollectLOH.cpp (original)
> +++ llvm/trunk/lib/Target/ARM64/ARM64CollectLOH.cpp Wed Apr 16 06:15:57
> 2014
> @@ -492,8 +492,9 @@ static void printReachingDef(const Instr
>        DEBUG(dbgs() << "Def:\n");
>        DEBUG(DefsIt.first->print(dbgs()));
>        DEBUG(dbgs() << "Reachable uses:\n");
> -      for (const MachineInstr *MI : DefsIt.second)
> +      for (const MachineInstr *MI : DefsIt.second) {
>          DEBUG(MI->print(dbgs()));
> +      }
>      }
>    }
>  }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140416/85a7612d/attachment.html>


More information about the llvm-commits mailing list