Author: labath Date: Fri Oct 18 04:47:23 2019 New Revision: 375221 URL: http://llvm.org/viewvc/llvm-project?rev=375221&view=rev Log: SystemInitializerCommon fix compilation on linux
C++ defines two overloads of std::iscntrl. One in <cctype> and one in <locale>. On linux we seem to include both which makes the std::erase_if call ambiguous. Wrap std::iscntrl call in a lambda to ensure regular overload resolution. Modified: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp Modified: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Initialization/SystemInitializerCommon.cpp?rev=375221&r1=375220&r2=375221&view=diff ============================================================================== --- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp (original) +++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp Fri Oct 18 04:47:23 2019 @@ -80,7 +80,8 @@ llvm::Error SystemInitializerCommon::Ini } 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