diff options
author | Chris Lattner <sabre@nondot.org> | 2001-06-08 21:30:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-06-08 21:30:13 +0000 |
commit | 477c2ec3e01ddb67c3c079156f2ee2e1858bec42 (patch) | |
tree | 0a0978df36c7f87dae60a99848d549ddd3cd509b /lib/VMCore | |
parent | daa6ae31c18fd948ceaa05a6ef6712612dd70d7f (diff) | |
download | llvm-477c2ec3e01ddb67c3c079156f2ee2e1858bec42.tar.gz llvm-477c2ec3e01ddb67c3c079156f2ee2e1858bec42.tar.bz2 llvm-477c2ec3e01ddb67c3c079156f2ee2e1858bec42.tar.xz |
Moved getBinaryOperator to the BinaryOperator class and the getUnaryOperator
to the UnaryOperator class (from the Instruction class).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Instruction.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/VMCore/Instruction.cpp b/lib/VMCore/Instruction.cpp index 4b528f0d94..6cb62ea374 100644 --- a/lib/VMCore/Instruction.cpp +++ b/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; |