clang 20.0.0git
Macros | Functions
FileManager.cpp File Reference
#include "clang/Basic/FileManager.h"
#include "clang/Basic/FileSystemStatCache.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <climits>
#include <cstdint>
#include <cstdlib>
#include <optional>
#include <string>
#include <utility>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "file-search"
 

Functions

static llvm::Expected< DirectoryEntryRefgetDirectoryFromFile (FileManager &FileMgr, StringRef Filename, bool CacheFailure)
 Retrieve the directory that the given file name resides in.
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "file-search"

Definition at line 40 of file FileManager.cpp.

Function Documentation

◆ getDirectoryFromFile()

static llvm::Expected< DirectoryEntryRef > getDirectoryFromFile ( FileManager FileMgr,
StringRef  Filename,
bool  CacheFailure 
)
static

Retrieve the directory that the given file name resides in.

Filename can point to either a real file or a virtual file.

Definition at line 68 of file FileManager.cpp.

References Filename, clang::FileManager::getDirectoryRef(), and clang::make_error_code().

Referenced by clang::FileManager::getFileRef(), and clang::FileManager::getVirtualFileRef().