mirror of
https://github.com/intel/llvm.git
synced 2026-01-21 20:53:29 +08:00
Use LLVM for file / directory enumeration.
FileSpec::EnumerateDirectory has a bunch of platform-specific gunk in it for posix and non-posix platforms. We can get rid of all this by using LLVM's easy-to-use directory iterators. Differential Revision: https://reviews.llvm.org/D30807 llvm-svn: 297598
This commit is contained in:
@@ -13,6 +13,10 @@
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Support/Path.h"
|
||||
|
||||
#if !defined(LLVM_ON_WIN32)
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
|
||||
using namespace lldb_private;
|
||||
using namespace llvm;
|
||||
|
||||
@@ -46,7 +50,7 @@ bool StandardTildeExpressionResolver::ResolvePartial(StringRef Expr,
|
||||
if (Expr.empty())
|
||||
return false;
|
||||
|
||||
SmallString<32> Buffer = "~";
|
||||
SmallString<32> Buffer("~");
|
||||
setpwent();
|
||||
struct passwd *user_entry;
|
||||
Expr = Expr.drop_front();
|
||||
|
||||
Reference in New Issue
Block a user