diff options
author | Nathan Binkert <nate@binkert.org> | 2010-03-10 16:22:26 -0800 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-03-10 16:22:26 -0800 |
commit | cf86532857ba1e199db6ff16541e7242c6225ff0 (patch) | |
tree | e107e443364bd326d791d2c19e126986cf4aa022 /src/mem/slicc/symbols/Type.py | |
parent | 1068ca85d0a29bfa71dc6a21a8d6c8888dce4bc3 (diff) | |
download | gem5-cf86532857ba1e199db6ff16541e7242c6225ff0.tar.xz |
slicc: have a central mechanism for creating a code_formatter.
This makes it easier to add global variables like protocol
Diffstat (limited to 'src/mem/slicc/symbols/Type.py')
-rw-r--r-- | src/mem/slicc/symbols/Type.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mem/slicc/symbols/Type.py b/src/mem/slicc/symbols/Type.py index 41032e233..3f39ec208 100644 --- a/src/mem/slicc/symbols/Type.py +++ b/src/mem/slicc/symbols/Type.py @@ -25,7 +25,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -from m5.util import code_formatter, orderdict +from m5.util import orderdict from slicc.util import PairContainer from slicc.symbols.Symbol import Symbol @@ -191,7 +191,7 @@ class Type(Symbol): self.printTypeCC(path) def printTypeHH(self, path): - code = code_formatter() + code = self.symtab.codeFormatter() code(''' /** \\file ${{self.c_ident}}.hh * @@ -375,7 +375,7 @@ ostream& operator<<(ostream& out, const ${{self.c_ident}}& obj) code.write(path, "%s.hh" % self.c_ident) def printTypeCC(self, path): - code = code_formatter() + code = self.symtab.codeFormatter() code(''' /** \\file ${{self.c_ident}}.cc @@ -412,7 +412,7 @@ void ${{self.c_ident}}::print(ostream& out) const code.write(path, "%s.cc" % self.c_ident) def printEnumHH(self, path): - code = code_formatter() + code = self.symtab.codeFormatter() code(''' /** \\file ${{self.c_ident}}.hh * @@ -470,7 +470,7 @@ ostream& operator<<(ostream& out, const ${{self.c_ident}}& obj); code.write(path, "%s.hh" % self.c_ident) def printEnumCC(self, path): - code = code_formatter() + code = self.symtab.codeFormatter() code(''' /** \\file ${{self.c_ident}}.hh * |