Verifier: Ignore CUs pulled in by ODR-uniqued types.
authorAdrian Prantl <aprantl@apple.com>
Wed, 18 Oct 2017 01:11:01 +0000 (01:11 +0000)
committerAdrian Prantl <aprantl@apple.com>
Wed, 18 Oct 2017 01:11:01 +0000 (01:11 +0000)
commit5a82f0a47096ab93e54fa3af8f23ff7cc5bceaa8
treeef42bef5d0f44c24fd329d398f3d6fc7017f8c39
parent07412df152cecaefd348711f8ae9bbdbf49fb43d
Verifier: Ignore CUs pulled in by ODR-uniqued types.

When more than one Module is imported into the same context, such as during
an LTO build before linking the modules, ODR type uniquing may cause types
to point to a different CU. This check does not make sense in this case.

This fixes the error reported in PR34944.

https://bugs.llvm.org/show_bug.cgi?id=34944
rdar://problem/34940685

This reapplies a cleaner implementation of r316049.

llvm-svn: 316052
llvm/lib/IR/Verifier.cpp
llvm/test/Linker/Inputs/odr-lambda-2.ll [new file with mode: 0644]
llvm/test/Linker/odr-lambda-1.ll [new file with mode: 0644]