Fixed "flatten" for non-pre-derived modules
authorClifford Wolf <clifford@clifford.at>
Sat, 21 Feb 2015 14:01:13 +0000 (15:01 +0100)
committerClifford Wolf <clifford@clifford.at>
Sat, 21 Feb 2015 14:01:13 +0000 (15:01 +0100)
passes/techmap/techmap.cc

index 8435d3a32faca813928c9e4edec21f00dbc30149..87e736bda32fca56be402e08c29457a0445d207d 100644 (file)
@@ -1088,7 +1088,7 @@ struct FlattenPass : public Pass {
                                if (worker.techmap_module(design, top_mod, design, handled_cells, celltypeMap, false))
                                        did_something = true;
                        } else {
-                               for (auto mod : design->modules())
+                               for (auto mod : vector<Module*>(design->modules()))
                                        if (worker.techmap_module(design, mod, design, handled_cells, celltypeMap, false))
                                                did_something = true;
                        }
@@ -1098,7 +1098,7 @@ struct FlattenPass : public Pass {
 
                if (top_mod != NULL) {
                        dict<RTLIL::IdString, RTLIL::Module*> new_modules;
-                       for (auto mod : design->modules())
+                       for (auto mod : vector<Module*>(design->modules()))
                                if (mod == top_mod || mod->get_bool_attribute("\\blackbox")) {
                                        new_modules[mod->name] = mod;
                                } else {