avoid creating a temporary string when reading the symbol table for a

module.  This speeds up the bcreader 11%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34198 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2007-02-12 18:53:43 +00:00
parent 042ad36871
commit dd8cec59fc
4 changed files with 27 additions and 10 deletions

View File

@@ -250,10 +250,10 @@ public:
}
virtual void handleSymbolTableValue(unsigned TySlot, unsigned ValSlot,
const std::string& name) {
const char *Name, unsigned NameLen) {
if (os)
*os << " Value " << TySlot << " Slot=" << ValSlot
<< " Name: " << name << "\n";
<< " Name: " << std::string(Name, Name+NameLen) << "\n";
if (ValSlot > bca.maxValueSlot)
bca.maxValueSlot = ValSlot;
}