clang
3.9.0
|
Describes a module import declaration, which makes the contents of the named module visible in the current translation unit. More...
#include <Decl.h>
Public Member Functions | |
Module * | getImportedModule () const |
Retrieve the module that was imported by the import declaration. More... | |
ArrayRef< SourceLocation > | getIdentifierLocs () const |
Retrieves the locations of each of the identifiers that make up the complete module name in the import declaration. More... | |
SourceRange | getSourceRange () const override LLVM_READONLY |
Static Public Member Functions | |
static ImportDecl * | Create (ASTContext &C, DeclContext *DC, SourceLocation StartLoc, Module *Imported, ArrayRef< SourceLocation > IdentifierLocs) |
Create a new module import declaration. More... | |
static ImportDecl * | CreateImplicit (ASTContext &C, DeclContext *DC, SourceLocation StartLoc, Module *Imported, SourceLocation EndLoc) |
Create a new module import declaration for an implicitly-generated import. More... | |
static ImportDecl * | CreateDeserialized (ASTContext &C, unsigned ID, unsigned NumLocations) |
Create a new, deserialized module import declaration. More... | |
static bool | classof (const Decl *D) |
static bool | classofKind (Kind K) |
Friends | |
class | ASTReader |
class | ASTDeclReader |
class | ASTContext |
Describes a module import declaration, which makes the contents of the named module visible in the current translation unit.
An import declaration imports the named module (or submodule). For example:
Import declarations can also be implicitly generated from #include/#import directives.
Definition at line 3783 of file Decl.h.
References clang::ParmVarDecl::classofKind().
|
static |
Create a new module import declaration.
Definition at line 4245 of file Decl.cpp.
References AttributeLangSupport::C.
Referenced by clang::Sema::ActOnModuleImport().
|
static |
Create a new, deserialized module import declaration.
Definition at line 4263 of file Decl.cpp.
References AttributeLangSupport::C, and ID.
|
static |
Create a new module import declaration for an implicitly-generated import.
Definition at line 4253 of file Decl.cpp.
References AttributeLangSupport::C.
Referenced by clang::Sema::ActOnModuleInclude(), and clang::Sema::createImplicitModuleImportForErrorRecovery().
ArrayRef< SourceLocation > ImportDecl::getIdentifierLocs | ( | ) | const |
Retrieves the locations of each of the identifiers that make up the complete module name in the import declaration.
This will return an empty array if the locations of the individual identifiers aren't available.
Definition at line 4269 of file Decl.cpp.
References getImportedModule(), getNumModuleIdentifiers(), and clang::None.
Referenced by getSourceRange(), clang::index::IndexingContext::importedModule(), and clang::ASTDeclWriter::VisitImportDecl().
|
inline |
Retrieve the module that was imported by the import declaration.
Definition at line 3772 of file Decl.h.
Referenced by clang::CodeGen::CGDebugInfo::EmitImportDecl(), getIdentifierLocs(), and clang::ASTDeclWriter::VisitImportDecl().
|
override |
Definition at line 4278 of file Decl.cpp.
References getIdentifierLocs().
|
friend |
|
friend |