diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2021-07-02 15:45:15 -0700 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2021-07-02 15:57:07 -0700 |
commit | 52b5491a212a78e93e869b43ec325ddbd8832784 (patch) | |
tree | bc2c7cbea7013a4295971c02826e8d5f9071e099 /llvm/lib/Bitcode/Reader/MetadataLoader.cpp | |
parent | b8a021dbe322c4fae196318df7c0ebb2dd0f4a31 (diff) | |
download | llvm-52b5491a212a78e93e869b43ec325ddbd8832784.zip llvm-52b5491a212a78e93e869b43ec325ddbd8832784.tar.gz llvm-52b5491a212a78e93e869b43ec325ddbd8832784.tar.bz2 |
Revert "[DebugInfo] Enforce implicit constraints on `distinct` MDNodes"
This reverts commit 8cd35ad854ab4458fd509447359066ea3578b494.
It breaks `TestMembersAndLocalsWithSameName.py` on GreenDragon and
Mikael Holmén points out in D104827 that bitcode files created with the
patch cannot be parsed with binaries built before it.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/MetadataLoader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/MetadataLoader.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp index a2ad4a4..8493eb7 100644 --- a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp +++ b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp @@ -555,7 +555,7 @@ class MetadataLoader::MetadataLoaderImpl { } /// Upgrade the expression from previous versions. - Error upgradeDIExpression(uint64_t FromVersion, bool &IsDistinct, + Error upgradeDIExpression(uint64_t FromVersion, MutableArrayRef<uint64_t> &Expr, SmallVectorImpl<uint64_t> &Buffer) { auto N = Expr.size(); @@ -629,9 +629,6 @@ class MetadataLoader::MetadataLoaderImpl { LLVM_FALLTHROUGH; } case 3: - IsDistinct = false; - LLVM_FALLTHROUGH; - case 4: // Up-to-date! break; } @@ -1984,12 +1981,9 @@ Error MetadataLoader::MetadataLoaderImpl::parseOneMetadata( auto Elts = MutableArrayRef<uint64_t>(Record).slice(1); SmallVector<uint64_t, 6> Buffer; - if (Error Err = upgradeDIExpression(Version, IsDistinct, Elts, Buffer)) + if (Error Err = upgradeDIExpression(Version, Elts, Buffer)) return Err; - if (IsDistinct) - return error("Invalid record"); - MetadataList.assignValue( GET_OR_DISTINCT(DIExpression, (Context, Elts)), NextMetadataNo); NextMetadataNo++; |