diff options
author | Nikita Popov <npopov@redhat.com> | 2023-09-28 14:58:38 +0200 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2023-09-28 15:03:52 +0200 |
commit | 05b86a8fea23865e4a437efa9cb4f6844ccbf50e (patch) | |
tree | b5e052ec945a25d181579e26df23c5b36925f73a /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | e331bbb3465f51f858a578fa9fa6449a1abbd4cd (diff) | |
download | llvm-05b86a8fea23865e4a437efa9cb4f6844ccbf50e.zip llvm-05b86a8fea23865e4a437efa9cb4f6844ccbf50e.tar.gz llvm-05b86a8fea23865e4a437efa9cb4f6844ccbf50e.tar.bz2 |
[Bitcode] Support expanding constant expressions in function metadata
This fixes the bitcode upgrade failure reported in
https://reviews.llvm.org/D155924#4616789.
The expansion always happens in the entry block, so this may be
inaccurate if there are trapping constant expressions.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 1d1ec98..e562918 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -4683,7 +4683,7 @@ Error BitcodeReader::parseFunctionBody(Function *F) { case bitc::METADATA_BLOCK_ID: assert(DeferredMetadataInfo.empty() && "Must read all module-level metadata before function-level"); - if (Error Err = MDLoader->parseFunctionMetadata()) + if (Error Err = MDLoader->parseFunctionMetadata(CurBB)) return Err; break; case bitc::USELIST_BLOCK_ID: |