1 //===--- PPMutationListener.h - Preprocessor Mutation 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 PPMutationListener interface.
12 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_CLANG_LEX_PPTMUTATIONLISTENER_H
14 #define LLVM_CLANG_LEX_PPTMUTATIONLISTENER_H
16 #include "clang/Basic/SourceLocation.h"
22 /// \brief A record that describes an update to a macro that was
23 /// originally loaded to an AST file and has been modified within the
24 /// current translation unit.
26 /// \brief The source location at which this macro was #undef'd.
27 SourceLocation UndefLoc;
30 /// \brief An abstract interface that should be implemented by
31 /// listeners that want to be notified when a preprocessor entity gets
32 /// modified after its initial creation.
33 class PPMutationListener {
35 virtual ~PPMutationListener();
37 /// \brief A macro has been #undef'd.
38 virtual void UndefinedMacro(MacroInfo *MI) { }
41 } // end namespace clang