diff options
| author | Mikhail Glushenkov <foldr@codedgers.com> | 2008-05-06 16:35:25 +0000 |
|---|---|---|
| committer | Mikhail Glushenkov <foldr@codedgers.com> | 2008-05-06 16:35:25 +0000 |
| commit | adcb08d1b3e6c40b71422da04f0ec656b9fea993 (patch) | |
| tree | 8f8889483e8e76075502595869a23857bda5ed1b /llvm/tools/llvmc2/llvmc.cpp | |
| parent | 8190616359e0c8912ddf6bfbd83d59057666b5f3 (diff) | |
| download | bcm5719-llvm-adcb08d1b3e6c40b71422da04f0ec656b9fea993.tar.gz bcm5719-llvm-adcb08d1b3e6c40b71422da04f0ec656b9fea993.zip | |
Convert internal representation to use DAG. This gives us more flexibility and enables future improvements.
llvm-svn: 50724
Diffstat (limited to 'llvm/tools/llvmc2/llvmc.cpp')
| -rw-r--r-- | llvm/tools/llvmc2/llvmc.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/llvm/tools/llvmc2/llvmc.cpp b/llvm/tools/llvmc2/llvmc.cpp index feed61f89f1..65f5e114551 100644 --- a/llvm/tools/llvmc2/llvmc.cpp +++ b/llvm/tools/llvmc2/llvmc.cpp @@ -28,13 +28,21 @@ namespace cl = llvm::cl; namespace sys = llvm::sys; using namespace llvmcc; +// Built-in command-line options. // External linkage here is intentional. -cl::list<std::string> InputFilenames(cl::Positional, - cl::desc("<input file>"), cl::OneOrMore); + +cl::list<std::string> InputFilenames(cl::Positional, cl::desc("<input file>"), + cl::OneOrMore); cl::opt<std::string> OutputFilename("o", cl::desc("Output file name"), cl::value_desc("file")); -cl::opt<bool> VerboseMode("v", cl::desc("Enable verbose mode")); - +cl::opt<bool> VerboseMode("v", + cl::desc("Enable verbose mode")); +cl::opt<bool> WriteGraph("write-graph", + cl::desc("Write CompilationGraph.dot file"), + cl::Hidden); +cl::opt<bool> ViewGraph("view-graph", + cl::desc("Show compilation graph in GhostView"), + cl::Hidden); namespace { int BuildTargets(const CompilationGraph& graph) { @@ -61,6 +69,12 @@ int main(int argc, char** argv) { cl::ParseCommandLineOptions(argc, argv, "LLVM Compiler Driver(Work In Progress)"); PopulateCompilationGraph(graph); + + if(WriteGraph) + graph.writeGraph(); + if(ViewGraph) + graph.viewGraph(); + return BuildTargets(graph); } catch(const std::exception& ex) { |

