Allow $specify[23] cells in blackbox modules
authorClifford Wolf <clifford@clifford.at>
Mon, 22 Apr 2019 07:59:49 +0000 (09:59 +0200)
committerClifford Wolf <clifford@clifford.at>
Tue, 23 Apr 2019 19:36:59 +0000 (21:36 +0200)
Signed-off-by: Clifford Wolf <clifford@clifford.at>
frontends/ast/ast.cc

index 9f88b08c1243d5fb82f6c777c4285c99df70c161..6b3604ee531610925706908c1c3f2e8376822219 100644 (file)
@@ -951,6 +951,9 @@ static AstModule* process_module(AstNode *ast, bool defer, AstNode *original_ast
                                        continue;
                                if (child->type == AST_PARAMETER || child->type == AST_LOCALPARAM)
                                        continue;
+                               if (child->type == AST_CELL && child->children.size() > 0 && child->children[0]->type == AST_CELLTYPE &&
+                                               (child->children[0]->str == "$specify2" || child->children[0]->str == "$specify3"))
+                                       continue;
                                blackbox_module = false;
                                break;
                        }
@@ -1035,6 +1038,9 @@ static AstModule* process_module(AstNode *ast, bool defer, AstNode *original_ast
                                        child->delete_children();
                                        child->children.push_back(AstNode::mkconst_int(0, false, 0));
                                        new_children.push_back(child);
+                               } else if (child->type == AST_CELL && child->children.size() > 0 && child->children[0]->type == AST_CELLTYPE &&
+                                               (child->children[0]->str == "$specify2" || child->children[0]->str == "$specify3")) {
+                                       new_children.push_back(child);
                                } else {
                                        delete child;
                                }