mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-12 14:20:33 +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:
|
||||
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; }
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user