aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/clang/Sema/ExternalSemaSource.h4
-rw-r--r--include/clang/Sema/MultiplexExternalSemaSource.h3
-rw-r--r--include/clang/Sema/Sema.h4
-rw-r--r--include/clang/Serialization/ASTBitCodes.h6
-rw-r--r--include/clang/Serialization/ASTReader.h10
5 files changed, 22 insertions, 5 deletions
diff --git a/include/clang/Sema/ExternalSemaSource.h b/include/clang/Sema/ExternalSemaSource.h
index a730f67984..24a4fc2a57 100644
--- a/include/clang/Sema/ExternalSemaSource.h
+++ b/include/clang/Sema/ExternalSemaSource.h
@@ -15,6 +15,7 @@
#include "clang/AST/ExternalASTSource.h"
#include "clang/Sema/Weak.h"
+#include "llvm/ADT/MapVector.h"
#include <utility>
namespace clang {
@@ -65,6 +66,9 @@ public:
/// which will be used during typo correction.
virtual void ReadKnownNamespaces(
SmallVectorImpl<NamespaceDecl *> &Namespaces);
+
+ virtual void ReadUndefinedInternals(
+ llvm::MapVector<NamedDecl*, SourceLocation> &Undefined);
/// \brief Do last resort, unqualified lookup on a LookupResult that
/// Sema cannot find.
diff --git a/include/clang/Sema/MultiplexExternalSemaSource.h b/include/clang/Sema/MultiplexExternalSemaSource.h
index 25db3e7a21..cb57f23cc9 100644
--- a/include/clang/Sema/MultiplexExternalSemaSource.h
+++ b/include/clang/Sema/MultiplexExternalSemaSource.h
@@ -252,6 +252,9 @@ public:
/// \brief Load the set of namespaces that are known to the external source,
/// which will be used during typo correction.
virtual void ReadKnownNamespaces(SmallVectorImpl<NamespaceDecl*> &Namespaces);
+
+ virtual void ReadUndefinedInternals(
+ llvm::MapVector<NamedDecl*, SourceLocation> &Undefined);
/// \brief Do last resort, unqualified lookup on a LookupResult that
/// Sema cannot find.
diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h
index 6c6d384a54..bbe09f777b 100644
--- a/include/clang/Sema/Sema.h
+++ b/include/clang/Sema/Sema.h
@@ -740,7 +740,7 @@ public:
/// UndefinedInternals - all the used, undefined objects with
/// internal linkage in this translation unit.
- llvm::DenseMap<NamedDecl*, SourceLocation> UndefinedInternals;
+ llvm::MapVector<NamedDecl*, SourceLocation> UndefinedInternals;
typedef std::pair<ObjCMethodList, ObjCMethodList> GlobalMethods;
typedef llvm::DenseMap<Selector, GlobalMethods> GlobalMethodPool;
@@ -2234,7 +2234,7 @@ private:
//
// The boolean value will be true to indicate that the namespace was loaded
// from an AST/PCH file, or false otherwise.
- llvm::DenseMap<NamespaceDecl*, bool> KnownNamespaces;
+ llvm::MapVector<NamespaceDecl*, bool> KnownNamespaces;
/// \brief Whether we have already loaded known namespaces from an extenal
/// source.
diff --git a/include/clang/Serialization/ASTBitCodes.h b/include/clang/Serialization/ASTBitCodes.h
index 10453ec841..166434201c 100644
--- a/include/clang/Serialization/ASTBitCodes.h
+++ b/include/clang/Serialization/ASTBitCodes.h
@@ -524,7 +524,11 @@ namespace clang {
/// \brief Record of updates for a macro that was modified after
/// being deserialized.
- MACRO_UPDATES = 48
+ MACRO_UPDATES = 48,
+
+ /// \brief Record code for undefined but used internal functions and
+ /// variables.
+ UNDEFINED_INTERNALS = 49
};
/// \brief Record types used within a source manager block.
diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h
index 592556e9dc..7d4aa83b81 100644
--- a/include/clang/Serialization/ASTReader.h
+++ b/include/clang/Serialization/ASTReader.h
@@ -677,6 +677,9 @@ private:
/// \brief A list of the namespaces we've seen.
SmallVector<uint64_t, 4> KnownNamespaces;
+ /// \brief A list of undefined decls with internal linkage.
+ SmallVector<uint64_t, 8> UndefinedInternals;
+
/// \brief A list of modules that were imported by precompiled headers or
/// any other non-module AST file.
SmallVector<serialization::SubmoduleID, 2> ImportedModules;
@@ -1505,6 +1508,9 @@ public:
virtual void ReadKnownNamespaces(
SmallVectorImpl<NamespaceDecl *> &Namespaces);
+ virtual void ReadUndefinedInternals(
+ llvm::MapVector<NamedDecl *, SourceLocation> &Undefined);
+
virtual void ReadTentativeDefinitions(
SmallVectorImpl<VarDecl *> &TentativeDefs);
@@ -1675,13 +1681,13 @@ public:
/// \brief Read a source location.
SourceLocation ReadSourceLocation(ModuleFile &ModuleFile,
- const RecordData &Record, unsigned& Idx) {
+ const RecordData &Record, unsigned &Idx) {
return ReadSourceLocation(ModuleFile, Record[Idx++]);
}
/// \brief Read a source range.
SourceRange ReadSourceRange(ModuleFile &F,
- const RecordData &Record, unsigned& Idx);
+ const RecordData &Record, unsigned &Idx);
/// \brief Read an integral value
llvm::APInt ReadAPInt(const RecordData &Record, unsigned &Idx);