8000 Cherrypick upstream reproducer changes. by JDevlieghere · Pull Request #10 · swiftlang/llvm-project · GitHub
[go: up one dir, main page]

Skip to content

Cherrypick upstream reproducer changes. #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
8000
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[Reproducer] Surface error if setting the cwd fails
Make sure that we surface an error if setting the current working
directory fails during replay.

llvm-svn: 375146
(cherry picked from commit 2b7899b)
  • Loading branch information
JDevlieghere committed Oct 21, 2019
commit 4922c86b902c1688fd846a5e114ab73cd551029c
9 changes: 7 additions & 2 deletions lldb/source/Initialization/SystemInitializerCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,13 @@ llvm::Error SystemInitializerCommon::Initialize() {
}
if (llvm::Expected<std::string> cwd =
loader->LoadBuffer<WorkingDirectoryProvider>()) {
FileSystem::Instance().GetVirtualFileSystem()->setCurrentWorkingDirectory(
*cwd);
cwd->erase(std::remove_if(cwd->begin(), cwd->end(), std::iscntrl),
cwd->end());
if (std::error_code ec = FileSystem::Instance()
.GetVirtualFileSystem()
->setCurrentWorkingDirectory(*cwd)) {
return llvm::errorCodeToError(ec);
}
} else {
return cwd.takeError();
}
Expand Down
0