summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization
diff options
context:
space:
mode:
authorTyker <tyker1@outlook.com>2019-12-01 11:58:14 +0100
committerTyker <tyker1@outlook.com>2019-12-01 11:58:14 +0100
commit486d1a535896aa4f48f0ecaf451ea35dbd4f137b (patch)
tree2a5c48ada05c62a143f2cd2db3b5ac2f08de3537 /clang/lib/Serialization
parent85c74384778909789389b9012a75cfcca7964a28 (diff)
downloadbcm5719-llvm-486d1a535896aa4f48f0ecaf451ea35dbd4f137b.tar.gz
bcm5719-llvm-486d1a535896aa4f48f0ecaf451ea35dbd4f137b.zip
Revert "[clang][modules] Add support for merging lifetime-extended temporaries"
This reverts commit 85c74384778909789389b9012a75cfcca7964a28.
Diffstat (limited to 'clang/lib/Serialization')
-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