clang 22.0.0git
InitHeaderSearch.cpp File Reference
#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/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>

Go to the source code of this file.

Functions

static bool CanPrefixSysroot (StringRef Path)
static unsigned RemoveDuplicates (std::vector< DirectoryLookupInfo > &SearchList, unsigned First, bool Verbose)
 If there are duplicate directory entries in the specified search list, remove the later (dead) ones.
static std::vector< DirectoryLookupextractLookups (const std::vector< DirectoryLookupInfo > &Infos)
 Extract DirectoryLookups from DirectoryLookupInfos.
static llvm::DenseMap< unsigned, unsignedmapToUserEntries (const std::vector< DirectoryLookupInfo > &Infos)
 Collect the mapping between indices of DirectoryLookups and UserEntries.

Function Documentation

◆ CanPrefixSysroot()

bool CanPrefixSysroot ( StringRef Path)
static

Definition at line 96 of file InitHeaderSearch.cpp.

◆ extractLookups()

std::vector< DirectoryLookup > extractLookups ( const std::vector< DirectoryLookupInfo > & Infos)
static

Extract DirectoryLookups from DirectoryLookupInfos.

Definition at line 361 of file InitHeaderSearch.cpp.

◆ mapToUserEntries()

llvm::DenseMap< unsigned, unsigned > mapToUserEntries ( const std::vector< DirectoryLookupInfo > & Infos)
static

Collect the mapping between indices of DirectoryLookups and UserEntries.

Definition at line 371 of file InitHeaderSearch.cpp.

◆ RemoveDuplicates()

unsigned RemoveDuplicates ( std::vector< DirectoryLookupInfo > & SearchList,
unsigned First,
bool Verbose )
static