clang API Documentation
#include "clang/Lex/ModuleMap.h"#include "clang/Basic/CharInfo.h"#include "clang/Basic/Diagnostic.h"#include "clang/Basic/DiagnosticOptions.h"#include "clang/Basic/FileManager.h"#include "clang/Basic/TargetInfo.h"#include "clang/Basic/TargetOptions.h"#include "clang/Lex/HeaderSearch.h"#include "clang/Lex/LexDiagnostic.h"#include "clang/Lex/Lexer.h"#include "clang/Lex/LiteralSupport.h"#include "llvm/ADT/StringRef.h"#include "llvm/ADT/StringSwitch.h"#include "llvm/Support/Allocator.h"#include "llvm/Support/FileSystem.h"#include "llvm/Support/Host.h"#include "llvm/Support/Path.h"#include "llvm/Support/raw_ostream.h"#include <stdlib.h>#include "clang/Basic/TokenKinds.def"
Go to the source code of this file.
Classes | |
| struct | clang::MMToken |
| A token in a module map file. More... | |
| struct | clang::Attributes |
| The set of attributes that can be attached to a module. More... | |
| class | clang::ModuleMapParser |
Namespaces | |
| namespace | clang |
Defines | |
| #define | KEYWORD(Keyword, Conditions) .Case(#Keyword, true) |
| #define | ALIAS(Keyword, AliasOf, Conditions) .Case(Keyword, true) |
Enumerations | |
| enum | AttributeKind |
| Enumerates the known attributes. More... | |
Functions | |
| static StringRef | sanitizeFilenameAsIdentifier (StringRef Name, SmallVectorImpl< char > &Buffer) |
| "Sanitize" a filename so that it can be used as an identifier. | |
| static bool | isBuiltinHeader (StringRef FileName) |
| Determine whether the given file name is the name of a builtin header, supplied by Clang to replace, override, or augment existing system headers. | |
| static bool | directlyUses (const Module *RequestingModule, const Module *RequestedModule) |
| static bool | violatesPrivateInclude (Module *RequestingModule, const FileEntry *IncFileEnt, ModuleMap::ModuleHeaderRole Role, Module *RequestedModule) |
| static Module * | getTopLevelOrNull (Module *M) |
| static void | inferFrameworkLink (Module *Mod, const DirectoryEntry *FrameworkDir, FileManager &FileMgr) |
| For a framework module, infer the framework against which we should link. | |
| static void | appendSubframeworkPaths (Module *Mod, SmallVectorImpl< char > &Path) |
Append to Paths the set of paths needed to get to the subframework in which the given module lives. | |
| static std::string | formatModuleId (const ModuleId &Id) |
| Format a module-id into a string. | |
| enum AttributeKind |
Enumerates the known attributes.
Definition at line 1274 of file ModuleMap.cpp.
| static void appendSubframeworkPaths | ( | Module * | Mod, |
| SmallVectorImpl< char > & | Path | ||
| ) | [static] |
Append to Paths the set of paths needed to get to the subframework in which the given module lives.
Definition at line 1643 of file ModuleMap.cpp.
References clang::Module::IsFramework, clang::Module::Name, and clang::Module::Parent.
| static bool directlyUses | ( | const Module * | RequestingModule, |
| const Module * | RequestedModule | ||
| ) | [static] |
Definition at line 206 of file ModuleMap.cpp.
References clang::Module::DirectUses.
Referenced by clang::ModuleMap::diagnoseHeaderInclusion(), and clang::ModuleMap::findModuleForHeader().
| static std::string formatModuleId | ( | const ModuleId & | Id | ) | [static] |
Format a module-id into a string.
Definition at line 2001 of file ModuleMap.cpp.
| static Module* getTopLevelOrNull | ( | Module * | M | ) | [static] |
Definition at line 235 of file ModuleMap.cpp.
References clang::Module::getTopLevelModule().
Referenced by clang::ModuleMap::diagnoseHeaderInclusion().
| static void inferFrameworkLink | ( | Module * | Mod, |
| const DirectoryEntry * | FrameworkDir, | ||
| FileManager & | FileMgr | ||
| ) | [static] |
For a framework module, infer the framework against which we should link.
Definition at line 589 of file ModuleMap.cpp.
References clang::FileManager::getFile(), clang::DirectoryEntry::getName(), clang::Module::IsFramework, clang::Module::isSubFramework(), clang::Module::LinkLibraries, and clang::Module::Name.
Referenced by clang::ModuleMap::inferFrameworkModule().
| static bool isBuiltinHeader | ( | StringRef | FileName | ) | [static] |
Determine whether the given file name is the name of a builtin header, supplied by Clang to replace, override, or augment existing system headers.
Definition at line 147 of file ModuleMap.cpp.
| static StringRef sanitizeFilenameAsIdentifier | ( | StringRef | Name, |
| SmallVectorImpl< char > & | Buffer | ||
| ) | [static] |
"Sanitize" a filename so that it can be used as an identifier.
Definition at line 108 of file ModuleMap.cpp.
References clang::isDigit(), clang::isIdentifierBody(), and clang::isValidIdentifier().
Referenced by clang::ModuleMap::findModuleForHeader(), clang::ModuleMap::inferFrameworkModule(), and clang::ModuleMap::isHeaderUnavailableInModule().
| static bool violatesPrivateInclude | ( | Module * | RequestingModule, |
| const FileEntry * | IncFileEnt, | ||
| ModuleMap::ModuleHeaderRole | Role, | ||
| Module * | RequestedModule | ||
| ) | [static] |
Definition at line 213 of file ModuleMap.cpp.
References clang::Module::getTopLevelModule(), clang::ModuleMap::PrivateHeader, clang::Module::PrivateHeaders, and clang::Module::PrivateTextualHeaders.
Referenced by clang::ModuleMap::diagnoseHeaderInclusion().