1 //===- ExternalPreprocessorSource.h - Abstract Macro Interface --*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines the ExternalPreprocessorSource interface, which enables
11 // construction of macro definitions from some external source.
13 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_LEX_EXTERNAL_PREPROCESSOR_SOURCE_H
15 #define LLVM_CLANG_LEX_EXTERNAL_PREPROCESSOR_SOURCE_H
21 /// \brief Abstract interface for external sources of preprocessor
24 /// This abstract class allows an external sources (such as the \c ASTReader)
25 /// to provide additional macro definitions.
26 class ExternalPreprocessorSource {
28 virtual ~ExternalPreprocessorSource();
30 /// \brief Read the set of macros defined by this external macro source.
31 virtual void ReadDefinedMacros() = 0;
33 /// \brief Update an out-of-date identifier.
34 virtual void updateOutOfDateIdentifier(IdentifierInfo &II) = 0;
39 #endif // LLVM_CLANG_LEX_EXTERNAL_PREPROCESSOR_SOURCE_H