[CallGraphSCCPass] Use an ArrayRef instead of a pair of iterators

No functional change is intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277913 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Majnemer 2016-08-06 06:21:02 +00:00
parent 8682b372bb
commit 470962f413
2 changed files with 3 additions and 3 deletions

View File

@ -94,8 +94,8 @@ class CallGraphSCC {
public:
CallGraphSCC(CallGraph &cg, void *context) : CG(cg), Context(context) {}
void initialize(CallGraphNode *const *I, CallGraphNode *const *E) {
Nodes.assign(I, E);
void initialize(ArrayRef<CallGraphNode *> NewNodes) {
Nodes.assign(NewNodes.begin(), NewNodes.end());
}
bool isSingular() const { return Nodes.size() == 1; }

View File

@ -450,7 +450,7 @@ bool CGPassManager::runOnModule(Module &M) {
// Copy the current SCC and increment past it so that the pass can hack
// on the SCC if it wants to without invalidating our iterator.
const std::vector<CallGraphNode *> &NodeVec = *CGI;
CurSCC.initialize(NodeVec.data(), NodeVec.data() + NodeVec.size());
CurSCC.initialize(NodeVec);
++CGI;
// At the top level, we run all the passes in this pass manager on the