From ef5d0b5e97ec8e6fa395d377b09aa7755e345b4f Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 18 Dec 2017 20:12:36 +0000 Subject: Vendor import of lldb trunk r321017: https://llvm.org/svn/llvm-project/lldb/trunk@321017 --- source/Commands/CommandCompletions.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/Commands/CommandCompletions.cpp') diff --git a/source/Commands/CommandCompletions.cpp b/source/Commands/CommandCompletions.cpp index fd84e1c4f857..34cad970ff6e 100644 --- a/source/Commands/CommandCompletions.cpp +++ b/source/Commands/CommandCompletions.cpp @@ -199,14 +199,14 @@ static int DiskFilesOrDirectories(const llvm::Twine &partial_name, // We have a match. - fs::file_status st; - if ((EC = Entry.status(st))) + llvm::ErrorOr st = Entry.status(); + if (!st) continue; // If it's a symlink, then we treat it as a directory as long as the target // is a directory. - bool is_dir = fs::is_directory(st); - if (fs::is_symlink_file(st)) { + bool is_dir = fs::is_directory(*st); + if (fs::is_symlink_file(*st)) { fs::file_status target_st; if (!fs::status(Entry.path(), target_st)) is_dir = fs::is_directory(target_st); -- cgit v1.3