本文整理汇总了C++中function::Ptr::address方法的典型用法代码示例。如果您正苦于以下问题:C++ Ptr::address方法的具体用法?C++ Ptr::address怎么用?C++ Ptr::address使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类function::Ptr
的用法示例。
在下文中一共展示了Ptr::address方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: edgeOrganization
void
CfgEmitter::selectFunctionCallees(const Function::Ptr &function) {
// Use an iteration rather than a traversal because we want to consider all vertices that belong to the function, including
// those not reachable from the entry vertex.
BOOST_FOREACH (const ControlFlowGraph::VertexNode &vertex, graph_.vertices()) {
if (vertexOrganization(vertex).isSelected() && owningFunction(vertex) == function) {
BOOST_FOREACH (const ControlFlowGraph::EdgeNode &edge, vertex.outEdges()) {
if (isInterFunctionEdge(edge)) {
if (!edgeOrganization(edge).isSelected()) {
edgeOrganization(edge).select();
edgeOrganization(edge).label(edgeLabel(edge));
edgeOrganization(edge).attributes(edgeAttributes(edge));
}
Organization &tgt = vertexOrganization(edge.target());
if (!tgt.isSelected()) {
tgt.select();
Function::Ptr callee = owningFunction(edge.target());
if (callee && edge.target()->value().type() == V_BASIC_BLOCK &&
edge.target()->value().address() == callee->address()) {
// target is the entry block of a function
tgt.label(functionLabel(callee));
tgt.attributes(functionAttributes(callee));
} else {
// target is some block that isn't a function entry
tgt.label(vertexLabel(edge.target()));
tgt.attributes(vertexAttributes(edge.target()));
}
}
}
}
}
}
示例2:
bool
sortFunctionsByAddress(const Function::Ptr &a, const Function::Ptr &b) {
ASSERT_not_null(a);
ASSERT_not_null(b);
return a->address() < b->address();
}