[llvm] [Sample Profile Loader] Fix potential invalidated reference (PR #73181)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 22 14:50:27 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 227654e87117d7705c78e0ad1d4d9261bbc6af55 9265d2ae3ef1b4d12f57b879b5f1e512ec507618 -- llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h b/llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h
index 3d844cc92a..32f8b42f23 100644
--- a/llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h
+++ b/llvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h
@@ -155,8 +155,8 @@ private:
auto CalleeIt = ProfiledFunctions.find(CalleeName);
if (CalleeIt == ProfiledFunctions.end())
return;
- ProfiledCallGraphEdge Edge(ProfiledFunctions[CallerName],
- CalleeIt->second, Weight);
+ ProfiledCallGraphEdge Edge(ProfiledFunctions[CallerName], CalleeIt->second,
+ Weight);
auto &Edges = ProfiledFunctions[CallerName]->Edges;
auto EdgeIt = Edges.find(Edge);
if (EdgeIt == Edges.end()) {
@@ -210,7 +210,7 @@ private:
ProfiledCallGraphNode Root;
// backing buffer for ProfiledCallGraphNodes.
std::list<ProfiledCallGraphNode> ProfiledCallGraphNodeList;
- llvm::DenseMap<FunctionId, ProfiledCallGraphNode*> ProfiledFunctions;
+ llvm::DenseMap<FunctionId, ProfiledCallGraphNode *> ProfiledFunctions;
};
} // end namespace sampleprof
``````````
</details>
https://github.com/llvm/llvm-project/pull/73181
More information about the llvm-commits
mailing list