codegen binaryOperator constant exprs


Below is a patch to add support to codegen for a few binary operators in constant exprs.
I'm not sure about SDiv and SRem. I dunno if the operations should be signed or not, but I leave that to someone more enlighten in the subject than me :slight_smile:


Index: CodeGen/CGExprConstant.cpp

The add, sub, div, and rem operations are incomplete; see
CGExprScalar.cpp for correct implementations (EmitDiv and friends).

Specifically, for Div and Rem, you need to check the types of the
operands, since the correct operation to use varies; in LLVM, signed
and unsigned integers don't have distinct types, the division
operation has to be separate.