[libc-commits] [PATCH] D158033: [libc][NFC] Add new is_trivially_destructible check to libc's type_traits

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Aug 18 12:19:15 PDT 2023


jhuber6 added a comment.

This might be preventing me from building on one of my systems.

  FAILED: projects/libc/utils/gpu/server/CMakeFiles/llvmlibc_rpc_server.dir/rpc_server.cpp.o
  CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/c++ -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D_LIBCPP_ENABLE_HARDENED_MODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/jhuber/llvm-project/build/projects/libc/utils/gpu/server -I/home/jhuber/llvm-project/libc/utils/gpu/server -I/home/jhuber/llvm-project/build/include -I/home/jhuber/llvm-project/llvm/include -I/home/jhuber/llvm-project/libc -I/home/jhuber/llvm-project/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17 -UNDEBUG -Wno-attributes -MD -MT projects/libc/utils/gpu/server/CMakeFiles/llvmlibc_rpc_server.dir/rpc_server.cpp.o -MF projects/libc/utils/gpu/server/CMakeFiles/llvmlibc_rpc_server.dir/rpc_server.cpp.o.d -o projects/libc/utils/gpu/server/CMakeFiles/llvmlibc_rpc_server.dir/rpc_server.cpp.o -c /home/jhuber/llvm-project/libc/utils/gpu/server/rpc_server.cpp
  In file included from /home/jhuber/llvm-project/libc/src/__support/RPC/rpc_util.h:12,
                   from /home/jhuber/llvm-project/libc/src/__support/RPC/rpc.h:21,
                   from /home/jhuber/llvm-project/libc/utils/gpu/server/rpc_server.cpp:11:
  /home/jhuber/llvm-project/libc/src/__support/CPP/type_traits.h:223:18: error: missing binary operator before token "("
    223 | #if __has_builtin(__is_lvalue_reference) &&                                    \
        |                  ^
  /home/jhuber/llvm-project/libc/src/__support/CPP/type_traits.h:246:18: error: missing binary operator before token "("
    246 | #if __has_builtin(__remove_all_extents)
        |                  ^
  /home/jhuber/llvm-project/libc/src/__support/CPP/type_traits.h:263:18: error: missing binary operator before token "("
    263 | #if __has_builtin(__is_function)
        |                  ^
  /home/jhuber/llvm-project/libc/src/__support/CPP/type_traits.h:277:18: error: missing binary operator before token "("
    277 | #if __has_builtin(__is_destructible)
        |                  ^
  /home/jhuber/llvm-project/libc/src/__support/CPP/type_traits.h:331:18: error: missing binary operator before token "("
    331 | #if __has_builtin(__is_trivially_destructible)
        |                  ^
  /home/jhuber/llvm-project/libc/src/__support/CPP/type_traits.h:337:20: error: missing binary operator before token "("
    337 | #elif __has_builtin(__has_trivial_destructor)
        |                    ^
  In file included from /home/jhuber/llvm-project/libc/src/__support/RPC/rpc.h:25,
                   from /home/jhuber/llvm-project/libc/utils/gpu/server/rpc_server.cpp:11:
  /home/jhuber/llvm-project/libc/src/__support/CPP/optional.h:39:33: error: ‘is_trivially_destructible’ was not declared in this scope; did you mean ‘is_trivially_constructible’?
     39 |   template <typename U, bool = !is_trivially_destructible<U>::value>
        |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
        |                                 is_trivially_constructible
  /home/jhuber/llvm-project/libc/src/__support/CPP/optional.h:39:60: error: expected primary-expression before ‘>’ token
     39 |   template <typename U, bool = !is_trivially_destructible<U>::value>
        |                                                            ^
  /home/jhuber/llvm-project/libc/src/__support/CPP/optional.h:39:58: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
     39 |   template <typename U, bool = !is_trivially_destructible<U>::value>
        |                                                          ^
  /home/jhuber/llvm-project/libc/src/__support/CPP/optional.h:39:63: error: ‘value’ in namespace ‘::’ does not name a type
     39 |   template <typename U, bool = !is_trivially_destructible<U>::value>
        |                                                               ^~~~~
  /home/jhuber/llvm-project/libc/src/__support/CPP/optional.h:52:4: warning: extra ‘;’ [-Wpedantic]
     52 |   };
        |    ^
        |    -
  /home/jhuber/llvm-project/libc/src/__support/CPP/optional.h:54:32: error: ‘OptionalStorage’ is not a class template
     54 |   template <typename U> struct OptionalStorage<U, false> {
        |                                ^~~~~~~~~~~~~~~
  [74/4706] Building CXX object utils/TableGen/CMakeFiles/llvm-tblgen.dir/CodeGenDAGPatterns.cpp.o
  ninja: build stopped: subcommand failed.

This file is compiled with the system GCC which is version 9.4.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158033/new/

https://reviews.llvm.org/D158033



More information about the libc-commits mailing list