Adjust to changes in User class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19892 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2005-01-29 00:35:33 +00:00
parent b12261ac69
commit 96d83f63cd
4 changed files with 18 additions and 18 deletions

View File

@@ -18,15 +18,11 @@
#include "llvm/Support/LeakDetector.h"
using namespace llvm;
void Instruction::init() {
Instruction::Instruction(const Type *ty, unsigned it, Use *Ops, unsigned NumOps,
const std::string &Name, Instruction *InsertBefore)
: User(ty, Value::InstructionVal + it, Ops, NumOps, Name), Parent(0) {
// Make sure that we get added to a basicblock
LeakDetector::addGarbageObject(this);
}
Instruction::Instruction(const Type *ty, unsigned it, const std::string &Name,
Instruction *InsertBefore)
: User(ty, Value::InstructionVal + it, Name), Parent(0) {
init();
// If requested, insert this instruction into a basic block...
if (InsertBefore) {
@@ -36,10 +32,11 @@ Instruction::Instruction(const Type *ty, unsigned it, const std::string &Name,
}
}
Instruction::Instruction(const Type *ty, unsigned it, const std::string &Name,
BasicBlock *InsertAtEnd)
: User(ty, Value::InstructionVal + it, Name), Parent(0) {
init();
Instruction::Instruction(const Type *ty, unsigned it, Use *Ops, unsigned NumOps,
const std::string &Name, BasicBlock *InsertAtEnd)
: User(ty, Value::InstructionVal + it, Ops, NumOps, Name), Parent(0) {
// Make sure that we get added to a basicblock
LeakDetector::addGarbageObject(this);
// append this instruction into the basic block
assert(InsertAtEnd && "Basic block to append to may not be NULL!");