// create() - Construct a unary instruction, given the opcode
// and its operand.
//
- static UnaryOperator *create(UnaryOps Op, Value *Source);
+ static UnaryOperator *create(UnaryOps Op, Value *Source,
+ const std::string &Name = "");
inline UnaryOps getOpcode() const {
return (UnaryOps)Instruction::getOpcode();
#include "llvm/iOperators.h"
#include "llvm/Type.h"
-#include <iostream>
using std::cerr;
//===----------------------------------------------------------------------===//
// UnaryOperator Class
//===----------------------------------------------------------------------===//
-UnaryOperator *UnaryOperator::create(UnaryOps Op, Value *Source) {
+UnaryOperator *UnaryOperator::create(UnaryOps Op, Value *Source,
+ const std::string &Name) {
switch (Op) {
- case Not: return new GenericUnaryInst(Op, Source);
+ case Not: return new GenericUnaryInst(Op, Source, Name);
default:
cerr << "Don't know how to Create UnaryOperator " << Op << "\n";
return 0;
}
-//===----------------------------------------------------------------------===//
-// GenericUnaryOperator Class
-//===----------------------------------------------------------------------===//
-
-
//===----------------------------------------------------------------------===//
// BinaryOperator Class
//===----------------------------------------------------------------------===//
}
-//===----------------------------------------------------------------------===//
-// GenericBinaryInst Class
-//===----------------------------------------------------------------------===//
-
-
//===----------------------------------------------------------------------===//
// SetCondInst Class
//===----------------------------------------------------------------------===//