diff options
author | Deepak Kodihalli <dkodihal@in.ibm.com> | 2017-01-18 00:17:39 -0600 |
---|---|---|
committer | Deepak Kodihalli <dkodihal@in.ibm.com> | 2017-01-27 10:43:03 -0600 |
commit | 5d1aace69bea0c76229335dcdc09ec63eda63931 (patch) | |
tree | 59445c1ef573400e2d716326a652fcabd19a3502 /tools/phosphor-logging | |
parent | cbd12c8f5d0d5227f8eebf10302188a9bfc54f20 (diff) | |
download | phosphor-logging-5d1aace69bea0c76229335dcdc09ec63eda63931.tar.gz phosphor-logging-5d1aace69bea0c76229335dcdc09ec63eda63931.zip |
elog-gen.py : order inherited errors
The elog-gen.py script should process errors such that the generated
code has definitions for parent errors before their child errors are
defined.
Change-Id: I035292731346bdba969f549c7e4033066814890f
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Diffstat (limited to 'tools/phosphor-logging')
-rw-r--r-- | tools/phosphor-logging/templates/elog-gen-template.mako.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/phosphor-logging/templates/elog-gen-template.mako.hpp b/tools/phosphor-logging/templates/elog-gen-template.mako.hpp index 1ff9150..4222f08 100644 --- a/tools/phosphor-logging/templates/elog-gen-template.mako.hpp +++ b/tools/phosphor-logging/templates/elog-gen-template.mako.hpp @@ -30,7 +30,7 @@ namespace ${s} % endfor namespace _${classname} { - % for b in meta[index]: + % for b in meta[name]: struct ${b} { static constexpr auto str = "${meta_data[b]['str']}"; @@ -42,13 +42,13 @@ struct ${b} % endfor } // namespace _${classname} -<% meta_string = ', '.join(meta[index]) %> +<% meta_string = ', '.join(meta[name]) %> struct ${classname} { static constexpr auto err_code = "${name}"; static constexpr auto err_msg = "${error_msg[name]}"; static constexpr auto L = level::${error_lvl[name]}; - % for b in meta[index]: + % for b in meta[name]: using ${b} = _${classname}::${b}; % endfor using metadata_types = std::tuple<${meta_string}>; |