KyrBoh created this revision. KyrBoh added a reviewer: MyDeveloperDay. Herald added a reviewer: bollu. Herald added a project: LLDB. Herald added a subscriber: lldb-commits.
Due to the fact, that getting an address of function in the standard library, LLDB fails to compile in my environment with en error saying "unable to find function to call for remove_if(..., <unresolved function type>)". Just use the fix suggested by cppreference: wrap function into a lambda: https://en.cppreference.com/w/cpp/string/byte/iscntrl Environment used: OS: Ubuntu Eoan (19.10), x86_64 Compiler: g++ (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008 CMake invocation: cmake \ -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;libunwind;lldb;compiler-rt;lld;polly" \ -DLLVM_TARGETS_TO_BUILD="X86" \ -DLLVM_BUILD_LLVM_DYLIB=ON \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/opt/llvm-git \ ../llvm-project/llvm Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D69166 Files: lldb/source/Initialization/SystemInitializerCommon.cpp Index: lldb/source/Initialization/SystemInitializerCommon.cpp =================================================================== --- lldb/source/Initialization/SystemInitializerCommon.cpp +++ lldb/source/Initialization/SystemInitializerCommon.cpp @@ -80,7 +80,7 @@ } if (llvm::Expected<std::string> cwd = loader->LoadBuffer<WorkingDirectoryProvider>()) { - cwd->erase(std::remove_if(cwd->begin(), cwd->end(), std::iscntrl), + cwd->erase(std::remove_if(cwd->begin(), cwd->end(), [](char c) { return std::iscntrl(c); }), cwd->end()); if (std::error_code ec = FileSystem::Instance() .GetVirtualFileSystem()
Index: lldb/source/Initialization/SystemInitializerCommon.cpp =================================================================== --- lldb/source/Initialization/SystemInitializerCommon.cpp +++ lldb/source/Initialization/SystemInitializerCommon.cpp @@ -80,7 +80,7 @@ } if (llvm::Expected<std::string> cwd = loader->LoadBuffer<WorkingDirectoryProvider>()) { - cwd->erase(std::remove_if(cwd->begin(), cwd->end(), std::iscntrl), + cwd->erase(std::remove_if(cwd->begin(), cwd->end(), [](char c) { return std::iscntrl(c); }), cwd->end()); if (std::error_code ec = FileSystem::Instance() .GetVirtualFileSystem()
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits