[LLVMdev] [LLVM, llvm-link] Opaque types.

Stepan Dyatkovskiy STPWORLD at narod.ru
Tue Dec 20 13:05:33 PST 2011


OK. So if we have two modules with the same function name. This functions may not be isomorphic. 

For example, we can link this files, but the function types are not isomorphic:

; 1.ll
%T1 = type opaque
declare i32 @foo(%T1*)

; 2.ll
define i32 @foo(i32* %v) {...something...}

But at the same time we should not map next two functions (PR11627):

; 3.ll
declare i32 @foo(i16* %v)

; 4.ll
define i32 @foo(i32* %b) {...something...}

If I right, with that. How it is better to fix that? I propose to create some method canMapFunctions that will very similar to areTypesIsomorphic except the case I described in 1.ll and 2.ll. Is it fine?

-Stepan



More information about the llvm-dev mailing list