#include "llvm/iOperators.h"
#include "llvm/Type.h"
+#include <iostream>
+using std::cerr;
//===----------------------------------------------------------------------===//
// UnaryOperator Class
switch (Op) {
case Not: return new GenericUnaryInst(Op, Source);
default:
- cerr << "Don't know how to Create UnaryOperator " << Op << endl;
+ cerr << "Don't know how to Create UnaryOperator " << Op << "\n";
return 0;
}
}
case Not: return "not";
case Cast: return "cast";
default:
- cerr << "Invalid unary operator type!" << getOpcode() << endl;
+ cerr << "Invalid unary operator type!" << getOpcode() << "\n";
abort();
}
+ return 0;
}
//===----------------------------------------------------------------------===//
BinaryOperator *BinaryOperator::create(BinaryOps Op, Value *S1, Value *S2,
- const string &Name) {
+ const std::string &Name) {
switch (Op) {
// Binary comparison operators...
case SetLT: case SetGT: case SetLE:
default:
return true;
}
- swap(Operands[0], Operands[1]);
+ std::swap(Operands[0], Operands[1]);
return false;
}
case Or : return "or";
case Xor: return "xor";
default:
- cerr << "Invalid binary operator type!" << getOpcode() << endl;
+ cerr << "Invalid binary operator type!" << getOpcode() << "\n";
abort();
}
+ return 0;
}
//===----------------------------------------------------------------------===//
SetCondInst::SetCondInst(BinaryOps opType, Value *S1, Value *S2,
- const string &Name)
+ const std::string &Name)
: BinaryOperator(opType, S1, S2, Name) {
OpType = opType;