From 6342c96e90c82a052ed1457f6eedc3fca4f4619a Mon Sep 17 00:00:00 2001 From: James Cherry Date: Thu, 13 Jan 2022 10:54:56 -0700 Subject: [PATCH] makeLibertyComplexAttr possible for missing visitor Signed-off-by: James Cherry --- liberty/LibertyParser.cc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/liberty/LibertyParser.cc b/liberty/LibertyParser.cc index 351c8839..6e9b3442 100644 --- a/liberty/LibertyParser.cc +++ b/liberty/LibertyParser.cc @@ -329,16 +329,17 @@ makeLibertyComplexAttr(const char *name, } else { LibertyAttr *attr = new LibertyComplexAttr(name, values, line); - if (liberty_group_visitor) + if (liberty_group_visitor) { liberty_group_visitor->visitAttr(attr); - if (liberty_group_visitor->save(attr)) { - LibertyGroup *group = libertyGroup(); - group->addAttribute(attr); - return attr; - } - else { - delete attr; - return nullptr; + if (liberty_group_visitor->save(attr)) { + LibertyGroup *group = libertyGroup(); + group->addAttribute(attr); + return attr; + } + else { + delete attr; + return nullptr; + } } } }