clang
20.0.0git
lib
Lex
InitHeaderSearch.cpp
Go to the documentation of this file.
1
//===--- InitHeaderSearch.cpp - Initialize header search paths ------------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file implements the InitHeaderSearch class.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#include "
clang/Basic/FileManager.h
"
14
#include "
clang/Basic/LangOptions.h
"
15
#include "clang/Config/config.h"
// C_INCLUDE_DIRS
16
#include "
clang/Lex/HeaderMap.h
"
17
#include "
clang/Lex/HeaderSearch.h
"
18
#include "
clang/Lex/HeaderSearchOptions.h
"
19
#include "llvm/ADT/SmallPtrSet.h"
20
#include "llvm/ADT/StringExtras.h"
21
#include "llvm/ADT/Twine.h"
22
#include "llvm/Support/ErrorHandling.h"
23
#include "llvm/Support/Path.h"
24
#include "llvm/Support/raw_ostream.h"
25
#include "llvm/TargetParser/Triple.h"
26
#include <optional>
27
28
using namespace
clang
;
29
using namespace
clang::frontend
;
30
31
namespace
{
32
/// Holds information about a single DirectoryLookup object.
33
struct
DirectoryLookupInfo {
34
IncludeDirGroup
Group
;
35
DirectoryLookup
Lookup;
36
std::optional<unsigned> UserEntryIdx;
37
38
DirectoryLookupInfo(
IncludeDirGroup
Group,
DirectoryLookup
Lookup,