LLDB  mainline
Functions
ClangHost.cpp File Reference
#include "ClangHost.h"
#include "clang/Basic/Version.h"
#include "clang/Config/config.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Threading.h"
#include "lldb/Host/Config.h"
#include "lldb/Host/FileSystem.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Utility/FileSpec.h"
#include "lldb/Utility/Log.h"
#include <string>
Include dependency graph for ClangHost.cpp:

Go to the source code of this file.

Functions

static bool VerifyClangPath (const llvm::Twine &clang_path)
 
static bool DefaultComputeClangResourceDirectory (FileSpec &lldb_shlib_spec, FileSpec &file_spec, bool verify)
 This will compute the clang resource directory assuming that clang was installed with the same prefix as lldb. More...
 

Function Documentation

◆ DefaultComputeClangResourceDirectory()

static bool DefaultComputeClangResourceDirectory ( FileSpec lldb_shlib_spec,
FileSpec file_spec,
bool  verify 
)
static

This will compute the clang resource directory assuming that clang was installed with the same prefix as lldb.

If verify is true, the first candidate resource directory will be returned. This mode is only used for testing.

Definition at line 47 of file ClangHost.cpp.

References lldb_private::FileSpec::GetDirectory(), lldb_private::GetLogIfAllCategoriesSet(), lldb_private::FileSpec::GetPath(), lldb_private::FileSystem::Instance(), LIBLLDB_LOG_HOST, lldb_private::Log::Printf(), lldb_private::FileSystem::Resolve(), lldb_private::ConstString::SetString(), and VerifyClangPath().

Referenced by lldb_private::ComputeClangResourceDirectory().

◆ VerifyClangPath()

static bool VerifyClangPath ( const llvm::Twine &  clang_path)
static