diff options
Diffstat (limited to 'include/clang/Lex')
-rw-r--r-- | include/clang/Lex/PPMutationListener.h | 43 | ||||
-rw-r--r-- | include/clang/Lex/Preprocessor.h | 19 |
2 files changed, 0 insertions, 62 deletions
diff --git a/include/clang/Lex/PPMutationListener.h b/include/clang/Lex/PPMutationListener.h deleted file mode 100644 index 995842974a..0000000000 --- a/include/clang/Lex/PPMutationListener.h +++ /dev/null @@ -1,43 +0,0 @@ -//===--- 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 diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index dafa497214..7a912ec0f8 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -21,7 +21,6 @@ #include "clang/Lex/Lexer.h" #include "clang/Lex/MacroInfo.h" #include "clang/Lex/PPCallbacks.h" -#include "clang/Lex/PPMutationListener.h" #include "clang/Lex/PTHLexer.h" #include "clang/Lex/PTHManager.h" #include "clang/Lex/TokenLexer.h" @@ -296,11 +295,6 @@ class Preprocessor : public RefCountedBase<Preprocessor> { /// encountered (e.g. a file is \#included, etc). PPCallbacks *Callbacks; - /// \brief Listener whose actions are invoked when an entity in the - /// preprocessor (e.g., a macro) that was loaded from an AST file is - /// later mutated. - PPMutationListener *Listener; - struct MacroExpandsInfo { Token Tok; MacroDirective *MD; @@ -519,19 +513,6 @@ public: Callbacks = C; } - /// \brief Attach an preprocessor mutation listener to the preprocessor. - /// - /// The preprocessor mutation listener provides the ability to track - /// modifications to the preprocessor entities committed after they were - /// initially created. - void setPPMutationListener(PPMutationListener *Listener) { - this->Listener = Listener; - } - - /// \brief Retrieve a pointer to the preprocessor mutation listener - /// associated with this preprocessor, if any. - PPMutationListener *getPPMutationListener() const { return Listener; } - /// \brief Given an identifier, return its latest MacroDirective if it is // \#defined or null if it isn't \#define'd. MacroDirective *getMacroDirective(IdentifierInfo *II) const { |