summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReaderDecl.cpp
diff options
context:
space:
mode:
authorTyker <tyker1@outlook.com>2019-12-01 22:38:31 +0100
committerTyker <tyker1@outlook.com>2019-12-01 22:38:31 +0100
commitae5484540f15bcbcb0de9558e66b0217ab8473ed (patch)
tree32cea3c91b7dbb7b6272425ecf92050da54515e6 /clang/lib/Serialization/ASTReaderDecl.cpp
parenta3cbe1a202df6ec8e23bd55e14db254e4bc33021 (diff)
downloadbcm5719-llvm-ae5484540f15bcbcb0de9558e66b0217ab8473ed.tar.gz
bcm5719-llvm-ae5484540f15bcbcb0de9558e66b0217ab8473ed.zip
Revert "[clang][modules] Add support for merging lifetime-extended temporaries"
This reverts commit a3cbe1a202df6ec8e23bd55e14db254e4bc33021.
Diffstat (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r--clang/lib/Serialization/ASTReaderDecl.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp
index 3f7a1ed7fd5..8991a39a706 100644
--- a/clang/lib/Serialization/ASTReaderDecl.cpp
+++ b/clang/lib/Serialization/ASTReaderDecl.cpp
@@ -424,8 +424,6 @@ namespace clang {
template<typename T>
void mergeMergeable(Mergeable<T> *D);
- void mergeMergeable(LifetimeExtendedTemporaryDecl *D);
-
void mergeTemplatePattern(RedeclarableTemplateDecl *D,
RedeclarableTemplateDecl *Existing,
DeclID DsID, bool IsKeyDecl);
@@ -2360,7 +2358,6 @@ void ASTDeclReader::VisitLifetimeExtendedTemporaryDecl(
if (Record.readInt())
D->Value = new (D->getASTContext()) APValue(Record.readAPValue());
D->ManglingNumber = Record.readInt();
- mergeMergeable(D);
}
std::pair<uint64_t, uint64_t>
@@ -2558,25 +2555,6 @@ static bool allowODRLikeMergeInC(NamedDecl *ND) {
return false;
}
-/// Attempts to merge LifetimeExtendedTemporaryDecl with
-/// identical class definitions from two different modules.
-void ASTDeclReader::mergeMergeable(LifetimeExtendedTemporaryDecl *D) {
- // If modules are not available, there is no reason to perform this merge.
- if (!Reader.getContext().getLangOpts().Modules)
- return;
-
- LifetimeExtendedTemporaryDecl *LETDecl = D;
-
- LifetimeExtendedTemporaryDecl *&LookupResult =
- Reader.LETemporaryForMerging[std::make_pair(
- LETDecl->getExtendingDecl(), LETDecl->getManglingNumber())];
- if (LookupResult)
- Reader.getContext().setPrimaryMergedDecl(LETDecl,
- LookupResult->getCanonicalDecl());
- else
- LookupResult = LETDecl;
-}
-
/// Attempts to merge the given declaration (D) with another declaration
/// of the same entity, for the case where the entity is not actually
/// redeclarable. This happens, for instance, when merging the fields of
OpenPOWER on IntegriCloud