llvm-6502/unittests
Duncan P. N. Exon Smith cf8b959e8d BitcodeReader: Fix some BlockAddress forward reference corner cases
`BlockAddress`es are interesting in that they can reference basic blocks
from *outside* the block's function.  Since basic blocks are not global
values, this presents particular challenges for lazy parsing.

One corner case was found in PR11677 and fixed in r147425.  In that
case, a global variable references a block address.  It's necessary to
load the relevant function to resolve the forward reference before doing
anything with the module.

By inspection, I found (and have fixed here) two other cases:

  - An instruction from one function references a block address from
    another function, and only the first function is lazily loaded.

    I fixed this the same way as PR11677: by eagerly loading the
    referenced function.

  - A function whose block address is taken is dematerialized, leaving
    invalid references to it.

    I fixed this by refusing to dematerialize functions whose block
    addresses are taken (if you have to load it, you can't unload it).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214559 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-01 21:11:34 +00:00
..
ADT [ADT] Add a remarkbly useful little helper routine to ArrayRef for 2014-07-27 01:11:19 +00:00
Analysis AA metadata refactoring (introduce AAMDNodes) 2014-07-24 12:16:19 +00:00
Bitcode BitcodeReader: Fix some BlockAddress forward reference corner cases 2014-08-01 21:11:34 +00:00
CodeGen
DebugInfo
ExecutionEngine [CMake] Update libdeps. 2014-07-14 05:01:53 +00:00
IR IR/UseTest.cpp: Avoid std::to_string() to appease mingw32 bot. 2014-07-26 00:45:30 +00:00
LineEditor [CMake] LineEditorTests: Add Support to link_components. 2014-07-24 11:44:33 +00:00
Linker
MC [CMake] Update libdeps. 2014-07-14 05:01:53 +00:00
Option
Support unittests: Actually test reverse iterators in Path tests 2014-07-16 08:18:58 +00:00
Transforms [Debug Info] add DISubroutineType and its creation takes DITypeArray. 2014-07-28 22:24:06 +00:00
CMakeLists.txt Invert the MC -> Object dependency. 2014-07-03 02:01:39 +00:00
Makefile Invert the MC -> Object dependency. 2014-07-03 02:01:39 +00:00
Makefile.unittest