summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bytecode/Reader/Analyzer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-12 18:53:43 +0000
committerChris Lattner <sabre@nondot.org>2007-02-12 18:53:43 +0000
commit8d160d68b8fc40ed50c2e0f928c40f57ec886915 (patch)
treebc586072d32bf81b5d2abd1bde893614e81cc024 /llvm/lib/Bytecode/Reader/Analyzer.cpp
parent1a5de584dca538300a570502be6c15942cc7d3cd (diff)
downloadbcm5719-llvm-8d160d68b8fc40ed50c2e0f928c40f57ec886915.tar.gz
bcm5719-llvm-8d160d68b8fc40ed50c2e0f928c40f57ec886915.zip
avoid creating a temporary string when reading the symbol table for a
module. This speeds up the bcreader 11%. llvm-svn: 34198
Diffstat (limited to 'llvm/lib/Bytecode/Reader/Analyzer.cpp')
-rw-r--r--llvm/lib/Bytecode/Reader/Analyzer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Bytecode/Reader/Analyzer.cpp b/llvm/lib/Bytecode/Reader/Analyzer.cpp
index fe503f4d124..880605c40fc 100644
--- a/llvm/lib/Bytecode/Reader/Analyzer.cpp
+++ b/llvm/lib/Bytecode/Reader/Analyzer.cpp
@@ -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;
}
OpenPOWER on IntegriCloud