[llvm-bugs] [Bug 38336] New: Optimize strlen called on std::string c_str()

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jul 27 04:46:16 PDT 2018


            Bug ID: 38336
           Summary: Optimize strlen called on std::string c_str()
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: david.bolvansky at gmail.com
                CC: llvm-bugs at lists.llvm.org

int lenstr(std::string &str) {
    return strlen(str.c_str() /* .data() */);

int lenstr(std::string &str) {
    return str.length();

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180727/9fe30d5c/attachment.html>

More information about the llvm-bugs mailing list