blob: 995842974a923ecff5afe8c1f8a84b8f6434be35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
//===--- PPMutationListener.h - Preprocessor Mutation Interface -*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines the PPMutationListener interface.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_LEX_PPTMUTATIONLISTENER_H
#define LLVM_CLANG_LEX_PPTMUTATIONLISTENER_H
#include "clang/Basic/SourceLocation.h"
namespace clang {
class MacroDirective;
/// \brief A record that describes an update to a macro that was
/// originally loaded to an AST file and has been modified within the
/// current translation unit.
struct MacroUpdate {
/// \brief The source location at which this macro was #undef'd.
SourceLocation UndefLoc;
};
/// \brief An abstract interface that should be implemented by
/// listeners that want to be notified when a preprocessor entity gets
/// modified after its initial creation.
class PPMutationListener {
public:
virtual ~PPMutationListener();
/// \brief A macro has been #undef'd.
virtual void UndefinedMacro(MacroDirective *MD) { }
};
} // end namespace clang
#endif
|