summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReaderDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-03-11 01:44:51 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-03-11 01:44:51 +0000
commit8ce51084b803609393835403d20a40e4952b144f (patch)
tree0f2703b5dfab2ee927a82241d8743fc6abe735e3 /clang/lib/Serialization/ASTReaderDecl.cpp
parent67375c3bbc878fe77f2cb1ee101c863f9fea188d (diff)
downloadbcm5719-llvm-8ce51084b803609393835403d20a40e4952b144f.tar.gz
bcm5719-llvm-8ce51084b803609393835403d20a40e4952b144f.zip
[modules] Avoid accidentally completing the redeclaration chain when updating
all the existing declarations of a record-like entity with a pointer to its definition. llvm-svn: 231901
Diffstat (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r--clang/lib/Serialization/ASTReaderDecl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp
index 0789ba5e3e7..565f33ecba7 100644
--- a/clang/lib/Serialization/ASTReaderDecl.cpp
+++ b/clang/lib/Serialization/ASTReaderDecl.cpp
@@ -2799,6 +2799,10 @@ Decl *ASTDeclReader::getMostRecentDecl(Decl *D) {
llvm_unreachable("unknown decl kind");
}
+Decl *ASTReader::getMostRecentExistingDecl(Decl *D) {
+ return ASTDeclReader::getMostRecentDecl(D->getCanonicalDecl());
+}
+
template<typename DeclT>
void ASTDeclReader::attachPreviousDeclImpl(ASTReader &Reader,
Redeclarable<DeclT> *D,
OpenPOWER on IntegriCloud