mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-05 19:29:54 +00:00
[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:
parent
8682b372bb
commit
470962f413
@ -94,8 +94,8 @@ class CallGraphSCC {
|
|||||||
public:
|
public:
|
||||||
CallGraphSCC(CallGraph &cg, void *context) : CG(cg), Context(context) {}
|
CallGraphSCC(CallGraph &cg, void *context) : CG(cg), Context(context) {}
|
||||||
|
|
||||||
void initialize(CallGraphNode *const *I, CallGraphNode *const *E) {
|
void initialize(ArrayRef<CallGraphNode *> NewNodes) {
|
||||||
Nodes.assign(I, E);
|
Nodes.assign(NewNodes.begin(), NewNodes.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isSingular() const { return Nodes.size() == 1; }
|
bool isSingular() const { return Nodes.size() == 1; }
|
||||||
|
@ -450,7 +450,7 @@ bool CGPassManager::runOnModule(Module &M) {
|
|||||||
// Copy the current SCC and increment past it so that the pass can hack
|
// 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.
|
// on the SCC if it wants to without invalidating our iterator.
|
||||||
const std::vector<CallGraphNode *> &NodeVec = *CGI;
|
const std::vector<CallGraphNode *> &NodeVec = *CGI;
|
||||||
CurSCC.initialize(NodeVec.data(), NodeVec.data() + NodeVec.size());
|
CurSCC.initialize(NodeVec);
|
||||||
++CGI;
|
++CGI;
|
||||||
|
|
||||||
// At the top level, we run all the passes in this pass manager on the
|
// At the top level, we run all the passes in this pass manager on the
|
||||||
|
Loading…
Reference in New Issue
Block a user