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_EXTERNALPREPROCESSORSOURCE_H
00015 #define LLVM_CLANG_LEX_EXTERNALPREPROCESSORSOURCE_H
00016 
00017 namespace clang {
00018 
00019 class IdentifierInfo;
00020 
00021 /// \brief Abstract interface for external sources of preprocessor 
00022 /// information.
00023 ///
00024 /// This abstract class allows an external sources (such as the \c ASTReader) 
00025 /// to provide additional macro definitions.
00026 class ExternalPreprocessorSource {
00027 public:
00028   virtual ~ExternalPreprocessorSource();
00029   
00030   /// \brief Read the set of macros defined by this external macro source.
00031   virtual void ReadDefinedMacros() = 0;
00032   
00033   /// \brief Update an out-of-date identifier.
00034   virtual void updateOutOfDateIdentifier(IdentifierInfo &II) = 0;
00035 };
00036   
00037 }
00038 
00039 #endif