projects
/
cdsspec-compiler.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3864415
)
cyclegraph: add ASSERT() for reflexive edges
author
Brian Norris
<banorris@uci.edu>
Tue, 18 Sep 2012 20:24:47 +0000
(13:24 -0700)
committer
Brian Norris
<banorris@uci.edu>
Tue, 18 Sep 2012 20:24:47 +0000
(13:24 -0700)
cyclegraph.cc
patch
|
blob
|
history
diff --git
a/cyclegraph.cc
b/cyclegraph.cc
index ecf8a781c2770ebd09766cff47030e3e094bd2d7..2bfe76ac424c274bf8152638543ad7dd6bc1d31f 100644
(file)
--- a/
cyclegraph.cc
+++ b/
cyclegraph.cc
@@
-41,6
+41,7
@@
CycleNode * CycleGraph::getNode(const ModelAction *action) {
void CycleGraph::addEdge(const ModelAction *from, const ModelAction *to) {
ASSERT(from);
ASSERT(to);
+ ASSERT(from != to);
CycleNode *fromnode=getNode(from);
CycleNode *tonode=getNode(to);
@@
-82,6
+83,7
@@
void CycleGraph::addEdge(const ModelAction *from, const ModelAction *to) {
void CycleGraph::addRMWEdge(const ModelAction *from, const ModelAction *rmw) {
ASSERT(from);
ASSERT(rmw);
+ ASSERT(from != rmw);
CycleNode *fromnode=getNode(from);
CycleNode *rmwnode=getNode(rmw);