mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-02 00:36:36 +00:00
FINALLY be able to get symbolic type names in the globals graph!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12082 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a19ba52596
commit
7252939af0
@ -40,11 +40,17 @@ static std::string getCaption(const DSNode *N, const DSGraph *G) {
|
|||||||
std::stringstream OS;
|
std::stringstream OS;
|
||||||
Module *M = 0;
|
Module *M = 0;
|
||||||
|
|
||||||
if (G) G = N->getParentGraph();
|
if (!G) G = N->getParentGraph();
|
||||||
|
|
||||||
// Get the module from ONE of the functions in the graph it is available.
|
// Get the module from ONE of the functions in the graph it is available.
|
||||||
if (G && !G->getReturnNodes().empty())
|
if (G && !G->getReturnNodes().empty())
|
||||||
M = G->getReturnNodes().begin()->first->getParent();
|
M = G->getReturnNodes().begin()->first->getParent();
|
||||||
|
if (M == 0 && G) {
|
||||||
|
// If there is a global in the graph, we can use it to find the module.
|
||||||
|
const DSScalarMap &SM = G->getScalarMap();
|
||||||
|
if (SM.global_begin() != SM.global_end())
|
||||||
|
M = (*SM.global_begin())->getParent();
|
||||||
|
}
|
||||||
|
|
||||||
if (N->isNodeCompletelyFolded())
|
if (N->isNodeCompletelyFolded())
|
||||||
OS << "COLLAPSED";
|
OS << "COLLAPSED";
|
||||||
@ -108,6 +114,13 @@ struct DOTGraphTraits<const DSGraph*> : public DefaultDOTGraphTraits {
|
|||||||
Module *CurMod = 0;
|
Module *CurMod = 0;
|
||||||
if (!G->getReturnNodes().empty())
|
if (!G->getReturnNodes().empty())
|
||||||
CurMod = G->getReturnNodes().begin()->first->getParent();
|
CurMod = G->getReturnNodes().begin()->first->getParent();
|
||||||
|
else {
|
||||||
|
// If there is a global in the graph, we can use it to find the module.
|
||||||
|
const DSScalarMap &SM = G->getScalarMap();
|
||||||
|
if (SM.global_begin() != SM.global_end())
|
||||||
|
CurMod = (*SM.global_begin())->getParent();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Add scalar nodes to the graph...
|
// Add scalar nodes to the graph...
|
||||||
const DSGraph::ScalarMapTy &VM = G->getScalarMap();
|
const DSGraph::ScalarMapTy &VM = G->getScalarMap();
|
||||||
|
Loading…
Reference in New Issue
Block a user