clang API Documentation

Defines | Functions
FileManager.cpp File Reference
#include "clang/Basic/FileManager.h"
#include "clang/Basic/FileSystemStatCache.h"
#include "llvm/ADT/SmallString.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 <map>
#include <set>
#include <string>
#include <system_error>
Include dependency graph for FileManager.cpp:

Go to the source code of this file.

Defines

#define NON_EXISTENT_DIR   reinterpret_cast<DirectoryEntry*>((intptr_t)-1)
#define NON_EXISTENT_FILE   reinterpret_cast<FileEntry*>((intptr_t)-1)

Functions

static const DirectoryEntrygetDirectoryFromFile (FileManager &FileMgr, StringRef Filename, bool CacheFailure)
 Retrieve the directory that the given file name resides in. Filename can point to either a real file or a virtual file.

Define Documentation

#define NON_EXISTENT_DIR   reinterpret_cast<DirectoryEntry*>((intptr_t)-1)

NON_EXISTENT_DIR - A special value distinct from null that is used to represent a dir name that doesn't exist on the disk.

Definition at line 37 of file FileManager.cpp.

Referenced by clang::FileManager::getDirectory().

#define NON_EXISTENT_FILE   reinterpret_cast<FileEntry*>((intptr_t)-1)

NON_EXISTENT_FILE - A special value distinct from null that is used to represent a filename that doesn't exist on the disk.

Definition at line 41 of file FileManager.cpp.

Referenced by clang::FileManager::getFile(), clang::FileManager::GetUniqueIDMapping(), and clang::FileManager::getVirtualFile().


Function Documentation

static const DirectoryEntry* 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 108 of file FileManager.cpp.

References clang::FileManager::getDirectory().

Referenced by clang::FileManager::getFile(), and clang::FileManager::getVirtualFile().