aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Function.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-12 05:18:08 +0000
committerChris Lattner <sabre@nondot.org>2007-02-12 05:18:08 +0000
commitdec628eead87b20773c98a00830580df211acc98 (patch)
treecb28286b21387a97519f3e30c757c4fa07b904c5 /lib/VMCore/Function.cpp
parentfa48e9612e52adada82b3d74f9a8e2c35c960b36 (diff)
Switch ValueSymbolTable to use StringMap<Value*> instead of std::map<std::string, Value*>
as its main datastructure. There are many improvements yet to be made, but this speeds up opt --std-compile-opts on 447.dealII by 7.3%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34193 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Function.cpp')
-rw-r--r--lib/VMCore/Function.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp
index 72237eb440..fcbf73f9cf 100644
--- a/lib/VMCore/Function.cpp
+++ b/lib/VMCore/Function.cpp
@@ -51,7 +51,7 @@ template class SymbolTableListTraits<BasicBlock, Function, Function>;
//===----------------------------------------------------------------------===//
Argument::Argument(const Type *Ty, const std::string &Name, Function *Par)
- : Value(Ty, Value::ArgumentVal, Name) {
+ : Value(Ty, Value::ArgumentVal) {
Parent = 0;
// Make sure that we get added to a function
@@ -59,6 +59,7 @@ Argument::Argument(const Type *Ty, const std::string &Name, Function *Par)
if (Par)
Par->getArgumentList().push_back(this);
+ setName(Name);
}
void Argument::setParent(Function *parent) {