summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Instruction.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-06-08 21:30:13 +0000
committerChris Lattner <sabre@nondot.org>2001-06-08 21:30:13 +0000
commit5f46e8c9dae9a7f589629662df6cb7ce28a31ce0 (patch)
tree7a8b577718e5791cf3c7397c0adfc4db72aef835 /llvm/lib/VMCore/Instruction.cpp
parent9d905c95e062327e783f2c4b865f375fea81403c (diff)
downloadbcm5719-llvm-5f46e8c9dae9a7f589629662df6cb7ce28a31ce0.tar.gz
bcm5719-llvm-5f46e8c9dae9a7f589629662df6cb7ce28a31ce0.zip
Moved getBinaryOperator to the BinaryOperator class and the getUnaryOperator
to the UnaryOperator class (from the Instruction class). llvm-svn: 21
Diffstat (limited to 'llvm/lib/VMCore/Instruction.cpp')
-rw-r--r--llvm/lib/VMCore/Instruction.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Instruction.cpp b/llvm/lib/VMCore/Instruction.cpp
index 4b528f0d94a..6cb62ea374a 100644
--- a/llvm/lib/VMCore/Instruction.cpp
+++ b/llvm/lib/VMCore/Instruction.cpp
@@ -30,7 +30,8 @@ void Instruction::setName(const string &name) {
if (PP && hasName()) PP->getSymbolTableSure()->insert(this);
}
-Instruction *Instruction::getBinaryOperator(unsigned Op, Value *S1, Value *S2) {
+BinaryOperator *BinaryOperator::getBinaryOperator(unsigned Op,
+ Value *S1, Value *S2) {
switch (Op) {
case Add:
return new AddInst(S1, S2);
@@ -52,7 +53,7 @@ Instruction *Instruction::getBinaryOperator(unsigned Op, Value *S1, Value *S2) {
}
-Instruction *Instruction::getUnaryOperator(unsigned Op, Value *Source) {
+UnaryOperator *UnaryOperator::getUnaryOperator(unsigned Op, Value *Source) {
switch (Op) {
default:
cerr << "Don't know how to GetUnaryOperator " << Op << endl;
OpenPOWER on IntegriCloud