mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-12 13:30:51 +00:00
finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12862 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ce1a3a292d
commit
27829ec5ff
@ -19,8 +19,7 @@
|
||||
#include "llvm/Value.h"
|
||||
#include "llvm/Analysis/CallGraph.h"
|
||||
#include <fstream>
|
||||
|
||||
namespace llvm {
|
||||
using namespace llvm;
|
||||
|
||||
template<typename GraphType>
|
||||
static void WriteGraphToFile(std::ostream &O, const std::string &GraphName,
|
||||
@ -41,19 +40,21 @@ static void WriteGraphToFile(std::ostream &O, const std::string &GraphName,
|
||||
// Call Graph Printer
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
template<>
|
||||
struct DOTGraphTraits<CallGraph*> : public DefaultDOTGraphTraits {
|
||||
static std::string getGraphName(CallGraph *F) {
|
||||
return "Call Graph";
|
||||
}
|
||||
|
||||
static std::string getNodeLabel(CallGraphNode *Node, CallGraph *Graph) {
|
||||
if (Node->getFunction())
|
||||
return ((Value*)Node->getFunction())->getName();
|
||||
else
|
||||
return "Indirect call node";
|
||||
}
|
||||
};
|
||||
namespace llvm {
|
||||
template<>
|
||||
struct DOTGraphTraits<CallGraph*> : public DefaultDOTGraphTraits {
|
||||
static std::string getGraphName(CallGraph *F) {
|
||||
return "Call Graph";
|
||||
}
|
||||
|
||||
static std::string getNodeLabel(CallGraphNode *Node, CallGraph *Graph) {
|
||||
if (Node->getFunction())
|
||||
return ((Value*)Node->getFunction())->getName();
|
||||
else
|
||||
return "Indirect call node";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
@ -74,5 +75,3 @@ namespace {
|
||||
RegisterAnalysis<CallGraphPrinter> P2("print-callgraph",
|
||||
"Print Call Graph to 'dot' file");
|
||||
};
|
||||
|
||||
} // End llvm namespace
|
||||
|
@ -19,8 +19,7 @@
|
||||
#include "llvm/Value.h"
|
||||
#include "llvm/Analysis/CallGraph.h"
|
||||
#include <fstream>
|
||||
|
||||
namespace llvm {
|
||||
using namespace llvm;
|
||||
|
||||
template<typename GraphType>
|
||||
static void WriteGraphToFile(std::ostream &O, const std::string &GraphName,
|
||||
@ -41,19 +40,21 @@ static void WriteGraphToFile(std::ostream &O, const std::string &GraphName,
|
||||
// Call Graph Printer
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
template<>
|
||||
struct DOTGraphTraits<CallGraph*> : public DefaultDOTGraphTraits {
|
||||
static std::string getGraphName(CallGraph *F) {
|
||||
return "Call Graph";
|
||||
}
|
||||
|
||||
static std::string getNodeLabel(CallGraphNode *Node, CallGraph *Graph) {
|
||||
if (Node->getFunction())
|
||||
return ((Value*)Node->getFunction())->getName();
|
||||
else
|
||||
return "Indirect call node";
|
||||
}
|
||||
};
|
||||
namespace llvm {
|
||||
template<>
|
||||
struct DOTGraphTraits<CallGraph*> : public DefaultDOTGraphTraits {
|
||||
static std::string getGraphName(CallGraph *F) {
|
||||
return "Call Graph";
|
||||
}
|
||||
|
||||
static std::string getNodeLabel(CallGraphNode *Node, CallGraph *Graph) {
|
||||
if (Node->getFunction())
|
||||
return ((Value*)Node->getFunction())->getName();
|
||||
else
|
||||
return "Indirect call node";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
@ -74,5 +75,3 @@ namespace {
|
||||
RegisterAnalysis<CallGraphPrinter> P2("print-callgraph",
|
||||
"Print Call Graph to 'dot' file");
|
||||
};
|
||||
|
||||
} // End llvm namespace
|
||||
|
Loading…
Reference in New Issue
Block a user