diff options
author | Artem Dergachev <artem.dergachev@gmail.com> | 2018-12-03 22:19:05 +0000 |
---|---|---|
committer | Artem Dergachev <artem.dergachev@gmail.com> | 2018-12-03 22:19:05 +0000 |
commit | 057647d8783c01301a84bc09c9e5b667460c1ceb (patch) | |
tree | 131e536606573ac1177f2c9f130ca4d4db3ec041 /clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp | |
parent | d3942beb463a87ffa30d565af338b3972462600c (diff) | |
download | bcm5719-llvm-057647d8783c01301a84bc09c9e5b667460c1ceb.tar.gz bcm5719-llvm-057647d8783c01301a84bc09c9e5b667460c1ceb.zip |
[AST] [analyzer] NFC: Reuse code in stable ID dumping methods.
Use the new fancy method introduced in r348197 to simplify some code.
Differential Revision: https://reviews.llvm.org/D54488
llvm-svn: 348199
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp b/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp index d76710004c8..d6bcbb96b55 100644 --- a/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp @@ -284,10 +284,7 @@ ExplodedNode * const *ExplodedNode::NodeGroup::end() const { } int64_t ExplodedNode::getID(ExplodedGraph *G) const { - Optional<int64_t> Out = G->getAllocator().identifyObject(this); - assert(Out && "Wrong allocator used"); - assert(*Out % alignof(ExplodedNode) == 0 && "Wrong alignment information"); - return *Out / alignof(ExplodedNode); + return G->getAllocator().identifyKnownAlignedObject<ExplodedNode>(this); } bool ExplodedNode::isTrivial() const { |