From: Chris Lattner Date: Fri, 9 Aug 2002 21:39:38 +0000 (+0000) Subject: UnaryOperator::create should take a name just like BinaryOperator::create X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dc1e020444942b1dc721a84b21f5d634689762a5;p=oota-llvm.git UnaryOperator::create should take a name just like BinaryOperator::create git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3279 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h index 9a28d64fb9c..8d1b5f1230d 100644 --- a/include/llvm/InstrTypes.h +++ b/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/lib/VMCore/iOperators.cpp b/lib/VMCore/iOperators.cpp index 75cac7d59d5..bc37df5cb7f 100644 --- a/lib/VMCore/iOperators.cpp +++ b/lib/VMCore/iOperators.cpp @@ -6,16 +6,16 @@ #include "llvm/iOperators.h" #include "llvm/Type.h" -#include 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; @@ -23,11 +23,6 @@ UnaryOperator *UnaryOperator::create(UnaryOps Op, Value *Source) { } -//===----------------------------------------------------------------------===// -// GenericUnaryOperator Class -//===----------------------------------------------------------------------===// - - //===----------------------------------------------------------------------===// // BinaryOperator Class //===----------------------------------------------------------------------===// @@ -72,11 +67,6 @@ bool BinaryOperator::swapOperands() { } -//===----------------------------------------------------------------------===// -// GenericBinaryInst Class -//===----------------------------------------------------------------------===// - - //===----------------------------------------------------------------------===// // SetCondInst Class //===----------------------------------------------------------------------===//