[llvm-commits] CVS: llvm/lib/Transforms/Utils/LowerSwitch.cpp
Chris Lattner
clattner at apple.com
Fri Mar 2 15:09:31 PST 2007
> 1. Sort switch cases using APInt safe comparison.
Cool,
> @@ -128,7 +128,7 @@
>
> Case& Pivot = *(Begin + Mid);
> DOUT << "Pivot ==> "
> - << cast<ConstantInt>(Pivot.first)->getSExtValue() << "\n";
> + << cast<ConstantInt>(Pivot.first)->getValue().toStringSigned
> (10) << "\n";
Please wrap this in a DEBUG line. "DOUT" evaluates side-effects even
when debugging is disabled. This means it will evaluate
toStringSigned() even if disabled. In cases like this, please wrap
in DEBUG().
Thanks Reid,
-Chris
More information about the llvm-commits
mailing list