summaryrefslogtreecommitdiffstats
path: root/include/clang/Serialization/Module.h
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-12-30 11:49:41 +0000
committerdim <dim@FreeBSD.org>2015-12-30 11:49:41 +0000
commit3176e97f130184ece0e1a21352c8124cc83ff24a (patch)
tree0a5b74c0b9ca73aded34df95c91fcaf3815230d8 /include/clang/Serialization/Module.h
parent1e9b8d38881c3213d1e67b0c47ab9b2c00721a5c (diff)
downloadFreeBSD-src-3176e97f130184ece0e1a21352c8124cc83ff24a.zip
FreeBSD-src-3176e97f130184ece0e1a21352c8124cc83ff24a.tar.gz
Vendor import of clang trunk r256633:
https://llvm.org/svn/llvm-project/cfe/trunk@256633
Diffstat (limited to 'include/clang/Serialization/Module.h')
-rw-r--r--include/clang/Serialization/Module.h48
1 files changed, 18 insertions, 30 deletions
diff --git a/include/clang/Serialization/Module.h b/include/clang/Serialization/Module.h
index c98ced4..d6d16a0 100644
--- a/include/clang/Serialization/Module.h
+++ b/include/clang/Serialization/Module.h
@@ -15,9 +15,11 @@
#ifndef LLVM_CLANG_SERIALIZATION_MODULE_H
#define LLVM_CLANG_SERIALIZATION_MODULE_H
+#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Serialization/ASTBitCodes.h"
#include "clang/Serialization/ContinuousRangeMap.h"
+#include "clang/Serialization/ModuleFileExtension.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/Bitcode/BitstreamReader.h"
#include "llvm/Support/Endian.h"
@@ -31,7 +33,6 @@ template <typename Info> class OnDiskIterableChainedHashTable;
namespace clang {
-class FileEntry;
class DeclContext;
class Module;
@@ -50,17 +51,6 @@ enum ModuleKind {
MK_MainFile ///< File is a PCH file treated as the actual main file.
};
-/// \brief Information about the contents of a DeclContext.
-struct DeclContextInfo {
- DeclContextInfo()
- : NameLookupTableData(), LexicalDecls(), NumLexicalDecls() {}
-
- llvm::OnDiskIterableChainedHashTable<reader::ASTDeclContextNameLookupTrait>
- *NameLookupTableData; // an ASTDeclContextNameLookupTable.
- const KindDeclIDPair *LexicalDecls;
- unsigned NumLexicalDecls;
-};
-
/// \brief The input file that has been loaded from this AST file, along with
/// bools indicating whether this was an overridden buffer or if it was
/// out-of-date or not-found.
@@ -155,6 +145,9 @@ public:
/// \brief Whether this precompiled header is a relocatable PCH file.
bool RelocatablePCH;
+ /// \brief Whether timestamps are included in this module file.
+ bool HasTimestamps;
+
/// \brief The file entry for the module file.
const FileEntry *File;
@@ -202,6 +195,10 @@ public:
/// \brief The first source location in this module.
SourceLocation FirstLoc;
+ /// The list of extension readers that are attached to this module
+ /// file.
+ std::vector<std::unique_ptr<ModuleFileExtensionReader>> ExtensionReaders;
+
// === Input Files ===
/// \brief The cursor to the start of the input-files block.
llvm::BitstreamCursor InputFilesCursor;
@@ -270,6 +267,10 @@ public:
/// IdentifierHashTable.
void *IdentifierLookupTable;
+ /// \brief Offsets of identifiers that we're going to preload within
+ /// IdentifierTableData.
+ std::vector<unsigned> PreloadIdentifierOffsets;
+
// === Macros ===
/// \brief The cursor to the start of the preprocessor block, which stores
@@ -412,28 +413,10 @@ public:
/// indexed by the C++ ctor initializer list ID minus 1.
const uint32_t *CXXCtorInitializersOffsets;
- typedef llvm::DenseMap<const DeclContext *, DeclContextInfo>
- DeclContextInfosMap;
-
- /// \brief Information about the lexical and visible declarations
- /// for each DeclContext.
- DeclContextInfosMap DeclContextInfos;
-
/// \brief Array of file-level DeclIDs sorted by file.
const serialization::DeclID *FileSortedDecls;
unsigned NumFileSortedDecls;
- /// \brief Array of redeclaration chain location information within this
- /// module file, sorted by the first declaration ID.
- const serialization::LocalRedeclarationsInfo *RedeclarationsMap;
-
- /// \brief The number of redeclaration info entries in RedeclarationsMap.
- unsigned LocalNumRedeclarationsInMap;
-
- /// \brief The redeclaration chains for declarations local to this
- /// module file.
- SmallVector<uint64_t, 1> RedeclarationChains;
-
/// \brief Array of category list location information within this
/// module file, sorted by the definition ID.
const serialization::ObjCCategoriesInfo *ObjCCategoriesMap;
@@ -476,6 +459,11 @@ public:
/// any point during translation.
bool isDirectlyImported() const { return DirectlyImported; }
+ /// \brief Is this a module file for a module (rather than a PCH or similar).
+ bool isModule() const {
+ return Kind == MK_ImplicitModule || Kind == MK_ExplicitModule;
+ }
+
/// \brief Dump debugging output for this module.
void dump();
};
OpenPOWER on IntegriCloud