R600: Replace dyn_cast + assert with cast
[oota-llvm.git] / tools / bugpoint / bugpoint.cpp
index f664a07a990de01619e6feeb629d1dc3c79c6469..5c03b41abbeecbf8b80102ee7845633335cbbfba 100644 (file)
@@ -101,7 +101,7 @@ namespace {
   public:
     AddToDriver(BugDriver &_D) : FunctionPassManager(0), D(_D) {}
 
-    virtual void add(Pass *P) {
+    void add(Pass *P) override {
       const void *ID = P->getPassID();
       const PassInfo *PI = PassRegistry::getPassRegistry()->getPassInfo(ID);
       D.addPass(PI->getPassArgument());
@@ -109,6 +109,12 @@ namespace {
   };
 }
 
+#ifdef LINK_POLLY_INTO_TOOLS
+namespace polly {
+void initializePollyPasses(llvm::PassRegistry &Registry);
+}
+#endif
+
 int main(int argc, char **argv) {
 #ifndef DEBUG_BUGPOINT
   llvm::sys::PrintStackTraceOnErrorSignal();
@@ -130,6 +136,10 @@ int main(int argc, char **argv) {
   initializeInstrumentation(Registry);
   initializeTarget(Registry);
 
+#ifdef LINK_POLLY_INTO_TOOLS
+  polly::initializePollyPasses(Registry);
+#endif
+
   cl::ParseCommandLineOptions(argc, argv,
                               "LLVM automatic testcase reducer. See\nhttp://"
                               "llvm.org/cmds/bugpoint.html"