return EmitLValue(E->getSubExpr());
}
+ // Binary operators
+ llvm::Constant *VisitBinOr(const BinaryOperator *E) {
+ llvm::Constant *LHS = Visit(E->getLHS());
+ llvm::Constant *RHS = Visit(E->getRHS());
+
+ return llvm::ConstantExpr::getOr(LHS, RHS);
+ }
+
// Utility methods
const llvm::Type *ConvertType(QualType T) {
return CGM.getTypes().ConvertType(T);
static int a = { 1 };
static int b = { 1, 2 };
+// References to enums.
enum {
EnumA, EnumB
};
int c[] = { EnumA, EnumB };
+
+// Binary operators
+int d[] = { EnumA | EnumB };