Skip to content

Commit

Permalink
Revert "Fix bitcode auto-upgrade when using bitcode lazy loading"
Browse files Browse the repository at this point in the history
This reverts commit r278610. Tests are broken

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278613 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
joker-eph committed Aug 13, 2016
1 parent 3e63425 commit 4510860
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 32 deletions.
18 changes: 9 additions & 9 deletions lib/Bitcode/Reader/BitcodeReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3634,6 +3634,15 @@ std::error_code BitcodeReader::parseModule(uint64_t ResumeBit,
return EC;
break;
case bitc::FUNCTION_BLOCK_ID:
// If this is the first function body we've seen, reverse the
// FunctionsWithBodies list.
if (!SeenFirstFunctionBody) {
std::reverse(FunctionsWithBodies.begin(), FunctionsWithBodies.end());
if (std::error_code EC = globalCleanup())
return EC;
SeenFirstFunctionBody = true;
}

if (VSTOffset > 0) {
// If we have a VST forward declaration record, make sure we
// parse the VST now if we haven't already. It is needed to
Expand All @@ -3660,15 +3669,6 @@ std::error_code BitcodeReader::parseModule(uint64_t ResumeBit,
}
}

// If this is the first function body we've seen, reverse the
// FunctionsWithBodies list.
if (!SeenFirstFunctionBody) {
std::reverse(FunctionsWithBodies.begin(), FunctionsWithBodies.end());
if (std::error_code EC = globalCleanup())
return EC;
SeenFirstFunctionBody = true;
}

// Support older bitcode files that did not have the function
// index in the VST, nor a VST forward declaration record, as
// well as anonymous functions that do not have VST entries.
Expand Down
Binary file removed test/ThinLTO/X86/Inputs/autoupgrade.bc
Binary file not shown.
23 changes: 0 additions & 23 deletions test/ThinLTO/X86/autoupgrade.ll

This file was deleted.

0 comments on commit 4510860

Please sign in to comment.