summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/InstrTypes.h3
-rw-r--r--llvm/lib/VMCore/iOperators.cpp16
2 files changed, 5 insertions, 14 deletions
diff --git a/llvm/include/llvm/InstrTypes.h b/llvm/include/llvm/InstrTypes.h
index 9a28d64fb9c..8d1b5f1230d 100644
--- a/llvm/include/llvm/InstrTypes.h
+++ b/llvm/include/llvm/InstrTypes.h
@@ -69,7 +69,8 @@ public:
// 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();
diff --git a/llvm/lib/VMCore/iOperators.cpp b/llvm/lib/VMCore/iOperators.cpp
index 75cac7d59d5..bc37df5cb7f 100644
--- a/llvm/lib/VMCore/iOperators.cpp
+++ b/llvm/lib/VMCore/iOperators.cpp
@@ -6,16 +6,16 @@
#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;
@@ -24,11 +24,6 @@ UnaryOperator *UnaryOperator::create(UnaryOps Op, Value *Source) {
//===----------------------------------------------------------------------===//
-// GenericUnaryOperator Class
-//===----------------------------------------------------------------------===//
-
-
-//===----------------------------------------------------------------------===//
// BinaryOperator Class
//===----------------------------------------------------------------------===//
@@ -73,11 +68,6 @@ bool BinaryOperator::swapOperands() {
//===----------------------------------------------------------------------===//
-// GenericBinaryInst Class
-//===----------------------------------------------------------------------===//
-
-
-//===----------------------------------------------------------------------===//
// SetCondInst Class
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud