[llvm-commits] [llvm] r122598 - in /llvm/trunk/lib: Analysis/InstructionSimplify.cpp MC/TargetAsmBackend.cpp

Duncan Sands baldrick at free.fr
Tue Dec 28 09:53:35 PST 2010

Hi Benjamin,

> Cast away "comparison between signed and unsigned integer" warnings.
> @@ -71,8 +71,9 @@
>   /// Also performs the transform "(A op' B) op C" ->  "(A op C) op' (B op C)".
>   /// Returns the simplified value, or null if no simplification was performed.
>   static Value *ExpandBinOp(unsigned Opcode, Value *LHS, Value *RHS,
> -                          unsigned OpcodeToExpand, const TargetData *TD,
> +                          unsigned OpcToExpand, const TargetData *TD,
>                             const DominatorTree *DT, unsigned MaxRecurse) {
> +  Instruction::BinaryOps OpcodeToExpand = (Instruction::BinaryOps)OpcToExpand;

for what it's worth, recent versions of gcc (eg: gcc-4.5) do not warn about
this (comparing an unsigned value with an enum).

Ciao, Duncan.

More information about the llvm-commits mailing list