aboutsummaryrefslogtreecommitdiff
path: root/include/clang
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang')
-rw-r--r--include/clang/AST/DeclBase.h8
-rw-r--r--include/clang/Serialization/ASTReader.h7
2 files changed, 8 insertions, 7 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h
index 12f37e53e9..09e1fdcd63 100644
--- a/include/clang/AST/DeclBase.h
+++ b/include/clang/AST/DeclBase.h
@@ -532,6 +532,14 @@ public:
/// a precompiled header or module) rather than having been parsed.
bool isFromASTFile() const { return FromASTFile; }
+ /// \brief Retrieve the global declaration ID associated with this
+ /// declaration, which specifies where in the
+ unsigned getGlobalID() const {
+ if (isFromASTFile())
+ return *((const unsigned*)this - 1);
+ return 0;
+ }
+
unsigned getIdentifierNamespace() const {
return IdentifierNamespace;
}
diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h
index f808b962e1..4a704d0c35 100644
--- a/include/clang/Serialization/ASTReader.h
+++ b/include/clang/Serialization/ASTReader.h
@@ -675,13 +675,6 @@ private:
/// \brief Keeps track of the elements added to PendingDeclChains.
llvm::SmallSet<serialization::DeclID, 16> PendingDeclChainsKnown;
- /// \brief Reverse mapping from declarations to their global declaration IDs.
- ///
- /// FIXME: This data structure is currently only used for ObjCInterfaceDecls
- /// and ObjCProtocolDecls to support declaration merging. If we must have
- /// this for other declarations, allocate it along with the Decl itself.
- llvm::DenseMap<Decl *, serialization::GlobalDeclID> DeclToID;
-
typedef llvm::DenseMap<Decl *, llvm::SmallVector<serialization::DeclID, 2> >
MergedDeclsMap;