mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-30 00:24:00 +00:00
UnaryOperator::create should take a name just like BinaryOperator::create
llvm-svn: 3279
This commit is contained in:
parent
8a4787495a
commit
d2d8928f1b
@ -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();
|
||||
|
@ -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;
|
||||
@ -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
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
Loading…
x
Reference in New Issue
Block a user