summaryrefslogtreecommitdiffstats
path: root/clang/include
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2015-12-08 22:43:32 +0000
committerDouglas Gregor <dgregor@apple.com>2015-12-08 22:43:32 +0000
commit8f64ca152985ac199ba8e2e6a94ebdba2ebd2db6 (patch)
tree7c41c0f664e7ad8e89319b7bee78a35a0ae8f3b6 /clang/include
parentd16c8065ff2e3c0030bb2e74ee6ffea80f46c7d6 (diff)
downloadbcm5719-llvm-8f64ca152985ac199ba8e2e6a94ebdba2ebd2db6.tar.gz
bcm5719-llvm-8f64ca152985ac199ba8e2e6a94ebdba2ebd2db6.zip
Module file extensions: pass a Sema through to the extension writer.
Module file extensions are likely to need access to Sema/Preprocessor/ASTContext, and cannot get it through other sources. llvm-svn: 255065
Diffstat (limited to 'clang/include')
-rw-r--r--clang/include/clang/Serialization/ASTWriter.h3
-rw-r--r--clang/include/clang/Serialization/ModuleFileExtension.h8
2 files changed, 7 insertions, 4 deletions
diff --git a/clang/include/clang/Serialization/ASTWriter.h b/clang/include/clang/Serialization/ASTWriter.h
index 86dbceef4c4..ed345472fc7 100644
--- a/clang/include/clang/Serialization/ASTWriter.h
+++ b/clang/include/clang/Serialization/ASTWriter.h
@@ -551,7 +551,8 @@ private:
void WriteObjCCategories();
void WriteLateParsedTemplates(Sema &SemaRef);
void WriteOptimizePragmaOptions(Sema &SemaRef);
- void WriteModuleFileExtension(ModuleFileExtensionWriter &Writer);
+ void WriteModuleFileExtension(Sema &SemaRef,
+ ModuleFileExtensionWriter &Writer);
unsigned DeclParmVarAbbrev;
unsigned DeclContextLexicalAbbrev;
diff --git a/clang/include/clang/Serialization/ModuleFileExtension.h b/clang/include/clang/Serialization/ModuleFileExtension.h
index a8f8386e649..ba2e2fd0d9f 100644
--- a/clang/include/clang/Serialization/ModuleFileExtension.h
+++ b/clang/include/clang/Serialization/ModuleFileExtension.h
@@ -25,7 +25,8 @@ namespace clang {
class ASTReader;
class ASTWriter;
-
+class Sema;
+
namespace serialization {
class ModuleFile;
} // end namespace serialization
@@ -79,7 +80,7 @@ public:
/// The default implementation of this function simply returns the
/// hash code as given, so the presence/absence of this extension
/// does not distinguish module files.
- virtual llvm::hash_code hashExtension(llvm::hash_code Code) const;
+ virtual llvm::hash_code hashExtension(llvm::hash_code c) const;
/// Create a new module file extension writer, which will be
/// responsible for writing the extension contents into a particular
@@ -120,7 +121,8 @@ public:
/// Responsible for writing the contents of the extension into the
/// given stream. All of the contents should be written into custom
/// records with IDs >= FIRST_EXTENSION_RECORD_ID.
- virtual void writeExtensionContents(llvm::BitstreamWriter &Stream) = 0;
+ virtual void writeExtensionContents(Sema &SemaRef,
+ llvm::BitstreamWriter &Stream) = 0;
};
/// Abstract base class that reads a module file extension block from
OpenPOWER on IntegriCloud