// Try inserting the name, assuming it won't conflict.
if (vmap.insert(V->Name)) {
- //DOUT << " Inserted value: " << V->Name << ": " << *V << "\n";
+ //DEBUG(errs() << " Inserted value: " << V->Name << ": " << *V << "\n");
return;
}
// Newly inserted name. Success!
NewName.setValue(V);
V->Name = &NewName;
- //DEBUG(DOUT << " Inserted value: " << UniqueName << ": " << *V << "\n");
+ //DEBUG(errs() << " Inserted value: " << UniqueName << ": " << *V << "\n");
return;
}
}
}
void ValueSymbolTable::removeValueName(ValueName *V) {
- //DEBUG(DOUT << " Removing Value: " << V->getKeyData() << "\n");
+ //DEBUG(errs() << " Removing Value: " << V->getKeyData() << "\n");
// Remove the value from the symbol table.
vmap.remove(V);
}
/// createValueName - This method attempts to create a value name and insert
/// it into the symbol table with the specified name. If it conflicts, it
/// auto-renames the name and returns that instead.
-ValueName *ValueSymbolTable::createValueName(const StringRef &Name, Value *V) {
+ValueName *ValueSymbolTable::createValueName(StringRef Name, Value *V) {
// In the common case, the name is not already in the symbol table.
ValueName &Entry = vmap.GetOrCreateValue(Name);
if (Entry.getValue() == 0) {
Entry.setValue(V);
- //DEBUG(DOUT << " Inserted value: " << Entry.getKeyData() << ": "
+ //DEBUG(errs() << " Inserted value: " << Entry.getKeyData() << ": "
// << *V << "\n");
return &Entry;
}
if (NewName.getValue() == 0) {
// Newly inserted name. Success!
NewName.setValue(V);
- //DEBUG(DOUT << " Inserted value: " << UniqueName << ": " << *V << "\n");
+ //DEBUG(errs() << " Inserted value: " << UniqueName << ": " << *V << "\n");
return &NewName;
}
}
// dump - print out the symbol table
//
void ValueSymbolTable::dump() const {
- //DOUT << "ValueSymbolTable:\n";
+ //DEBUG(errs() << "ValueSymbolTable:\n");
for (const_iterator I = begin(), E = end(); I != E; ++I) {
- //DOUT << " '" << I->getKeyData() << "' = ";
+ //DEBUG(errs() << " '" << I->getKeyData() << "' = ");
I->getValue()->dump();
- //DOUT << "\n";
+ //DEBUG(errs() << "\n");
}
}