Skip to content

llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h:285: Pointless string copy ? #94233

@dcb314

Description

@dcb314

Static analyser cppcheck says:

llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h:285:38: performance: Function parameter 'Style' should be passed by const reference. [passedByValue]

Source code is

void setOutliningStyle(std::string Style) { OutliningStyle = Style; }

Maybe better code:

void setOutliningStyle( const std::string & Style) { OutliningStyle = Style; }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions