diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-07-13 09:07:17 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-07-13 09:07:17 +0000 |
commit | 9b36c3f0de0105e903130bbda3c4aea7d792c0af (patch) | |
tree | 66f0c582d3ebf63b52b90596156e3ddf75814a4f /lib/Lex/Preprocessor.cpp | |
parent | de80ec1fa947855d2e53722a8cd71367ff513481 (diff) |
Modify the pragma handlers to accept and use StringRefs instead of IdentifierInfos.
When loading the PCH, IdentifierInfos that are associated with pragmas cause declarations that use these identifiers to be deserialized (e.g. the "clang" pragma causes the "clang" namespace to be loaded).
We can avoid this if we just use StringRefs for the pragmas.
As a bonus, since we don't have to create and pass IdentifierInfos, the pragma interfaces get a bit more simplified.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108237 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index c20ecef47b..51f729334c 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -87,7 +87,7 @@ Preprocessor::Preprocessor(Diagnostic &diags, const LangOptions &opts, (Ident__VA_ARGS__ = getIdentifierInfo("__VA_ARGS__"))->setIsPoisoned(); // Initialize the pragma handlers. - PragmaHandlers = new PragmaNamespace(0); + PragmaHandlers = new PragmaNamespace(llvm::StringRef()); RegisterBuiltinPragmas(); // Initialize builtin macros like __LINE__ and friends. |