diff options
author | Chris Lattner <sabre@nondot.org> | 2001-06-25 07:31:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-06-25 07:31:05 +0000 |
commit | 3bcd6394ecd3c928d2ea05bb64cacdcae8dc677a (patch) | |
tree | abd721b18f3210276939233081d5c4c5d2f47f52 /lib/VMCore/ValueHolderImpl.h | |
parent | 53b1c0161d7fb6e8eb4bd1c49114a5cf57258364 (diff) | |
download | external_llvm-3bcd6394ecd3c928d2ea05bb64cacdcae8dc677a.zip external_llvm-3bcd6394ecd3c928d2ea05bb64cacdcae8dc677a.tar.gz external_llvm-3bcd6394ecd3c928d2ea05bb64cacdcae8dc677a.tar.bz2 |
* Rename get.*Operator to create seeing that it would have to be qualified
with the classname anyways.
* Add an isPHINode() method to Instruction
* Add getUniqueName() to SymbolTable class
* Add an insert method to ValueHolder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/ValueHolderImpl.h')
-rw-r--r-- | lib/VMCore/ValueHolderImpl.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/VMCore/ValueHolderImpl.h b/lib/VMCore/ValueHolderImpl.h index 9ca5d94..1bfdd25 100644 --- a/lib/VMCore/ValueHolderImpl.h +++ b/lib/VMCore/ValueHolderImpl.h @@ -100,4 +100,21 @@ void ValueHolder<ValueSubclass,ItemParentType>::push_back(ValueSubclass *Inst) { Parent->getSymbolTableSure()->insert(Inst); } +// ValueHolder::insert - This method inserts the specified value *BEFORE* the +// indicated iterator position, and returns an interator to the newly inserted +// value. +// +template<class ValueSubclass, class ItemParentType> +ValueHolder<ValueSubclass,ItemParentType>::iterator +ValueHolder<ValueSubclass,ItemParentType>::insert(iterator Pos, + ValueSubclass *Inst){ + assert(Inst->getParent() == 0 && "Value already has parent!"); + Inst->setParent(ItemParent); + + iterator I = ValueList.insert(Pos, Inst); + if (Inst->hasName() && Parent) + Parent->getSymbolTableSure()->insert(Inst); + return I; +} + #endif |