diff options
author | Vedant Kumar <vsk@apple.com> | 2019-09-30 21:20:14 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2019-09-30 21:20:14 +0000 |
commit | c03c2e886ee0743722f2bf1e6d3a2e85eb9c30b5 (patch) | |
tree | 0ecf53be8f6f1608eb6c3271704e6e5a489e6540 /lldb/source/Target/StackFrameList.cpp | |
parent | d072cd059d28acf5bb4bda95c551a370c9cff1dc (diff) | |
download | bcm5719-llvm-c03c2e886ee0743722f2bf1e6d3a2e85eb9c30b5.tar.gz bcm5719-llvm-c03c2e886ee0743722f2bf1e6d3a2e85eb9c30b5.zip |
[StackFrameList][DFS] Turn a few raw pointers into references, NFC
llvm-svn: 373267
Diffstat (limited to 'lldb/source/Target/StackFrameList.cpp')
-rw-r--r-- | lldb/source/Target/StackFrameList.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lldb/source/Target/StackFrameList.cpp b/lldb/source/Target/StackFrameList.cpp index fbced5fd132..6d0c46259c2 100644 --- a/lldb/source/Target/StackFrameList.cpp +++ b/lldb/source/Target/StackFrameList.cpp @@ -286,15 +286,15 @@ static void FindInterveningFrames(Function &begin, Function &end, DFS(Function *end, ModuleList &images) : end(end), images(images) {} - void search(Function *first_callee, std::vector<Function *> &path) { + void search(Function &first_callee, std::vector<Function *> &path) { dfs(first_callee); if (!ambiguous) path = std::move(solution_path); } - void dfs(Function *callee) { + void dfs(Function &callee) { // Found a path to the target function. - if (callee == end) { + if (&callee == end) { if (solution_path.empty()) solution_path = active_path; else @@ -306,19 +306,19 @@ static void FindInterveningFrames(Function &begin, Function &end, // there's more than one way to reach a target. This errs on the side of // caution: it conservatively stops searching when some solutions are // still possible to save time in the average case. - if (!visited_nodes.insert(callee).second) { + if (!visited_nodes.insert(&callee).second) { ambiguous = true; return; } // Search the calls made from this callee. - active_path.push_back(callee); - for (CallEdge &edge : callee->GetTailCallingEdges()) { + active_path.push_back(&callee); + for (CallEdge &edge : callee.GetTailCallingEdges()) { Function *next_callee = edge.GetCallee(images); if (!next_callee) continue; - dfs(next_callee); + dfs(*next_callee); if (ambiguous) return; } @@ -326,7 +326,7 @@ static void FindInterveningFrames(Function &begin, Function &end, } }; - DFS(&end, images).search(first_callee, path); + DFS(&end, images).search(*first_callee, path); } /// Given that \p next_frame will be appended to the frame list, synthesize |