summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-06-13 19:55:50 +0000
committerChris Lattner <sabre@nondot.org>2001-06-13 19:55:50 +0000
commit526f97e7a3fab200b7afb64b84866a7d009a6a73 (patch)
treebca82aea83c2e5377fbb96fb46c51484df184bc5 /tools
parent9bff2e952226a80b65a993a81e87abe5216ffc48 (diff)
downloadllvm-526f97e7a3fab200b7afb64b84866a7d009a6a73.tar.gz
llvm-526f97e7a3fab200b7afb64b84866a7d009a6a73.tar.bz2
llvm-526f97e7a3fab200b7afb64b84866a7d009a6a73.tar.xz
Removed silly test code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/opt/opt.cpp26
1 files changed, 4 insertions, 22 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index ff513d75a3..9485562ab1 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -16,8 +16,6 @@
//
// TODO: Add a -all option to keep applying all optimizations until the program
// stops permuting.
-// TODO: Add a -h command line arg that prints all available optimizations
-// TODO: Add a -q command line arg that quiets "XXX pass made modifications"
//
//===------------------------------------------------------------------------===
@@ -29,25 +27,6 @@
#include "llvm/Tools/CommandLine.h"
#include "llvm/Opt/AllOpts.h"
-#if 1 // Testcase, TODO: REMOVE
-#include "llvm/CFG.h"
-#include "llvm/Assembly/Writer.h"
-#include "llvm/Method.h"
-static bool DoPrintM(Method *M) {
- df_iterator I = df_begin(M->getBasicBlocks().front(), false);
- df_iterator E = df_end(M->getBasicBlocks().front());
- unsigned i = 0;
- for (; I != E; ++I, ++i) {
- cerr << "Basic Block Visited #" << i << *I;
- }
- return false;
-}
-
-static bool DoPrint(Module *C) {
- return ApplyOptToAllMethods(C, DoPrintM);
-}
-#endif
-
struct {
const string ArgName, Name;
bool (*OptPtr)(Module *C);
@@ -57,7 +36,6 @@ struct {
{ "-inline" ,"Method Inlining", DoMethodInlining },
{ "-strip" ,"Strip Symbols", DoSymbolStripping },
{ "-mstrip" ,"Strip Module Symbols", DoFullSymbolStripping },
- { "-print" ,"Test printing stuff", DoPrint },
};
int main(int argc, char **argv) {
@@ -68,6 +46,10 @@ int main(int argc, char **argv) {
if (string(argv[i]) == string("--help")) {
cerr << argv[0] << " usage:\n"
<< " " << argv[0] << " --help - Print this usage information\n";
+ for (unsigned j = 0; j < sizeof(OptTable)/sizeof(OptTable[0]); ++j) {
+ cerr << "\t" << OptTable[j].ArgName << "\t - Enable "
+ << OptTable[j].Name << endl;
+ }
return 1;
} else if (string(argv[i]) == string("-q")) {
Quiet = true; argv[i] = 0;