From: Nikos Nikoleris Date: Fri, 7 Jun 2019 12:37:56 +0000 (+0100) Subject: python: Fix cxx_ini_parse for ScopedEnum X-Git-Tag: v19.0.0.0~767 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a45037a4a384f96679ed9eb81c955a5edbcc1189;p=gem5.git python: Fix cxx_ini_parse for ScopedEnum Change-Id: I69534bbbc16b2d24a65fa1dee4926f213c3618ef Signed-off-by: Nikos Nikoleris Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19152 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- diff --git a/src/python/m5/params.py b/src/python/m5/params.py index c1c6ca947..da1304d9c 100644 --- a/src/python/m5/params.py +++ b/src/python/m5/params.py @@ -1485,7 +1485,9 @@ class Enum(ParamValue): for elem_name in cls.map.keys(): code('} else if (%s == "%s") {' % (src, elem_name)) code.indent() - code('%s = Enums::%s;' % (dest, elem_name)) + name = cls.__name__ if cls.enum_name is None else cls.enum_name + code('%s = %s::%s;' % (dest, name if cls.is_class else 'Enums', + elem_name)) code('%s true;' % ret) code.dedent() code('} else {')