clang  6.0.0svn
ExternalPreprocessorSource.h
Go to the documentation of this file.
1 //===- ExternalPreprocessorSource.h - Abstract Macro Interface --*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the ExternalPreprocessorSource interface, which enables
11 // construction of macro definitions from some external source.
12 //
13 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_LEX_EXTERNALPREPROCESSORSOURCE_H
15 #define LLVM_CLANG_LEX_EXTERNALPREPROCESSORSOURCE_H
16 
17 namespace clang {
18 
19 class IdentifierInfo;
20 class Module;
21 
22 /// \brief Abstract interface for external sources of preprocessor
23 /// information.
24 ///
25 /// This abstract class allows an external sources (such as the \c ASTReader)
26 /// to provide additional preprocessing information.
28 public:
30 
31  /// \brief Read the set of macros defined by this external macro source.
32  virtual void ReadDefinedMacros() = 0;
33 
34  /// \brief Update an out-of-date identifier.
35  virtual void updateOutOfDateIdentifier(IdentifierInfo &II) = 0;
36 
37  /// \brief Return the identifier associated with the given ID number.
38  ///
39  /// The ID 0 is associated with the NULL identifier.
40  virtual IdentifierInfo *GetIdentifier(unsigned ID) = 0;
41 
42  /// \brief Map a module ID to a module.
43  virtual Module *getModule(unsigned ModuleID) = 0;
44 };
45 
46 }
47 
48 #endif
virtual IdentifierInfo * GetIdentifier(unsigned ID)=0
Return the identifier associated with the given ID number.
One of these records is kept for each identifier that is lexed.
Describes a module or submodule.
Definition: Module.h:65
Abstract interface for external sources of preprocessor information.
virtual void ReadDefinedMacros()=0
Read the set of macros defined by this external macro source.
Dataflow Directional Tag Classes.
virtual Module * getModule(unsigned ModuleID)=0
Map a module ID to a module.
virtual void updateOutOfDateIdentifier(IdentifierInfo &II)=0
Update an out-of-date identifier.