kparzysz wrote:

> Don't see how or why this would introduce stackusage. std::string temporaries 
> should be avoided whenever possible

The code that's included afterwards contains a lot of comparisons with string 
literals:
```
if (Name == "aarch64_sve_pcs" && getSyntax() == AttributeCommonInfo::AS_GNU && 
Scope == "")
    return 0;
if (Name == "aarch64_sve_pcs" && getSyntax() == AttributeCommonInfo::AS_CXX11 
&& Scope == "clang")
    return 1;
if (Name == "aarch64_sve_pcs" && getSyntax() == AttributeCommonInfo::AS_C23 && 
Scope == "clang")
    return 2;
```

IIUC, @chinmaydd claims that MSVC allocates these literals on the stack, and 
they take up more space than a `std::string` would.

https://github.com/llvm/llvm-project/pull/114285
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to