Files
clang-p2996/lld/test/COFF/Inputs/beta.ll
Saleem Abdulrasool 3170ad7431 COFF: handle multiply defined symbols with different storage
If a symbol is locally defined and is DLL imported in another
translation unit, and the object with the locally defined version is
loaded prior to the imported version, then the linker will fail to
resolve the definition of the thunk and return the locally defined
symbol.  This will then be attempted to be cast to an import thunk,
which will clearly fail.

Only return the thunk if the symbol is inserted or a thunk is created.
Otherwise, report a duplication error.

llvm-svn: 312386
2017-09-01 22:12:10 +00:00

8 lines
128 B
LLVM

declare dllimport void @f() local_unnamed_addr
define void @g() local_unnamed_addr {
entry:
tail call void @f()
ret void
}