Skip to content

Commit 7c6344a

Browse files
committed
Revert "[ThinLTO] Fix a crash in lazy loading of Metadata"
This reverts commit r345095. It was accidentally committed. llvm-svn: 345097
1 parent d725335 commit 7c6344a

File tree

3 files changed

+2
-139
lines changed

3 files changed

+2
-139
lines changed

llvm/lib/Bitcode/Reader/BitcodeReader.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3520,14 +3520,12 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
35203520

35213521
MDNode *Scope = nullptr, *IA = nullptr;
35223522
if (ScopeID) {
3523-
Scope = dyn_cast_or_null<MDNode>(
3524-
MDLoader->getMetadataFwdRefOrLoad(ScopeID - 1));
3523+
Scope = MDLoader->getMDNodeFwdRefOrNull(ScopeID - 1);
35253524
if (!Scope)
35263525
return error("Invalid record");
35273526
}
35283527
if (IAID) {
3529-
IA = dyn_cast_or_null<MDNode>(
3530-
MDLoader->getMetadataFwdRefOrLoad(IAID - 1));
3528+
IA = MDLoader->getMDNodeFwdRefOrNull(IAID - 1);
35313529
if (!IA)
35323530
return error("Invalid record");
35333531
}

llvm/test/ThinLTO/X86/Inputs/pr35472.ll

Lines changed: 0 additions & 13 deletions
This file was deleted.

llvm/test/ThinLTO/X86/pr35472.ll

Lines changed: 0 additions & 122 deletions
This file was deleted.

0 commit comments

Comments
 (0)