[llvm-commits] [llvm] r111596 - in /llvm/trunk/tools: bugpoint-passes/TestPasses.cpp opt/AnalysisWrappers.cpp opt/GraphPrinters.cpp
Dan Gohman
gohman at apple.com
Thu Aug 19 17:56:16 PDT 2010
Author: djg
Date: Thu Aug 19 19:56:16 2010
New Revision: 111596
URL: http://llvm.org/viewvc/llvm-project?rev=111596&view=rev
Log:
Minor cleanups to follow the common convention for pass
registration variables.
Modified:
llvm/trunk/tools/bugpoint-passes/TestPasses.cpp
llvm/trunk/tools/opt/AnalysisWrappers.cpp
llvm/trunk/tools/opt/GraphPrinters.cpp
Modified: llvm/trunk/tools/bugpoint-passes/TestPasses.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint-passes/TestPasses.cpp?rev=111596&r1=111595&r2=111596&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint-passes/TestPasses.cpp (original)
+++ llvm/trunk/tools/bugpoint-passes/TestPasses.cpp Thu Aug 19 19:56:16 2010
@@ -41,12 +41,12 @@
return false;
}
};
+}
- char CrashOnCalls::ID = 0;
- RegisterPass<CrashOnCalls>
+char CrashOnCalls::ID = 0;
+static RegisterPass<CrashOnCalls>
X("bugpoint-crashcalls",
"BugPoint Test Pass - Intentionally crash on CallInsts");
-}
namespace {
/// DeleteCalls - This pass is used to test bugpoint. It intentionally
@@ -67,9 +67,9 @@
return false;
}
};
+}
- char DeleteCalls::ID = 0;
- RegisterPass<DeleteCalls>
+char DeleteCalls::ID = 0;
+static RegisterPass<DeleteCalls>
Y("bugpoint-deletecalls",
"BugPoint Test Pass - Intentionally 'misoptimize' CallInsts");
-}
Modified: llvm/trunk/tools/opt/AnalysisWrappers.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/AnalysisWrappers.cpp?rev=111596&r1=111595&r2=111596&view=diff
==============================================================================
--- llvm/trunk/tools/opt/AnalysisWrappers.cpp (original)
+++ llvm/trunk/tools/opt/AnalysisWrappers.cpp Thu Aug 19 19:56:16 2010
@@ -66,12 +66,14 @@
AU.setPreservesAll();
}
};
+}
- char ExternalFunctionsPassedConstants::ID = 0;
- RegisterPass<ExternalFunctionsPassedConstants>
+char ExternalFunctionsPassedConstants::ID = 0;
+static RegisterPass<ExternalFunctionsPassedConstants>
P1("print-externalfnconstants",
"Print external fn callsites passed constants");
+namespace {
struct CallGraphPrinter : public ModulePass {
static char ID; // Pass ID, replacement for typeid
CallGraphPrinter() : ModulePass(ID) {}
@@ -85,8 +87,8 @@
return false;
}
};
-
- char CallGraphPrinter::ID = 0;
- RegisterPass<CallGraphPrinter>
- P2("print-callgraph", "Print a call graph");
}
+
+char CallGraphPrinter::ID = 0;
+static RegisterPass<CallGraphPrinter>
+ P2("print-callgraph", "Print a call graph");
Modified: llvm/trunk/tools/opt/GraphPrinters.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/GraphPrinters.cpp?rev=111596&r1=111595&r2=111596&view=diff
==============================================================================
--- llvm/trunk/tools/opt/GraphPrinters.cpp (original)
+++ llvm/trunk/tools/opt/GraphPrinters.cpp Thu Aug 19 19:56:16 2010
@@ -79,12 +79,12 @@
AU.setPreservesAll();
}
};
-
- char CallGraphPrinter::ID = 0;
- RegisterPass<CallGraphPrinter> P2("dot-callgraph",
- "Print Call Graph to 'dot' file");
}
+char CallGraphPrinter::ID = 0;
+static RegisterPass<CallGraphPrinter> P2("dot-callgraph",
+ "Print Call Graph to 'dot' file");
+
//===----------------------------------------------------------------------===//
// DomInfoPrinter Pass
//===----------------------------------------------------------------------===//
@@ -110,8 +110,8 @@
return false;
}
};
-
- char DomInfoPrinter::ID = 0;
- static RegisterPass<DomInfoPrinter>
- DIP("print-dom-info", "Dominator Info Printer", true, true);
}
+
+char DomInfoPrinter::ID = 0;
+static RegisterPass<DomInfoPrinter>
+DIP("print-dom-info", "Dominator Info Printer", true, true);
More information about the llvm-commits
mailing list