clang API Documentation

ExternalPreprocessorSource.h
Go to the documentation of this file.
00001 //===- ExternalPreprocessorSource.h - Abstract Macro Interface --*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 //  This file defines the ExternalPreprocessorSource interface, which enables
00011 //  construction of macro definitions from some external source.
00012 //
00013 //===----------------------------------------------------------------------===//
00014 #ifndef LLVM_CLANG_LEX_EXTERNAL_PREPROCESSOR_SOURCE_H
00015 #define LLVM_CLANG_LEX_EXTERNAL_PREPROCESSOR_SOURCE_H
00016 
00017 namespace clang {
00018   
00019 /// \brief Abstract interface for external sources of preprocessor 
00020 /// information.
00021 ///
00022 /// This abstract class allows an external sources (such as the \c ASTReader) 
00023 /// to provide additional macro definitions.
00024 class ExternalPreprocessorSource {
00025 public:
00026   virtual ~ExternalPreprocessorSource();
00027   
00028   /// \brief Read the set of macros defined by this external macro source.
00029   virtual void ReadDefinedMacros() = 0;
00030   
00031   /// \brief Read the definition for the given macro.
00032   virtual void LoadMacroDefinition(IdentifierInfo *II) = 0;
00033   
00034   /// \brief Update an out-of-date identifier.
00035   virtual void updateOutOfDateIdentifier(IdentifierInfo &II) = 0;
00036 };
00037   
00038 }
00039 
00040 #endif // LLVM_CLANG_LEX_EXTERNAL_PREPROCESSOR_SOURCE_H