mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
Avoid creating the symbol table if we don't need it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2728 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8ebccb7f0e
commit
0c51266082
@ -16,7 +16,7 @@
|
|||||||
template<class ValueSubclass, class ItemParentType, class SymTabType>
|
template<class ValueSubclass, class ItemParentType, class SymTabType>
|
||||||
void ValueHolder<ValueSubclass,ItemParentType,SymTabType>
|
void ValueHolder<ValueSubclass,ItemParentType,SymTabType>
|
||||||
::setParent(SymTabType *P) {
|
::setParent(SymTabType *P) {
|
||||||
if (Parent) { // Remove all of the items from the old symbol table..
|
if (Parent && !empty()) { // Remove all of the items from the old symtab..
|
||||||
SymbolTable *SymTab = Parent->getSymbolTable();
|
SymbolTable *SymTab = Parent->getSymbolTable();
|
||||||
for (iterator I = begin(); I != end(); ++I)
|
for (iterator I = begin(); I != end(); ++I)
|
||||||
if ((*I)->hasName()) SymTab->remove(*I);
|
if ((*I)->hasName()) SymTab->remove(*I);
|
||||||
@ -24,7 +24,7 @@ void ValueHolder<ValueSubclass,ItemParentType,SymTabType>
|
|||||||
|
|
||||||
Parent = P;
|
Parent = P;
|
||||||
|
|
||||||
if (Parent) { // Remove all of the items from the old symbol table..
|
if (Parent && !empty()) { // Add all of the items to the new symtab...
|
||||||
SymbolTable *SymTab = Parent->getSymbolTableSure();
|
SymbolTable *SymTab = Parent->getSymbolTableSure();
|
||||||
for (iterator I = begin(); I != end(); ++I)
|
for (iterator I = begin(); I != end(); ++I)
|
||||||
if ((*I)->hasName()) SymTab->insert(*I);
|
if ((*I)->hasName()) SymTab->insert(*I);
|
||||||
|
Loading…
Reference in New Issue
Block a user