projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplify some getNode calls.
[oota-llvm.git]
/
tools
/
opt
/
GraphPrinters.cpp
diff --git
a/tools/opt/GraphPrinters.cpp
b/tools/opt/GraphPrinters.cpp
index 5e8a859443cb502b9df527af1d32bcd3f4aeb1b5..867e33480879aafa2ab511d24ac8ab1115076404 100644
(file)
--- a/
tools/opt/GraphPrinters.cpp
+++ b/
tools/opt/GraphPrinters.cpp
@@
-2,8
+2,8
@@
//
// The LLVM Compiler Infrastructure
//
//
// The LLVM Compiler Infrastructure
//
-// This file
was developed by the LLVM research group and is distributed under
-//
the University of Illinois Open Source
License. See LICENSE.TXT for details.
+// This file
is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
//
//===----------------------------------------------------------------------===//
//
@@
-60,6
+60,9
@@
namespace llvm {
namespace {
struct CallGraphPrinter : public ModulePass {
namespace {
struct CallGraphPrinter : public ModulePass {
+ static char ID; // Pass ID, replacement for typeid
+ CallGraphPrinter() : ModulePass((intptr_t)&ID) {}
+
virtual bool runOnModule(Module &M) {
WriteGraphToFile(std::cerr, "callgraph", &getAnalysis<CallGraph>());
return false;
virtual bool runOnModule(Module &M) {
WriteGraphToFile(std::cerr, "callgraph", &getAnalysis<CallGraph>());
return false;
@@
-74,6
+77,7
@@
namespace {
}
};
}
};
+ char CallGraphPrinter::ID = 0;
RegisterPass<CallGraphPrinter> P2("print-callgraph",
"Print Call Graph to 'dot' file");
}
RegisterPass<CallGraphPrinter> P2("print-callgraph",
"Print Call Graph to 'dot' file");
}