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
8 lines
128 B
LLVM
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
|
|
}
|