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
diff --git a/lib/Bytecode/Reader/Analyzer.cpp b/lib/Bytecode/Reader/Analyzer.cpp
index fe503f4..880605c 100644
--- a/lib/Bytecode/Reader/Analyzer.cpp
+++ b/lib/Bytecode/Reader/Analyzer.cpp
@@ -250,10 +250,10 @@
}
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;
}