[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.
This commit is contained in:
1 parent
e331bbb346
commit
05b86a8fea
5 files changed
+33
-13
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user