diff options
author | Zachary Turner <zturner@google.com> | 2017-04-15 02:44:53 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-04-15 02:44:53 +0000 |
commit | 426d1379b081bee95841c36595bd058794aa60fe (patch) | |
tree | 5a5a2c63f7c29ad90d020029076c1fcd362b4ecb /lldb/source/Commands/CommandCompletions.cpp | |
parent | 0eb8030369910abae3ddb10141f798b1728967e2 (diff) | |
download | bcm5719-llvm-426d1379b081bee95841c36595bd058794aa60fe.tar.gz bcm5719-llvm-426d1379b081bee95841c36595bd058794aa60fe.zip |
Fix crash when completing in the current directory.
llvm-svn: 300386
Diffstat (limited to 'lldb/source/Commands/CommandCompletions.cpp')
-rw-r--r-- | lldb/source/Commands/CommandCompletions.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandCompletions.cpp b/lldb/source/Commands/CommandCompletions.cpp index 5f0d494443f..fd84e1c4f85 100644 --- a/lldb/source/Commands/CommandCompletions.cpp +++ b/lldb/source/Commands/CommandCompletions.cpp @@ -176,7 +176,10 @@ static int DiskFilesOrDirectories(const llvm::Twine &partial_name, if (PartialItem == ".") PartialItem = llvm::StringRef(); - assert(!SearchDir.empty()); + if (SearchDir.empty()) { + llvm::sys::fs::current_path(Storage); + SearchDir = Storage; + } assert(!PartialItem.contains(path::get_separator())); // SearchDir now contains the directory to search in, and Prefix contains the |