From be8b6d1d408ad373dad99bd7e81735343e956a18 Mon Sep 17 00:00:00 2001 From: Robert Konicar Date: Fri, 6 Oct 2023 16:30:33 +0200 Subject: [PATCH] cg: Don't do unnecessary copy of section attribute name. --- include/vast/CodeGen/CodeGenAttrVisitor.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/vast/CodeGen/CodeGenAttrVisitor.hpp b/include/vast/CodeGen/CodeGenAttrVisitor.hpp index 1f22c90b35..8a51d8b72f 100644 --- a/include/vast/CodeGen/CodeGenAttrVisitor.hpp +++ b/include/vast/CodeGen/CodeGenAttrVisitor.hpp @@ -43,8 +43,7 @@ namespace vast::cg { } mlir_attr VisitSectionAttr(const clang::SectionAttr *attr) { - std::string name(attr->getName()); - return make< hl::SectionAttr >(name); + return make< hl::SectionAttr >(attr->getName()); } mlir_attr VisitAnnotateAttr(const clang::AnnotateAttr *attr) {