aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Lex')
-rw-r--r--include/clang/Lex/DirectoryLookup.h2
-rw-r--r--include/clang/Lex/HeaderMap.h2
-rw-r--r--include/clang/Lex/HeaderSearch.h27
-rw-r--r--include/clang/Lex/HeaderSearchOptions.h14
-rw-r--r--include/clang/Lex/LiteralSupport.h2
-rw-r--r--include/clang/Lex/ModuleLoader.h25
-rw-r--r--include/clang/Lex/ModuleMap.h44
-rw-r--r--include/clang/Lex/PPCallbacks.h4
-rw-r--r--include/clang/Lex/PTHManager.h7
-rw-r--r--include/clang/Lex/PreprocessingRecord.h23
-rw-r--r--include/clang/Lex/Preprocessor.h47
-rw-r--r--include/clang/Lex/PreprocessorOptions.h1
12 files changed, 138 insertions, 60 deletions
diff --git a/include/clang/Lex/DirectoryLookup.h b/include/clang/Lex/DirectoryLookup.h
index ee0af292e6fc..dcd58f434fa2 100644
--- a/include/clang/Lex/DirectoryLookup.h
+++ b/include/clang/Lex/DirectoryLookup.h
@@ -88,7 +88,7 @@ public:
/// getName - Return the directory or filename corresponding to this lookup
/// object.
- const char *getName() const;
+ StringRef getName() const;
/// getDir - Return the directory that this entry refers to.
///
diff --git a/include/clang/Lex/HeaderMap.h b/include/clang/Lex/HeaderMap.h
index 8466f1a24d52..58bf79579a6a 100644
--- a/include/clang/Lex/HeaderMap.h
+++ b/include/clang/Lex/HeaderMap.h
@@ -45,7 +45,7 @@ public:
SmallVectorImpl<char> &DestPath) const;
/// Return the filename of the headermap.
- const char *getFileName() const;
+ StringRef getFileName() const;
/// Print the contents of this headermap to stderr.
void dump() const;
diff --git a/include/clang/Lex/HeaderSearch.h b/include/clang/Lex/HeaderSearch.h
index 7bac01ef3a4c..b145d7bae15a 100644
--- a/include/clang/Lex/HeaderSearch.h
+++ b/include/clang/Lex/HeaderSearch.h
@@ -464,6 +464,9 @@ public:
/// FileEntry, uniquing them through the 'HeaderMaps' datastructure.
const HeaderMap *CreateHeaderMap(const FileEntry *FE);
+ /// \brief Get filenames for all registered header maps.
+ void getHeaderMapFileNames(SmallVectorImpl<std::string> &Names) const;
+
/// \brief Retrieve the name of the module file that should be used to
/// load the given module.
///
@@ -481,9 +484,12 @@ public:
/// \param ModuleMapPath A path that when combined with \c ModuleName
/// uniquely identifies this module. See Module::ModuleMap.
///
+ /// \param UsePrebuiltPath Whether we should use the prebuilt module path.
+ ///
/// \returns The name of the module file that corresponds to this module,
/// or an empty string if this module does not correspond to any module file.
- std::string getModuleFileName(StringRef ModuleName, StringRef ModuleMapPath);
+ std::string getModuleFileName(StringRef ModuleName, StringRef ModuleMapPath,
+ bool UsePrebuiltPath);
/// \brief Lookup a module Search for a module with the given name.
///
@@ -520,8 +526,10 @@ public:
/// \brief Retrieve the module that corresponds to the given file, if any.
///
/// \param File The header that we wish to map to a module.
- ModuleMap::KnownHeader findModuleForHeader(const FileEntry *File) const;
-
+ /// \param AllowTextual Whether we want to find textual headers too.
+ ModuleMap::KnownHeader findModuleForHeader(const FileEntry *File,
+ bool AllowTextual = false) const;
+
/// \brief Read the contents of the given module map file.
///
/// \param File The module map file.
@@ -539,6 +547,19 @@ public:
void loadTopLevelSystemModules();
private:
+
+ /// \brief Lookup a module with the given module name and search-name.
+ ///
+ /// \param ModuleName The name of the module we're looking for.
+ ///
+ /// \param SearchName The "search-name" to derive filesystem paths from
+ /// when looking for the module map; this is usually equal to ModuleName,
+ /// but for compatibility with some buggy frameworks, additional attempts
+ /// may be made to find the module under a related-but-different search-name.
+ ///
+ /// \returns The module named ModuleName.
+ Module *lookupModule(StringRef ModuleName, StringRef SearchName);
+
/// \brief Retrieve a module with the given name, which may be part of the
/// given framework.
///
diff --git a/include/clang/Lex/HeaderSearchOptions.h b/include/clang/Lex/HeaderSearchOptions.h
index 915dbf74b2a4..815b68c60e80 100644
--- a/include/clang/Lex/HeaderSearchOptions.h
+++ b/include/clang/Lex/HeaderSearchOptions.h
@@ -11,6 +11,7 @@
#define LLVM_CLANG_LEX_HEADERSEARCHOPTIONS_H
#include "clang/Basic/LLVM.h"
+#include "llvm/ADT/CachedHashString.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/StringRef.h"
@@ -93,6 +94,9 @@ public:
/// \brief The directory used for a user build.
std::string ModuleUserBuildPath;
+ /// \brief The directories used to load prebuilt module files.
+ std::vector<std::string> PrebuiltModulePaths;
+
/// The module/pch container format.
std::string ModuleFormat;
@@ -141,7 +145,7 @@ public:
/// \brief The set of macro names that should be ignored for the purposes
/// of computing the module hash.
- llvm::SmallSetVector<std::string, 16> ModulesIgnoreMacros;
+ llvm::SmallSetVector<llvm::CachedHashString, 16> ModulesIgnoreMacros;
/// \brief The set of user-provided virtual filesystem overlay files.
std::vector<std::string> VFSOverlayFiles;
@@ -172,6 +176,8 @@ public:
/// Whether the module includes debug information (-gmodules).
unsigned UseDebugInfo : 1;
+ unsigned ModulesValidateDiagnosticOptions : 1;
+
HeaderSearchOptions(StringRef _Sysroot = "/")
: Sysroot(_Sysroot), ModuleFormat("raw"), DisableModuleHash(0),
ImplicitModuleMaps(0), ModuleMapFileHomeIsCwd(0),
@@ -181,7 +187,7 @@ public:
UseStandardCXXIncludes(true), UseLibcxx(false), Verbose(false),
ModulesValidateOncePerBuildSession(false),
ModulesValidateSystemHeaders(false),
- UseDebugInfo(false) {}
+ UseDebugInfo(false), ModulesValidateDiagnosticOptions(true) {}
/// AddPath - Add the \p Path path to the specified \p Group list.
void AddPath(StringRef Path, frontend::IncludeDirGroup Group,
@@ -199,6 +205,10 @@ public:
void AddVFSOverlayFile(StringRef Name) {
VFSOverlayFiles.push_back(Name);
}
+
+ void AddPrebuiltModulePath(StringRef Name) {
+ PrebuiltModulePaths.push_back(Name);
+ }
};
} // end namespace clang
diff --git a/include/clang/Lex/LiteralSupport.h b/include/clang/Lex/LiteralSupport.h
index 5f946fc8337e..b66581b428b1 100644
--- a/include/clang/Lex/LiteralSupport.h
+++ b/include/clang/Lex/LiteralSupport.h
@@ -259,6 +259,8 @@ public:
return UDSuffixOffset;
}
+ static bool isValidUDSuffix(const LangOptions &LangOpts, StringRef Suffix);
+
private:
void init(ArrayRef<Token> StringToks);
bool CopyStringFragment(const Token &Tok, const char *TokBegin,
diff --git a/include/clang/Lex/ModuleLoader.h b/include/clang/Lex/ModuleLoader.h
index ae79650d1fd0..70770d17e9ff 100644
--- a/include/clang/Lex/ModuleLoader.h
+++ b/include/clang/Lex/ModuleLoader.h
@@ -31,13 +31,22 @@ typedef ArrayRef<std::pair<IdentifierInfo *, SourceLocation> > ModuleIdPath;
/// \brief Describes the result of attempting to load a module.
class ModuleLoadResult {
- llvm::PointerIntPair<Module *, 1, bool> Storage;
-
public:
- ModuleLoadResult() : Storage() { }
+ enum LoadResultKind {
+ // We either succeeded or failed to load the named module.
+ Normal,
+ // The module exists, but does not actually contain the named submodule.
+ // This should only happen if the named submodule was inferred from an
+ // umbrella directory, but not actually part of the umbrella header.
+ MissingExpected,
+ // The module exists but cannot be imported due to a configuration mismatch.
+ ConfigMismatch
+ };
+ llvm::PointerIntPair<Module *, 2, LoadResultKind> Storage;
- ModuleLoadResult(Module *module, bool missingExpected)
- : Storage(module, missingExpected) { }
+ ModuleLoadResult() : Storage() { }
+ ModuleLoadResult(Module *M) : Storage(M, Normal) {}
+ ModuleLoadResult(LoadResultKind Kind) : Storage(nullptr, Kind) {}
operator Module *() const { return Storage.getPointer(); }
@@ -45,7 +54,11 @@ public:
/// actually a submodule that we expected to see (based on implying the
/// submodule from header structure), but didn't materialize in the actual
/// module.
- bool isMissingExpected() const { return Storage.getInt(); }
+ bool isMissingExpected() const { return Storage.getInt() == MissingExpected; }
+
+ /// \brief Determines whether the module failed to load due to a configuration
+ /// mismatch with an explicitly-named .pcm file from the command line.
+ bool isConfigMismatch() const { return Storage.getInt() == ConfigMismatch; }
};
/// \brief Abstract interface for a module loader.
diff --git a/include/clang/Lex/ModuleMap.h b/include/clang/Lex/ModuleMap.h
index 1e86f736983f..b3a2421af86e 100644
--- a/include/clang/Lex/ModuleMap.h
+++ b/include/clang/Lex/ModuleMap.h
@@ -12,22 +12,28 @@
//
//===----------------------------------------------------------------------===//
-
#ifndef LLVM_CLANG_LEX_MODULEMAP_H
#define LLVM_CLANG_LEX_MODULEMAP_H
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/Module.h"
+#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
+#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/IntrusiveRefCntPtr.h"
+#include "llvm/ADT/PointerIntPair.h"
+#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/ADT/Twine.h"
+#include <algorithm>
+#include <memory>
#include <string>
+#include <utility>
namespace clang {
-
+
class DirectoryEntry;
class FileEntry;
class FileManager;
@@ -40,7 +46,7 @@ class ModuleMapParser;
/// reads module map files.
class ModuleMapCallbacks {
public:
- virtual ~ModuleMapCallbacks() {}
+ virtual ~ModuleMapCallbacks() = default;
/// \brief Called when a module map file has been read.
///
@@ -153,7 +159,7 @@ public:
typedef llvm::SmallPtrSet<const FileEntry *, 1> AdditionalModMapsSet;
private:
- typedef llvm::DenseMap<const FileEntry *, SmallVector<KnownHeader, 1> >
+ typedef llvm::DenseMap<const FileEntry *, SmallVector<KnownHeader, 1>>
HeadersMap;
/// \brief Mapping from each header to the module that owns the contents of
@@ -170,7 +176,8 @@ private:
/// \brief The set of attributes that can be attached to a module.
struct Attributes {
- Attributes() : IsSystem(), IsExternC(), IsExhaustive() {}
+ Attributes()
+ : IsSystem(), IsExternC(), IsExhaustive(), NoUndeclaredIncludes() {}
/// \brief Whether this is a system module.
unsigned IsSystem : 1;
@@ -180,6 +187,10 @@ private:
/// \brief Whether this is an exhaustive set of configuration macros.
unsigned IsExhaustive : 1;
+
+ /// \brief Whether files in this module can only include non-modular headers
+ /// and headers from used modules.
+ unsigned NoUndeclaredIncludes : 1;
};
/// \brief A directory for which framework modules can be inferred.
@@ -314,10 +325,15 @@ public:
///
/// \param File The header file that is likely to be included.
///
+ /// \param AllowTextual If \c true and \p File is a textual header, return
+ /// its owning module. Otherwise, no KnownHeader will be returned if the
+ /// file is only known as a textual header.
+ ///
/// \returns The module KnownHeader, which provides the module that owns the
/// given header file. The KnownHeader is default constructed to indicate
/// that no module owns this header file.
- KnownHeader findModuleForHeader(const FileEntry *File);
+ KnownHeader findModuleForHeader(const FileEntry *File,
+ bool AllowTextual = false);
/// \brief Retrieve all the modules that contain the given header file. This
/// may not include umbrella modules, nor information from external sources,
@@ -402,6 +418,15 @@ public:
bool IsFramework,
bool IsExplicit);
+ /// \brief Create a new module for a C++ Modules TS module interface unit.
+ /// The module must not already exist, and will be configured for the current
+ /// compilation.
+ ///
+ /// Note that this also sets the current module to the newly-created module.
+ ///
+ /// \returns The newly-created module.
+ Module *createModuleForInterfaceUnit(SourceLocation Loc, StringRef Name);
+
/// \brief Infer the contents of a framework module map from the given
/// framework directory.
Module *inferFrameworkModule(const DirectoryEntry *FrameworkDir,
@@ -529,5 +554,6 @@ public:
module_iterator module_end() const { return Modules.end(); }
};
-}
-#endif
+} // end namespace clang
+
+#endif // LLVM_CLANG_LEX_MODULEMAP_H
diff --git a/include/clang/Lex/PPCallbacks.h b/include/clang/Lex/PPCallbacks.h
index 68b8f1cc7348..2d027f314b5f 100644
--- a/include/clang/Lex/PPCallbacks.h
+++ b/include/clang/Lex/PPCallbacks.h
@@ -17,14 +17,12 @@
#include "clang/Basic/DiagnosticIDs.h"
#include "clang/Basic/SourceLocation.h"
-#include "clang/Lex/DirectoryLookup.h"
+#include "clang/Basic/SourceManager.h"
#include "clang/Lex/ModuleLoader.h"
#include "clang/Lex/Pragma.h"
#include "llvm/ADT/StringRef.h"
-#include <string>
namespace clang {
- class SourceLocation;
class Token;
class IdentifierInfo;
class MacroDefinition;
diff --git a/include/clang/Lex/PTHManager.h b/include/clang/Lex/PTHManager.h
index 26178eddf36d..f4e4774429f9 100644
--- a/include/clang/Lex/PTHManager.h
+++ b/include/clang/Lex/PTHManager.h
@@ -14,15 +14,11 @@
#ifndef LLVM_CLANG_LEX_PTHMANAGER_H
#define LLVM_CLANG_LEX_PTHMANAGER_H
-#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/IdentifierTable.h"
-#include "clang/Basic/LangOptions.h"
-#include "clang/Lex/PTHLexer.h"
-#include "llvm/ADT/DenseMap.h"
+#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/OnDiskHashTable.h"
-#include <string>
namespace llvm {
class MemoryBuffer;
@@ -31,6 +27,7 @@ namespace llvm {
namespace clang {
class FileEntry;
+class Preprocessor;
class PTHLexer;
class DiagnosticsEngine;
class FileSystemStatCache;
diff --git a/include/clang/Lex/PreprocessingRecord.h b/include/clang/Lex/PreprocessingRecord.h
index 87b8ce1af0de..826ba33fbb72 100644
--- a/include/clang/Lex/PreprocessingRecord.h
+++ b/include/clang/Lex/PreprocessingRecord.h
@@ -19,7 +19,6 @@
#include "clang/Lex/PPCallbacks.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Optional.h"
-#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/iterator.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Compiler.h"
@@ -33,11 +32,11 @@ namespace clang {
/// \brief Allocates memory within a Clang preprocessing record.
void *operator new(size_t bytes, clang::PreprocessingRecord &PR,
- unsigned alignment = 8) LLVM_NOEXCEPT;
+ unsigned alignment = 8) noexcept;
/// \brief Frees memory allocated in a Clang preprocessing record.
void operator delete(void *ptr, clang::PreprocessingRecord &PR,
- unsigned) LLVM_NOEXCEPT;
+ unsigned) noexcept;
namespace clang {
class MacroDefinitionRecord;
@@ -99,24 +98,24 @@ namespace clang {
// Only allow allocation of preprocessed entities using the allocator
// in PreprocessingRecord or by doing a placement new.
void *operator new(size_t bytes, PreprocessingRecord &PR,
- unsigned alignment = 8) LLVM_NOEXCEPT {
+ unsigned alignment = 8) noexcept {
return ::operator new(bytes, PR, alignment);
}
- void *operator new(size_t bytes, void *mem) LLVM_NOEXCEPT { return mem; }
+ void *operator new(size_t bytes, void *mem) noexcept { return mem; }
void operator delete(void *ptr, PreprocessingRecord &PR,
- unsigned alignment) LLVM_NOEXCEPT {
+ unsigned alignment) noexcept {
return ::operator delete(ptr, PR, alignment);
}
- void operator delete(void *, std::size_t) LLVM_NOEXCEPT {}
- void operator delete(void *, void *) LLVM_NOEXCEPT {}
+ void operator delete(void *, std::size_t) noexcept {}
+ void operator delete(void *, void *) noexcept {}
private:
// Make vanilla 'new' and 'delete' illegal for preprocessed entities.
- void *operator new(size_t bytes) LLVM_NOEXCEPT;
- void operator delete(void *data) LLVM_NOEXCEPT;
+ void *operator new(size_t bytes) noexcept;
+ void operator delete(void *data) noexcept;
};
/// \brief Records the presence of a preprocessor directive.
@@ -524,12 +523,12 @@ namespace clang {
} // end namespace clang
inline void *operator new(size_t bytes, clang::PreprocessingRecord &PR,
- unsigned alignment) LLVM_NOEXCEPT {
+ unsigned alignment) noexcept {
return PR.Allocate(bytes, alignment);
}
inline void operator delete(void *ptr, clang::PreprocessingRecord &PR,
- unsigned) LLVM_NOEXCEPT {
+ unsigned) noexcept {
PR.Deallocate(ptr);
}
diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h
index 30cc37f6f884..bb71f49290b4 100644
--- a/include/clang/Lex/Preprocessor.h
+++ b/include/clang/Lex/Preprocessor.h
@@ -265,6 +265,10 @@ class Preprocessor : public RefCountedBase<Preprocessor> {
/// \brief True if we hit the code-completion point.
bool CodeCompletionReached;
+ /// \brief The code completion token containing the information
+ /// on the stem that is to be code completed.
+ IdentifierInfo *CodeCompletionII;
+
/// \brief The directory that the main file should be considered to occupy,
/// if it does not correspond to a real file (as happens when building a
/// module).
@@ -346,14 +350,6 @@ class Preprocessor : public RefCountedBase<Preprocessor> {
ThePPLexer(std::move(ThePPLexer)),
TheTokenLexer(std::move(TheTokenLexer)),
TheDirLookup(std::move(TheDirLookup)) {}
- IncludeStackInfo(IncludeStackInfo &&RHS)
- : CurLexerKind(std::move(RHS.CurLexerKind)),
- TheSubmodule(std::move(RHS.TheSubmodule)),
- TheLexer(std::move(RHS.TheLexer)),
- ThePTHLexer(std::move(RHS.ThePTHLexer)),
- ThePPLexer(std::move(RHS.ThePPLexer)),
- TheTokenLexer(std::move(RHS.TheTokenLexer)),
- TheDirLookup(std::move(RHS.TheDirLookup)) {}
};
std::vector<IncludeStackInfo> IncludeMacroStack;
@@ -394,6 +390,8 @@ class Preprocessor : public RefCountedBase<Preprocessor> {
ModuleMacroInfo *getModuleInfo(Preprocessor &PP,
const IdentifierInfo *II) const {
+ if (II->isOutOfDate())
+ PP.updateOutOfDateIdentifier(const_cast<IdentifierInfo&>(*II));
// FIXME: Find a spare bit on IdentifierInfo and store a
// HasModuleMacros flag.
if (!II->hasMacroDefinition() ||
@@ -418,10 +416,10 @@ class Preprocessor : public RefCountedBase<Preprocessor> {
public:
MacroState() : MacroState(nullptr) {}
MacroState(MacroDirective *MD) : State(MD) {}
- MacroState(MacroState &&O) LLVM_NOEXCEPT : State(O.State) {
+ MacroState(MacroState &&O) noexcept : State(O.State) {
O.State = (MacroDirective *)nullptr;
}
- MacroState &operator=(MacroState &&O) LLVM_NOEXCEPT {
+ MacroState &operator=(MacroState &&O) noexcept {
auto S = O.State;
O.State = (MacroDirective *)nullptr;
State = S;
@@ -649,6 +647,8 @@ class Preprocessor : public RefCountedBase<Preprocessor> {
};
DeserializedMacroInfoChain *DeserialMIChainHead;
+ void updateOutOfDateIdentifier(IdentifierInfo &II) const;
+
public:
Preprocessor(IntrusiveRefCntPtr<PreprocessorOptions> PPOpts,
DiagnosticsEngine &diags, LangOptions &opts,
@@ -887,7 +887,8 @@ public:
return appendDefMacroDirective(II, MI, MI->getDefinitionLoc());
}
/// \brief Set a MacroDirective that was loaded from a PCH file.
- void setLoadedMacroDirective(IdentifierInfo *II, MacroDirective *MD);
+ void setLoadedMacroDirective(IdentifierInfo *II, MacroDirective *ED,
+ MacroDirective *MD);
/// \brief Register an exported macro for a module and identifier.
ModuleMacro *addModuleMacro(Module *Mod, IdentifierInfo *II, MacroInfo *Macro,
@@ -896,6 +897,8 @@ public:
/// \brief Get the list of leaf (non-overridden) module macros for a name.
ArrayRef<ModuleMacro*> getLeafModuleMacros(const IdentifierInfo *II) const {
+ if (II->isOutOfDate())
+ updateOutOfDateIdentifier(const_cast<IdentifierInfo&>(*II));
auto I = LeafModuleMacros.find(II);
if (I != LeafModuleMacros.end())
return I->second;
@@ -984,6 +987,18 @@ public:
/// completion point.
void CodeCompleteNaturalLanguage();
+ /// \brief Set the code completion token for filtering purposes.
+ void setCodeCompletionIdentifierInfo(IdentifierInfo *Filter) {
+ CodeCompletionII = Filter;
+ }
+
+ /// \brief Get the code completion token for filtering purposes.
+ StringRef getCodeCompletionFilter() {
+ if (CodeCompletionII)
+ return CodeCompletionII->getName();
+ return {};
+ }
+
/// \brief Retrieve the preprocessing record, or NULL if there is no
/// preprocessing record.
PreprocessingRecord *getPreprocessingRecord() const { return Record; }
@@ -1862,12 +1877,12 @@ private:
/// Handle*Directive - implement the various preprocessor directives. These
/// should side-effect the current preprocessor object so that the next call
/// to Lex() will return the appropriate token next.
- void HandleLineDirective(Token &Tok);
+ void HandleLineDirective();
void HandleDigitDirective(Token &Tok);
void HandleUserDiagnosticDirective(Token &Tok, bool isWarning);
void HandleIdentSCCSDirective(Token &Tok);
void HandleMacroPublicDirective(Token &Tok);
- void HandleMacroPrivateDirective(Token &Tok);
+ void HandleMacroPrivateDirective();
// File inclusion.
void HandleIncludeDirective(SourceLocation HashLoc,
@@ -1907,7 +1922,7 @@ public:
private:
// Macro handling.
void HandleDefineDirective(Token &Tok, bool ImmediatelyAfterTopLevelIfndef);
- void HandleUndefDirective(Token &Tok);
+ void HandleUndefDirective();
// Conditional Inclusion.
void HandleIfdefDirective(Token &Tok, bool isIfndef,
@@ -1923,7 +1938,7 @@ private:
public:
void HandlePragmaOnce(Token &OnceTok);
void HandlePragmaMark();
- void HandlePragmaPoison(Token &PoisonTok);
+ void HandlePragmaPoison();
void HandlePragmaSystemHeader(Token &SysHeaderTok);
void HandlePragmaDependency(Token &DependencyTok);
void HandlePragmaPushMacro(Token &Tok);
@@ -1956,6 +1971,4 @@ typedef llvm::Registry<PragmaHandler> PragmaHandlerRegistry;
} // end namespace clang
-extern template class llvm::Registry<clang::PragmaHandler>;
-
#endif
diff --git a/include/clang/Lex/PreprocessorOptions.h b/include/clang/Lex/PreprocessorOptions.h
index 963d95d7f1d1..de652cccb83a 100644
--- a/include/clang/Lex/PreprocessorOptions.h
+++ b/include/clang/Lex/PreprocessorOptions.h
@@ -12,7 +12,6 @@
#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
-#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSet.h"
#include <cassert>