diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-04-25 18:24:50 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-04-25 18:24:50 +0000 |
commit | d2b2facb0783864bab79b059e28b9d430e291b2c (patch) | |
tree | a4bc8cc634abec2bc9f6a530f3434bf12107ae56 /llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp | |
parent | f4e1d6fd0690be462b5d7aabc93e7c12cac629b8 (diff) | |
download | bcm5719-llvm-d2b2facb0783864bab79b059e28b9d430e291b2c.tar.gz bcm5719-llvm-d2b2facb0783864bab79b059e28b9d430e291b2c.zip |
SCC: Change clients to use const, NFC
It's fishy to be changing the `std::vector<>` owned by the iterator, and
no one actual does it, so I'm going to remove the ability in a
subsequent commit. First, update the users.
<rdar://problem/14292693>
llvm-svn: 207252
Diffstat (limited to 'llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp')
-rw-r--r-- | llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp b/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp index 498bc148a0b..fa9159d13d4 100644 --- a/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp +++ b/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp @@ -435,8 +435,8 @@ bool CGPassManager::runOnModule(Module &M) { while (!CGI.isAtEnd()) { // 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. - std::vector<CallGraphNode*> &NodeVec = *CGI; - CurSCC.initialize(&NodeVec[0], &NodeVec[0]+NodeVec.size()); + const std::vector<CallGraphNode *> &NodeVec = *CGI; + CurSCC.initialize(NodeVec.data(), NodeVec.data() + NodeVec.size()); ++CGI; // At the top level, we run all the passes in this pass manager on the |