summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2009-01-17 00:09:08 +0000
committerGabor Greif <ggreif@gmail.com>2009-01-17 00:09:08 +0000
commit125329891f97baedef21e4b464ba70182c3fb45e (patch)
tree094bae2438e40bc420c8f143aa63fa6cc79b5fcb
parent7ac9cdfc991db344a1e0f642aefc6db6b868b9b0 (diff)
downloadexternal_llvm-125329891f97baedef21e4b464ba70182c3fb45e.zip
external_llvm-125329891f97baedef21e4b464ba70182c3fb45e.tar.gz
external_llvm-125329891f97baedef21e4b464ba70182c3fb45e.tar.bz2
introduce typedef for complicated vector, and use it too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62384 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Analysis/CallGraph.h2
-rw-r--r--lib/Transforms/Utils/InlineFunction.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h
index 27a6ab3..de83969 100644
--- a/include/llvm/Analysis/CallGraph.h
+++ b/include/llvm/Analysis/CallGraph.h
@@ -174,6 +174,8 @@ class CallGraphNode {
CallGraphNode(const CallGraphNode &); // Do not implement
public:
+ typedef std::vector<CallRecord> CalledFunctionsVector;
+
//===---------------------------------------------------------------------
// Accessor methods...
//
diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp
index 6704b60..cee224a 100644
--- a/lib/Transforms/Utils/InlineFunction.cpp
+++ b/lib/Transforms/Utils/InlineFunction.cpp
@@ -158,8 +158,7 @@ static void UpdateCallGraphAfterInlining(CallSite CS,
CallGraphNode::iterator I = CalleeNode->begin(), E = CalleeNode->end();
// Consider the case where CalleeNode == CallerNode.
- typedef std::pair<CallSite, CallGraphNode*> CallRecord;
- std::vector<CallRecord> CallCache;
+ CallGraphNode::CalledFunctionsVector CallCache;
if (CalleeNode == CallerNode) {
CallCache.assign(I, E);
I = CallCache.begin();