forked from OSchip/llvm-project
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. llvm-svn: 375221
This commit is contained in:
parent
9c155985f1
commit
0c30491774
|
@ -80,7 +80,8 @@ llvm::Error SystemInitializerCommon::Initialize() {
|
|||
}
|
||||
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()
|
||||
|
|
Loading…
Reference in New Issue