We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7595fa6 + ded44e2 commit e28f484Copy full SHA for e28f484
lldb/source/Initialization/SystemInitializerCommon.cpp
@@ -80,12 +80,10 @@ llvm::Error SystemInitializerCommon::Initialize() {
80
}
81
if (llvm::Expected<std::string> cwd =
82
loader->LoadBuffer<WorkingDirectoryProvider>()) {
83
- cwd->erase(std::remove_if(cwd->begin(), cwd->end(),
84
- [](char c) { return std::iscntrl(c); }),
85
- cwd->end());
+ llvm::StringRef working_dir = llvm::StringRef(*cwd).rtrim();
86
if (std::error_code ec = FileSystem::Instance()
87
.GetVirtualFileSystem()
88
- ->setCurrentWorkingDirectory(*cwd)) {
+ ->setCurrentWorkingDirectory(working_dir)) {
89
return llvm::errorCodeToError(ec);
90
91
} else {
0 commit comments