#include "clang/Basic/DiagnosticFrontend.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Config/config.h"
#include "clang/Lex/HeaderMap.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/HeaderSearchOptions.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/Triple.h"
#include <optional>
usingnamespaceclang;
usingnamespaceclang::frontend;
namespace {
struct DirectoryLookupInfo { … };
class InitHeaderSearch { … };
}
static bool CanPrefixSysroot(StringRef Path) { … }
bool InitHeaderSearch::AddPath(const Twine &Path, IncludeDirGroup Group,
bool isFramework,
std::optional<unsigned> UserEntryIdx) { … }
bool InitHeaderSearch::AddUnmappedPath(const Twine &Path, IncludeDirGroup Group,
bool isFramework,
std::optional<unsigned> UserEntryIdx) { … }
void InitHeaderSearch::AddMinGWCPlusPlusIncludePaths(StringRef Base,
StringRef Arch,
StringRef Version) { … }
void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
const HeaderSearchOptions &HSOpts) { … }
void InitHeaderSearch::AddDefaultCPlusPlusIncludePaths(
const LangOptions &LangOpts, const llvm::Triple &triple,
const HeaderSearchOptions &HSOpts) { … }
bool InitHeaderSearch::ShouldAddDefaultIncludePaths(
const llvm::Triple &triple) { … }
void InitHeaderSearch::AddDefaultIncludePaths(
const LangOptions &Lang, const llvm::Triple &triple,
const HeaderSearchOptions &HSOpts) { … }
static unsigned RemoveDuplicates(std::vector<DirectoryLookupInfo> &SearchList,
unsigned First, bool Verbose) { … }
static std::vector<DirectoryLookup>
extractLookups(const std::vector<DirectoryLookupInfo> &Infos) { … }
static llvm::DenseMap<unsigned, unsigned>
mapToUserEntries(const std::vector<DirectoryLookupInfo> &Infos) { … }
void InitHeaderSearch::Realize(const LangOptions &Lang) { … }
void clang::ApplyHeaderSearchOptions(HeaderSearch &HS,
const HeaderSearchOptions &HSOpts,
const LangOptions &Lang,
const llvm::Triple &Triple) { … }