clang 19.0.0git
ExternalPreprocessorSource.h
Go to the documentation of this file.
1//===- ExternalPreprocessorSource.h - Abstract Macro Interface --*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines the ExternalPreprocessorSource interface, which enables
10// construction of macro definitions from some external source.
11//
12//===----------------------------------------------------------------------===//
13#ifndef LLVM_CLANG_LEX_EXTERNALPREPROCESSORSOURCE_H
14#define LLVM_CLANG_LEX_EXTERNALPREPROCESSORSOURCE_H
15
16namespace clang {
17
18class IdentifierInfo;
19class Module;
20
21/// Abstract interface for external sources of preprocessor
22/// information.
23///
24/// This abstract class allows an external sources (such as the \c ASTReader)
25/// to provide additional preprocessing information.
27public:
29
30 /// Read the set of macros defined by this external macro source.
31 virtual void ReadDefinedMacros() = 0;
32
33 /// Update an out-of-date identifier.
34 virtual void updateOutOfDateIdentifier(const IdentifierInfo &II) = 0;
35
36 /// Return the identifier associated with the given ID number.
37 ///
38 /// The ID 0 is associated with the NULL identifier.
39 virtual IdentifierInfo *GetIdentifier(unsigned ID) = 0;
40
41 /// Map a module ID to a module.
42 virtual Module *getModule(unsigned ModuleID) = 0;
43};
44
45}
46
47#endif
static char ID
Definition: Arena.cpp:183
Abstract interface for external sources of preprocessor information.
virtual IdentifierInfo * GetIdentifier(unsigned ID)=0
Return the identifier associated with the given ID number.
virtual void updateOutOfDateIdentifier(const IdentifierInfo &II)=0
Update an out-of-date identifier.
virtual void ReadDefinedMacros()=0
Read the set of macros defined by this external macro source.
virtual Module * getModule(unsigned ModuleID)=0
Map a module ID to a module.
One of these records is kept for each identifier that is lexed.
Describes a module or submodule.
Definition: Module.h:105
The JSON file list parser is used to communicate input to InstallAPI.
@ Module
Module linkage, which indicates that the entity can be referred to from other translation units withi...