Skip to content

Commit

Permalink
Allow FenceBase with empty mo
Browse files Browse the repository at this point in the history
Signed-off-by: Hernan Ponce de Leon <hernanl.leon@huawei.com>
  • Loading branch information
hernan-poncedeleon committed Sep 19, 2023
1 parent 78cdfb9 commit dc5ea4f
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@

import com.dat3m.dartagnan.program.event.Tag;
import com.dat3m.dartagnan.program.event.core.AbstractEvent;
import com.google.common.base.Preconditions;

@NoInterface
public abstract class FenceBase extends AbstractEvent {

protected final String name;
protected final String mo; // For fences that do not support a mo, use Fence instead.
protected final String mo; // May be NULL or empty for fences that do not support a mo.

public FenceBase(String name, String mo) {
Preconditions.checkArgument(!mo.isEmpty());
this.name = name;
this.mo = mo;
addTags(Tag.VISIBLE, Tag.FENCE, mo);
this.addTags(Tag.VISIBLE, Tag.FENCE);
if (mo != null && !mo.isEmpty()) {
addTags(mo);
}
}

protected FenceBase(FenceBase other) {
Expand Down

0 comments on commit dc5ea4f

Please sign in to comment.