forked from OSchip/llvm-project
Fix Windows build after UserIDResolver patch.
That patch added a function to HostInfo that returns an instance of UserIDResolver, but this function was unimplemented on Windows, leading to linker errors. For now, just return a dummy implementation that doesn't resolve user ids to get the build green. llvm-svn: 355329
This commit is contained in:
parent
8670faf939
commit
bb4d4e2d76
|
@ -11,7 +11,6 @@
|
|||
|
||||
#include "lldb/Utility/ArchSpec.h"
|
||||
#include "lldb/Utility/FileSpec.h"
|
||||
#include "lldb/Utility/UserIDResolver.h"
|
||||
#include "lldb/lldb-enumerations.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
|
||||
|
@ -99,8 +98,6 @@ public:
|
|||
//---------------------------------------------------------------------------
|
||||
static ArchSpec GetAugmentedArchSpec(llvm::StringRef triple);
|
||||
|
||||
static UserIDResolver &GetUserIDResolver();
|
||||
|
||||
protected:
|
||||
static bool ComputeSharedLibraryDirectory(FileSpec &file_spec);
|
||||
static bool ComputeSupportExeDirectory(FileSpec &file_spec);
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
namespace lldb_private {
|
||||
|
||||
class UserIDResolver;
|
||||
|
||||
class HostInfoPosix : public HostInfoBase {
|
||||
friend class HostInfoBase;
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "llvm/Support/VersionTuple.h"
|
||||
|
||||
namespace lldb_private {
|
||||
class UserIDResolver;
|
||||
|
||||
class HostInfoWindows : public HostInfoBase {
|
||||
friend class HostInfoBase;
|
||||
|
@ -28,6 +29,7 @@ public:
|
|||
static void Terminate();
|
||||
|
||||
static size_t GetPageSize();
|
||||
static UserIDResolver &GetUserIDResolver();
|
||||
|
||||
static llvm::VersionTuple GetOSVersion();
|
||||
static bool GetOSBuildString(std::string &s);
|
||||
|
|
|
@ -14,15 +14,29 @@
|
|||
|
||||
#include "lldb/Host/windows/HostInfoWindows.h"
|
||||
#include "lldb/Host/windows/PosixApi.h"
|
||||
#include "lldb/Utility/UserIDResolver.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
#include "llvm/Support/ConvertUTF.h"
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Support/ManagedStatic.h"
|
||||
#include "llvm/Support/Path.h"
|
||||
#include "llvm/Support/Threading.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
using namespace lldb_private;
|
||||
|
||||
namespace {
|
||||
class WindowsUserIDResolver : public UserIDResolver {
|
||||
protected:
|
||||
llvm::Optional<std::string> DoGetUserName(id_t uid) override {
|
||||
return llvm::None;
|
||||
}
|
||||
llvm::Optional<std::string> DoGetGroupName(id_t gid) override {
|
||||
return llvm::None;
|
||||
}
|
||||
};
|
||||
} // namespace
|
||||
|
||||
FileSpec HostInfoWindows::m_program_filespec;
|
||||
|
||||
void HostInfoWindows::Initialize() {
|
||||
|
@ -117,3 +131,9 @@ bool HostInfoWindows::GetEnvironmentVar(const std::string &var_name,
|
|||
return llvm::convertWideToUTF8(wvar, var);
|
||||
return false;
|
||||
}
|
||||
|
||||
static llvm::ManagedStatic<WindowsUserIDResolver> g_user_id_resolver;
|
||||
|
||||
UserIDResolver &HostInfoWindows::GetUserIDResolver() {
|
||||
return *g_user_id_resolver;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue