diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-02-10 04:25:02 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-02-10 04:25:02 +0000 |
| commit | 87dddc5262ee6c85a83d9c25dd9cafc544a6d390 (patch) | |
| tree | fbebdf5aa32a13b34228a2b1f2f845850cccc876 /lib/Bytecode | |
| parent | 75e2cf555cb52e3b22571d8c2953dfabe73d21e3 (diff) | |
| download | external_llvm-87dddc5262ee6c85a83d9c25dd9cafc544a6d390.zip external_llvm-87dddc5262ee6c85a83d9c25dd9cafc544a6d390.tar.gz external_llvm-87dddc5262ee6c85a83d9c25dd9cafc544a6d390.tar.bz2 | |
merge insertValue into its single caller, eliminate some redundant checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34117 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode')
| -rw-r--r-- | lib/Bytecode/Writer/SlotCalculator.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lib/Bytecode/Writer/SlotCalculator.cpp b/lib/Bytecode/Writer/SlotCalculator.cpp index 99e353c..0b148ec 100644 --- a/lib/Bytecode/Writer/SlotCalculator.cpp +++ b/lib/Bytecode/Writer/SlotCalculator.cpp @@ -367,19 +367,8 @@ int SlotCalculator::getOrCreateSlot(const Value *V) { } } - return insertValue(V); -} - -int SlotCalculator::insertValue(const Value *V) { - assert(V && "Can't insert a null value!"); - assert(getSlot(V) == -1 && "Value is already in the table!"); - - // If this node does not contribute to a plane, ignore the node. const Type *Typ = V->getType(); - if (Typ == Type::VoidTy) { // Ignore void type nodes - SC_DEBUG("ignored value " << *V << "\n"); - return -1; - } + assert(Typ != Type::VoidTy && "Can't handle voidty"); unsigned Ty; |
