diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-04-22 10:36:27 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-04-22 10:36:27 -0700 |
commit | e300b1922c13b939231072e83f0ae5c5ff6a558b (patch) | |
tree | 20c8ffe7a42a4aa2ae9195957e287c875c3a0594 /passes/techmap/attrmap.cc | |
parent | d342b5b135a85da0df5df0fa2acc25dec5605760 (diff) | |
parent | 9050b5e1915b05f55c1db279566f34202905f02a (diff) | |
download | yosys-e300b1922c13b939231072e83f0ae5c5ff6a558b.tar.gz yosys-e300b1922c13b939231072e83f0ae5c5ff6a558b.tar.bz2 yosys-e300b1922c13b939231072e83f0ae5c5ff6a558b.zip |
Merge remote-tracking branch 'origin/master' into xc7srl
Diffstat (limited to 'passes/techmap/attrmap.cc')
-rw-r--r-- | passes/techmap/attrmap.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/passes/techmap/attrmap.cc b/passes/techmap/attrmap.cc index 0b5576b06..aa48e1125 100644 --- a/passes/techmap/attrmap.cc +++ b/passes/techmap/attrmap.cc @@ -111,9 +111,10 @@ struct AttrmapMap : AttrmapAction { }; struct AttrmapRemove : AttrmapAction { + bool has_value; string name, value; bool apply(IdString &id, Const &val) YS_OVERRIDE { - return !(match_name(name, id) && match_value(value, val)); + return !(match_name(name, id) && (!has_value || match_value(value, val))); } }; @@ -235,6 +236,7 @@ struct AttrmapPass : public Pass { } auto action = new AttrmapRemove; action->name = arg1; + action->has_value = (p != string::npos); action->value = val1; actions.push_back(std::unique_ptr<AttrmapAction>(action)); continue; |