[all-commits] [llvm/llvm-project] 9a99af: [libc] Use string_view for write_to_stderr

Guillaume Chatelet via All-commits all-commits at lists.llvm.org
Sun Apr 2 07:52:59 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9a99afb455601aaa3a28d307c7bbcfdaad3fa4fc
      https://github.com/llvm/llvm-project/commit/9a99afb455601aaa3a28d307c7bbcfdaad3fa4fc
  Author: Guillaume Chatelet <gchatelet at google.com>
  Date:   2023-04-02 (Sun, 02 Apr 2023)

  Changed paths:
    M libc/src/__support/OSUtil/gpu/CMakeLists.txt
    M libc/src/__support/OSUtil/gpu/io.cpp
    M libc/src/__support/OSUtil/gpu/io.h
    M libc/src/__support/OSUtil/linux/CMakeLists.txt
    M libc/src/__support/OSUtil/linux/io.h

  Log Message:
  -----------
  [libc] Use string_view for write_to_stderr

This patch makes use of `cpp::string_view` instead of `const char*` for `write_to_stderr`. This helps sending non null-terminated buffers such as a single character, `cpp::string_view` or `cpp::string`.
It also fizes the gpu version that had several bugs (See https://reviews.llvm.org/D145913#4236641).

Differential Revision: https://reviews.llvm.org/D147375




More information about the All-commits mailing list