mirror of https://github.com/llvm/circt.git
[PyCDE] Fix two minor issues after merging latest PRs.
First, some code that attempted to store into an instance variable that no longer exists. This should have been included in the last PR. Second, flush the stderr stream in the new struct fields test. This may not have been necessary on its own before, but in my testing with both PRs integrated, I was observing the struct fields showing up after the other output, and FileCheck failing. After these two minor fixes, the tests pass.
This commit is contained in:
parent
26acd29cb6
commit
70e7402caf
|
@ -64,7 +64,6 @@ class _Types:
|
||||||
if len(type_scopes) == 0:
|
if len(type_scopes) == 0:
|
||||||
with mlir.ir.InsertionPoint.at_block_begin(mod.body):
|
with mlir.ir.InsertionPoint.at_block_begin(mod.body):
|
||||||
type_scopes.append(hw.TypeScopeOp.create(self.TYPE_SCOPE))
|
type_scopes.append(hw.TypeScopeOp.create(self.TYPE_SCOPE))
|
||||||
self.declared_aliases[mod] = set([])
|
|
||||||
|
|
||||||
assert len(type_scopes) == 1
|
assert len(type_scopes) == 1
|
||||||
type_scope = type_scopes[0]
|
type_scope = type_scopes[0]
|
||||||
|
|
|
@ -8,6 +8,7 @@ import sys
|
||||||
st1 = types.struct({"foo": types.i1, "bar": types.i13})
|
st1 = types.struct({"foo": types.i1, "bar": types.i13})
|
||||||
fields = st1.get_fields()
|
fields = st1.get_fields()
|
||||||
sys.stderr.write(str(fields) + "\n")
|
sys.stderr.write(str(fields) + "\n")
|
||||||
|
sys.stderr.flush()
|
||||||
st1.get_field("foo").dump()
|
st1.get_field("foo").dump()
|
||||||
print()
|
print()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue