Skip to content

Commit d5bfb25

Browse files
Address a comment.
1 parent 2d31c71 commit d5bfb25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,11 @@ class ProfiledCallGraph {
150150
private:
151151
void addProfiledCall(FunctionId CallerName, FunctionId CalleeName,
152152
uint64_t Weight = 0) {
153-
auto CallerIt = ProfiledFunctions.find(CallerName);
154-
assert(CallerIt != ProfiledFunctions.end());
155153
auto CalleeIt = ProfiledFunctions.find(CalleeName);
156154
if (CalleeIt == ProfiledFunctions.end())
157155
return;
156+
auto CallerIt = ProfiledFunctions.find(CallerName);
157+
assert(CallerIt != ProfiledFunctions.end());
158158
ProfiledCallGraphEdge Edge(CallerIt->second, CalleeIt->second, Weight);
159159
auto &Edges = CallerIt->second->Edges;
160160
auto [EdgeIt, Inserted] = Edges.insert(Edge);

0 commit comments

Comments
 (0)